Our goal here is to build a programmable drum machine. Let's call it the Explosion Drum Machine.
The drum machine will let the user create an unlimited number of beat patterns using an unlimited number of drum samples. You can then store multiple riffs in a project and playback or edit the project later on. In its final form, the drum machine would look like the following screenshot:
To create your own drum beat patterns, simply load some drum samples (which can be any audio file with a .wav or .ogg extension) using the buttons on the left. You can design your beat patterns by clicking on the buttons on the right.
You can decide the number of beats per unit (BPU). Most western beats have 4 BPU, a Waltz would have 3 BPU, and some Indian and Arabic rhythms that I composed on this machine had 3-16 BPU! You can also change the beats per minute (BPM), which in...