Picture of Electronic Instrument
This electronic instrument allows you to sequence and loop audio and MIDI data.  Most of the time I use it to sequence drum samples so I can play around with different beats and rhythms.  The really great thing about this instrument is that it is very portable, it fits in your hands easily, runs off a single 9 volt battery, and has a headphone jack that you can plug into.  If you connect it to your computer via usb you can also use it to send MIDI data, this way you can communicate with other electronic instruments or software environments that understand MIDI. 

Parts List:

(x1) Arduino Uno (Duemilanove is fine, but make sure it is ATMEL328P) Radioshack #276-128
(x1) Arduino ProtoShield Radioshack #276-140
(x1) PC Board with Copper Radioshack #276-147
(x9) High Tact Switch Radioshack #275-002  (I really liked the feel of these buttons, but they only come in a surface mount version, which makes them fairly difficult to solder because of the small leads.  Additionally, since these buttons are square it is harder to drill a hole for them in an enclosure.  If you are a beginner, you might want to use a different type of button, any of these momentary switches will work)
(x1) 10KOhm Audio Control Potentiometer with SPST Switch Radioshack #271-215 (this will be used to control volume and turn the device on/off)
(x1) 50K-Ohm Linear-Taper Potentiometer Radioshack #271-1716
(x2) 220µF 35V 20% Radial-lead Electrolytic Capacitor (or anything between 200 and 300 uF) Radioshack #272-1029
(x2) SPST PC-Mountable Submini Toggle Switch Radioshack #275-645
(x2) Silver Tone Knurled Knob (or any knob with 0.25" inner diameter) Radioshack #274-424
(x9) 1N914/4148-Type Diode (two packages) Radioshack #276-1122
(x3) 2K ohm 1/2W 5% Carbon Film Resistor (1 package)
(x10) 10K Ohm 1/4-Watt Carbon Film Resistor (2 packages) Radioshack #271-1335
(x8) 20K Ohm 1/4-Watt Carbon Film Resistor (2 packages)
(x1) 4.7K Ohm 1/4-Watt Carbon Film Resistor Radioshack #271-1330
(x1) 1K Ohm 1/4-Watt Carbon Film Resistor Radioshack #271-1321
(x1) 5K Ohm 1/4-Watt Carbon Film Resistor
(x1) 9V Alkaline Battery Radioshack #23-853
(x1) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(x1) Amber Super-bright LED Indicator Radioshack #55050630
(x1) White Super-bright LED Indicator Radioshack #55050633
(x1) 1/8" Stereo In-Line Audio Jack Radioshack #274-274
(x1) LM386 Low Voltage Audio Power Amplifier (8-Pin DIP) Radioshack 276-1731
(1x) 8 Pin Socket 276-1995 Radioshack 276-1995

Additional materials:

22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
polyurethane finish
sand paper
hot glue
super glue
four wood screws
Heat Shrink Wrap Radioshack #278-1610
Electrical Tape Radioshack #64-2375

I've included fritzing breadboard diagrams (divided into a few parts) and schematics for this project as well as all firmware.  You can find these documents throughout the body of this instructable or download them all in one zip file below.

Remove these adsRemove these ads by Signing Up
1-40 of 126Next »
jamesbrosuk23 days ago

Excellent, can you sample any type of music?

io2426 months ago

I'm following the fritzing breadboard diagrams. Do I need two 9volts hooked up? I'm at a loss on where to plug in the audio jack? thanks for the great project :)

zoran416 io2421 month ago

only one battery. audio jack tip goes to middle lug of volume pot

rogeliotorlao6 months ago

hi amanda you are very brilliant :DDDD

i had made an electronic drum without any midi dependencies like this project but i had to put my wav files on an sd card because my samples are too large to fit into the progmem. Everything works fine except i did got one last problem with my project,. whenever i hit 2 or 3 drums at once it wont give me an output ,, i read the comments below about you putting a diode so we can push two buttons at the same time in this PROJECT of yours would it work on mine? i read some forums about playing two samples at a time and it did open me to the INTERRUPT thing which you had also applied in the source code of this project.

i am just a hobbyist and i dont have field in electronics or with these things can you help me? :DDDDD please pm me at my facebook account

bobironman8 months ago

Is there anyway i could just buy one?

Taha999 months ago

hey amanda do i need to add the DAC and the battery if i only want it to be midi controlled and guide me it to be midi only,

amandaghassaei (author)  Taha999 months ago

no dac, you will need a battery to power the Arduino, unless you connect to usb. Check out this project:

thnxs alot , your sugracube midi is a great project of yours.

lilitron10 months ago

Where is the 8-Pin Socket listed in the supply list used?

amandaghassaei (author)  lilitron10 months ago

it's for the amplifier, the lm386

amandaghassaei (author)  amandaghassaei10 months ago
no, it's fine. But in general it's a good idea to use sockets with your chips. That way you can replace them easily in case they burn out.

is it bad if i soldered the amplifier directly to the circuit board?

wmyers51 year ago

I was wanting to build something extremely similar to this, but i had hoped to be able to record input onto each of the pads. They dont necessarily need to be able to save after the unit is turned off, but i was curious if you had any thoughts on how to pull this off?

amandaghassaei (author)  wmyers512 months ago

this thing can record a bunch of button presses and then loop what you've played, is that what you mean?

