Sampled Sound Drum Machine

The Drum Machine idea struck when I came accross the Pygame libraries in Raspbian/Python, it is primarily for writing games and contains modules for loading, mixing and playing sound samples. I had already written a drum trigger program for the E&MM SynTom, SynBal and SynClap analogue sound effects which would be the foundation for this drum machine.

The drum trigger used GPIO to trigger the SynTom etc. sound effects, this has been removed and instead reads in short sampled drum sound files and plays them through the selected Raspberry Pi audio output i.e. the HDMI or jack socket. I have used a Justboom audio DAC hat to get the best possible sound.

I had two choices, the first one was to build the drum machine around a single drum kit and the second was to build it around mutiple kits. I didn't know which is the most useful so I did both!

The first program has 16 channels each able to select one of 24 sounds and played with up to 100 beats. Each voice has control over the audio output level. Drum patterns can be saved with all data including each voice channel sound, output level, beat, timings and loop data so it can be loaded back at later date.

The second program has similar features and has 24 channels each playing one sound but selected from any one of 24 drum kits.

The free drum samples came from


RPi Drum Machine v1.0.

A short video showing how it works.