Here’s another Arduino-based music project for ya — the Beat Box — a lo-fi, TR-808 drum machine. If you ever wanted to try your hand at DIY electronics, this one is a good starting point. Here is a short list of features:
- 16 grungy, TR808-like rhythm instruments
- Up to eight instruments per pattern
- Up to five selectable patterns
- Adjustable tempo (60 BPM to 188 BPM)
- Full source code available including waveforms (samples)
- Write and compile your own patterns, drum kits and waveforms
- Built-in PWM signal generation into an external low pass filter
- 22,050Hz, 8-bit signed, mono waveforms for true lo-fi grunge
The Beat Box uses the Arduino’s internal high resolution timer (TIMER1) to produce audio. The timer converts samples to a pulse-width modulated (PWM) bit stream which is sent into a simple low pass filter. The filter converts the PWM bit stream into an audio signal to be sent to a powered speaker, LINE IN, or what have you. This is absolutely the cheapest way to generate digital audio with an Arduino and it only requires four simple components, a solderless breadboard and a few jumper wires.
If you want to make assembly even easier, start with the littleBits Arduino Coding Kit, a Proto module and a Synth Speaker Module. I built the Beat Box using the littleBits Arduino Coding Hit and assembly was, literally, a snap.
The Beat Box source code includes drum waveforms and several classic drum patterns. With a 22,050Hz sampling rate and 8-bit samples, you get genuine lo-fi, bit-crunched TR-808 grunge. Purely optional, I added a littleBits synth Filter module and Delay module to the audio signal chain. Listen to the MP3 demo. In the demo, I sweep the filter frequency from low to open. At about 10 seconds in, you hear what is essentially the unfiltered sound of the Beat Box. Then, I increase the delay feedback level which adds echoes in time with the original pattern.
This pattern forever reminds me of riding the RTA #48 bus to work in Cleveland circa 1982.
Per standard operating procedure, I have provided the full design and source code.
Get your beat on! Build it now!