No, I mean recording live audio through an input jack and then assigning it to one of the 9 buttons and then being able to press that button and play back the audio you just recorded, not a pre-recorded sample that is loaded onto the device from your computer. I was thinking more about this and realized how much more it complicates things (first off adding an input jack, then recording audio from it and FINALLY assigning it to a button). From there it would be nice to be able to maybe control the volume of each little sample/loop but that is a whole nother story! Sorry for all the comments, but I have been looking for something like this for so long and this is so close to what i want to build. I found another Arduino project that does the live recording I mentioned, but it doesnt have ANYWHERE near the memory capacity i was looking for where as i think your project might, any way to hybridize the two? The link for the other live sampling project is here:
amandaghassaei (author)  wmyers512 months ago

that thing looks cool. You just can store that much sound on the arduino's internal memory unfortunately. My instrument only has about 8-9 seconds of audio as well.

ThatCatMan1 year ago

Hey, could you make an instructable on JUST the project box, with all the sides, and the open top?

darenager1 year ago
Real nice, great design, great tutorial.
Hi! Awesome project. I'm probably going to do this myself hehehe. Just a question: since you multiplexed the inputs, do the button react individually? as in can the buttona be pressed at the same time without issue? thanks
amandaghassaei (author)  JoeyLimmena1 year ago
yes you can press as many buttons as you like at the same time, that's what the diodes are there for.
wizer1 year ago
Hi Amanda, sorry for so many questions on this. I'm kinda new to electronics and stumbling through this project. I've altered your design a little by adding 4 more buttons to make a 4x4 grid. Tonight I soldered all the diodes, wires and positive wires. It looks like you used a 5k resistor in your design per column? Typically I don't have any in stock. Before I buy some, do I need to adjust the value due to having 1 extra button per column? How do I work out the correct value resistor? -Tom
amandaghassaei (author)  wizer1 year ago
anything between 1k and 20k should work fine.
wizer1 year ago
Hey Amanda, Would this be a good alternative for the amp?
amandaghassaei (author)  wizer1 year ago
sure, you could also just get the lm386 chip and a couple of resistors and capacitors:
Hi! Awesome project. I'm probably going to do this myself hehehe. Just a question: since you multiplexed the inputs, do the button react individually? as in can the buttona be pressed at the same time without issue? thanks
amandaghassaei (author)  JoeyLimmena1 year ago
yes, the arduino only checks one button at a time, but it does it so fast that you would never know. it works with multiple inputs pressed at the same time. the key is the diodes, they prevent current from flowing in unintended ways when many buttons are pressed at once.
Hi! Awesome project. I'm probably going to do this myself hehehe. Just a question: since you multiplexed the inputs, do the button react individually? as in can the buttona be pressed at the same time without issue? thanks
markgoebel1 year ago
Amanda!!! Fantastic news. I got the buttons to work. A fine lesson is diodes and having them face the same direction. Now that that is solved, I still am having some issues. In order to get this to work, I've had to delete ports from the serial object in Max. I also have to upload the Arduino sketch every time. Any thoughts?
amandaghassaei (author)  markgoebel1 year ago
you don;t have to delete the ports or reupload the firmware, you just need to follow these steps:
close everything, arduino and max
plug in arduino
open max
does that work?
Sorry for all my posts. After installing the Audio Firmware, playing around, then installing the MIDI firmware and turning on Max I have successfully been able to get the buttons to work without any messing with the Serial port. Thanks for all your help. Onto the next phase of soldering this together.
amandaghassaei (author)  markgoebel1 year ago
No and I'm starting to think this is a bug in Max 6. I've already experienced other bugs in Max. I'll do some more research.
amandaghassaei (author)  markgoebel1 year ago
what is the bug?
Well, I have to delete ports a and b in the Serial object in Max 6 to get your patch to work with my breadboard. I shouldn't have to do that. I have seen others have a similar issue with the Serial object in Max 6. It's my guess since I'm new to this hobby.
Just for kicks I uploaded the audio firmware and clicked on the monitor and this is the printout I got. All the buttons light up LED 13 though... I was expecting 1's and 0's for on and off...

This is the printout of the MIDI firmware...some buttons printed out while others didn't. Tx always came on.

K !ˆ€ˆ€ˆ€€€ˆ€€€˜˜˜˜¨ ¨ ¨ H@@@XPPPh```( €€€ˆ€ˆ€€    @@PP`` ( €€€ˆ€ˆ€€    @@PP`` (
Correction...all the buttons light up TX...not LED 13 Hahahaha.
markgoebel1 year ago
Thank you Amanda. I downloaded the and I do see the print button. It shows all my MIDI ports. I don't have my project with me at the moment, but will update you when I get to it. Thanks again for your help.
amandaghassaei (author)  markgoebel1 year ago
cool, glad to hear it.
So, my unending saga continues. I see someone else built the Glitchbox and had success first time. Good for them! I received my new high tact switches today and plugged them into the breadboard. At first I had the same issues, but I toyed with the serial port in the maxpatch by deleting a b c and got sound all of a sudden but my buttons weren't 1 to 1. They were all all over the place and 3 lights would come on at the same time with their midi notes. Then I wiggled the wires around and the diodes and I had the same issues, but the midi notes were firing when I touched each diode. Then it all stopped working. Not sure what I'm doing wrong. I'm not sure if its the breadboard Im working on or the parts I'm using. I'm going to test the parts with a multimeter and see if I can trace the issue.
1-40 of 126Next »