This is a tutorial on how to make a music sequencer with a Galileo board and a standard MP3 Shield for Arduino. Galileo is an Arduino based development board with Intel architecture. This project was developed as an interactive display for Maker Faire Rome where the Galileo was unveiled to the public. We wanted to make it fun, easy to use, and draw in kids and adults.
Being fully compatible with Arduino's hardware interface, IDE, and standard libraries, the Galileo board makes it easy for those familiar with Arduino to jump right in and start programming.
In a bigger scale, our sample sequencer consists of a control board and a pair of speakers/headphones. On the control board, there are four buttons, two dials, and 8 LEDs.
The sound board was designed to be playful - we went for cute aliens and robots. The buttons, dials, and eyes became the eyes, tentacles, and signals. We used fluorescent and metallic stickers to add some color pop. The editable PDF template including the whole visual design can be found here: Soundboard.pdf Δ)
We made two large earphones using two 18 cm plastic food mixing bowls, a few lasercut parts, foam, fabric, and a pair of connected Mini X speakers. (You can download the design file here: BigEarphones.pdf)
The software is based on an example sketch from the Sparkfun's MP3 Shield. It is however modified to accommodate the Galileo platform. Compared to e.g. Arduino Uno, Galileo can host much bigger programs as it has more memory and internal processing speed. Thanks to that the program switches between MP3 files faster. As Galileo has its own SD card reader, our code reads the MP3 files directly from there, the only part we are using of the MP3 Shield is the decoding chip on it.
The sequencer has 2 knobs, 4 buttons and 8 leds on its interface. When activated, it loops through and plays through 8 segments of sound samples repeatedly (or however many segments are chosen). The LEDs will light up according to which segment you’re listening to. You can use the buttons and knobs to customize the sequence.
If you press the big red “random” button, the whole sequence will be randomized. Press the “try” button to listen to the currently selected sample without making any changes to the sequence. You can select different samples by turning the “sample selection” knob. Insert a chosen sample in the sequence by pressing the “set” button. Press “pause” button to stop the playback as long as you’re holding it. Set the sound sequence's length (between 1 and 8 samples) by turning the knob marked “step count”.
We used a 78HC595N shift register on a protoshield to control the LEDs, while the buttons and knobs are all directly connected to pins on the Galileo.
Here’s the schematics for the parts you need to mount on the protoshield:
The shift register
Layout of the resistors
The whole connection
After the shield is done, the rest of the connections are made by simply stacking shields on top of the board.
First include the following libraries:
Then we define the basic configurations of the sequencer. Template of the file name, button/knob mapping, etc.
And some global variables
The code is based on “ReadMP3fromSD” by Nathan Seidle. .
You can download the sketch from here: https://gist.github.com/X-Y/7900308
Here’s a simplified connection diagram:
On display at Maker Faire Rome, the Sample Sequencer with its vibrant colors, cool sounds, and big buttons drew in crowds of children and adults. With a short explanation, we had amatuer DJs in the making!