Introduction: Arcade Button MIDI Controller

Picture of Arcade Button MIDI Controller
Having a hardware interface to your favourite music / DJ / VJ software can really open up doors in your creativity. The most widespread form of hardware control to your PC for such applications is a MIDI based controller.

A MIDI controller can send and receive MIDI messages to your PC, allowing direct control of your software. Not only that, but the controls can generally be mapped to anything your like. So what might be a volume fader for one person can be an effect filter for another.

This article will describe how to build and program a custom arcade button MIDI controller, while trying to keep the price below $100. It is aimed at electronics and programming novices.

Step 1: What You'll Need

Picture of What You'll Need

Below is a list of components used to create the MIDI controller. The cost for this project is based on the components needed for the MIDI controller. Other tools such as a soldering iron or a power drill, or common components such as solder and wire aren't included in the final cost. Tools which I did have to purchase are marking with italics , and their price is shown. All prices are in AUD except where indicated.

Required Components
1 x DFRduino (cheaper Arduino clone) $28.80
1 x USB cable (A to B connector, like that on a printer) $3.95
1 x Plastic enclosure $15.75
12 x Sanwa 24mm arcade buttons $26.28 (USD)
4 x 10k linear potentiometer $4.88
4 x Pot knobs $3.80
2 x 10k linear sliding potentiometer $7.54
2 x Slider knobs $2.04
5 x 10mm M3 nylon threaded spacers $2.00 (I got a bag of 25 for $9.95)
4 x 16mm countersunk M3 screws $1.00
3 x 4mm M2 self tapping screws $0.75
1 x 4.7 kΩ resistor $0.10
4 x stick on rubber feet $2.00

Total $98.89

All of the above can be found at most online electronics stores (I use the excellent Little Bird Electronics ), except for the Sanwa arcade buttons which can be found at arcade replacement parts stores, or from DJ TechTools . It pays to purchase one or two spare buttons and perhaps a spare potentiometer in the event that the part is faulty or you accidentally make it faulty.

Required Tools
Soldering iron
Wire stripper
Small gauge stranded wire (22 AWG), preferably in three or more different colours
About 1m of 2.5mm heat shrink
Power drill or drill press
Drill bits (2mm, 3mm, 7mm, and 11mm)
Spade bit (24mm) $12.49
Countersinking bit
10mm hexagonal wrench or spanner
Needle-nose pliers
Small riffler files $15 for pack of 10
Regular file
Phillips-head screwdriver 

Step 2: Design

Picture of Design

Before leaping into the controller design, it pays to have a look around at what's out there in term of controllers. What appeals to you? If possible try and get your hands on some gear to get a feel for things, such as button layout and tactile feedback.

The inspiration for this article comes from DJ TechTools ' MIDI Fighter , specifically the grid layout of arcade buttons. The use of arcade buttons appeals to me as they are nice and large, and don't feel mushy unlike some rubberised buttons.

So with that in mind, let's begin the design. It helps to use some sort of diagramming software to aid in the design process such as Microsoft Visio or the open source Dia . This will help in terms of component dimensions and scale so you know everything will fit.

Design Considerations
When designing your MIDI controller, remember that an Arduino only has 6 analogue inputs for knobs/sliders and 12 digital inputs for buttons/switches (technically it has 14, but two of those will be used for serial communications to the computer). The analogue inputs can also double as digital inputs so you could have up to 18 buttons on your design, or 17 buttons and 1 slider, or 16 buttons and 2 sliders, etc down to 12 buttons and 6 sliders.

Also try to find the dimensions of all of the components you wish to use so you have a good idea of what will and won't fit, and the clearance you'll need to give each component. For example the sliding potentiometers I've chosen have a travel length of 60mm, but then there's the extra clearance required on either side of the slider for the slider knob.

More analogue and digital inputs could be used with the aid of shift registers, multiplexers, or extra microcontrollers, but that is beyond the scope of this article.

Design 1
I initially wanted to make a copy of the MIDI Fighter, so I drew up a basic 4 x 4 grid of arcade buttons based on the arcade button's dimensions (27mm total diameter, 24mm mounting hole). Although it looked kinda cool, I also wanted some analogue inputs such as knobs and faders. I also didn't want to go through the hassle of cutting my own acrylic to make the case. So I decided then I'd find a plastic enclosure to house the controls and base the design around those dimensions.

Design 2
After a bit of hunting around for different enclosures, I eventually settled on this keyboard enclosure . Its dimensions are 189mm x 134mm, with a sloping height from 32mm up to 54.7mm. When choosing your enclosure make sure that your components are going to fit inside it. The mounting depth for the arcade buttons is exactly 32mm, so they will fit in the enclosure I've chosen.

Given this enclosure isn't square, I went for a 5 x 3 button arrangement and squeezed in a couple of sliding potentiometers up the top. When working out how to place the sliders, make sure to leave enough room for movement of the slider knob so it doesn't hit any other components. You'll have to find out the dimensions of the slider knob you wish to use so you can accurately place the slider. As the enclosure is higher at the back it also provides room to mount the Arduino clone underneath the buttons and sliders.

At this stage I'd recommend printing out a 1:1 sized copy of the design to ensure the layout feels natural, and all of the components are easily reachable. My design felt good, but I felt like I was wasting the Arduino's six analogue inputs with only two sliders.

Final Design 1
For the final design I removed the left most column of buttons and replaced it with a column of four rotary potentiometers, so now all six analogue inputs will be used. I also packed the components a bit more tightly together so they'd fit within the recess on the front panel.

Once you're happy with your design, go ahead and order the necessary components. Remember to check the knobs you've chosen will actually fit the sliding/rotary potentiometers. Some rotary knobs are designed for a 'D' type shaft, while others are designed for shaft with 18 teeth, while others simply screw onto the shaft.

Final Design 2
After about a week all of the components arrived, but I immediately noticed the sliders were too long (the dimensions on the datasheet were incorrect so I thought they were shorter). So rather than going through the hassle of exchanging them, I tweaked the design and swapped the sliders and rotary potentiometers around. I also measured the dimensions of the enclosure recess to ensure everything fit correctly. 

Step 3: Construction

Picture of Construction

Now that we have our design and the components have arrived in the mail, it's time to start cutting holes in the enclosure.

As you probably saw in the design phase, all of the dimensions for where components are to be placed are marked out. Not only does this aid the design layout, but is also useful when it comes to marking out where to cut the enclosure. I've included the schematic for my final controller design. Remember to mark out any screw holes or other mounting holes (I needed some extras for each rotary potentiometer).

Based on the schematic there are three types of holes to be made; a small 7mm hole for the rotary potentiometers, a larger 24mm hole for the arcade buttons, and a long narrow groove for the sliding potentiometers. We'll also need another small hole on the rear of the enclosure for connecting the USB cable to the Arduino board, and obviously any screw holes.

Measure and Mark Where to Cut
There are two ways to go about this step. The first is to grab a ruler and pencil and, using the schematic as a reference, mark out the center of each hole and the grooves for the sliders.

The second method (which I recently discovered on this Intructable ) is to print out a 1:1 sized copy of the schematic and stick it to the enclosure's surface. This in effect does all of the required marking and can reduce error at the same time. Given that's the case, I went with this second option.

Attached is a 1:1 schematic in pdf form, ready to print. When printing make sure it isn't being scaled before being sent off to the printer. Simply cut around the dotted rectangle so the paper will fit in the recess on the front panel, then stick it down using double sided tape. To cut the paper I'd recommend grabbing a metal ruler and a safety blade, then line up the ruler with the dotted line and run the blade down its length. This way the cuts will be nice and straight. Make sure you have something protecting your work surface underneath!

Drill the Holes
When drilling the holes it's a good idea to drill a small pilot hole first and then use the larger bits to drill the full sized holes. Start by drilling through the center of each arcade button marking on the schematic with a 2mm bit, and then do the same for the rotary potentiometer markings.

Switch over to a 7mm bit and drill through the rotary pot pilot holes to expand them. At this point I took the paper schematic off the enclosure because it was just going to get torn to shreds. Switch over to a 24mm spade bit and drill out the pilot holes for the arcade buttons. When using the spade bit remember to take it slowly to get a nice and circular hole. Make sure you have a sturdy grip or a clamp holding the enclosure lid to your work surface, else it will jump around a bit when drilling.

Getting Into the Groove
Grab a second print out of the schematic and stick it to the enclosure lid. Using a 3mm bit, drill out the screw holes for the sliding potentiometers. Now comes the tedious/fun part. To make the groove, drill a series of holes all the way down the length of the groove. The holes should be separated by no more than 1-2mm. Take your time and try to keep the holes as straight as possible.

After all of the holes have been drilled, use the countersinking bit to countersink the screw holes for the sliding potentiometers. These holes need to be countersunk otherwise the slider knob would hit the exposed screw head when it reaches the top or bottom of the groove. When drilling these I only drilled out a small amount at a time. Then I'd grab one of the countersunk screws and put it through the hole to check if the head was flush with the top of the lid. Repeat this as many times as necessary to get the nicest finish possible.

Now use the riffler files to remove the plastic between the holes which run the length of the slider groove. Also gently file the inner sides of the groove so it's as straight and as smooth as possible. 

Step 4: Mounting

Picture of Mounting

This part is fairly straight forward, but is important as it will reveal any problems made in the previous step.

Each of the arcade buttons will just push into their hole and snap into place. Try and mount them so the legs are vertical relative to the enclosure. This will make wiring a bit easier in the next step.

The rotary potentiometers have a washer and hexagonal nut screwed on to them. Remove both, and then insert the potentiometer through their corresponding holes from the underside of the enclosure lid. Hold it in place, and then from the top side slide the washer and screw the nut down around the potentiometer shaft using the hexagonal spanner. Ensure that each potentiometer is facing the same direction when screwing them in. If the pots you have are like mine, there's a small metal guide which should fit into the little 2mm hole next to the potentiometer hole. This helps to stop it from twisting loose.

From the top side of the lid, insert the four 16mm M3 screws into the holes above and below the sliding potentiometers. On the underside screw a 10mm spacer onto each screw until it just touches the plastic. There should be around 2mm of exposed thread on the bottom of the screw. After doing this for all four screws, get one of the sliding potentiometers and line it up with two of the screws on the underside of the lid. Ensure the slider is oriented so the two legs which are close together are toward the bottom of the enclosure (the narrow end).

Using a screwdriver screw each of the screws into the potentiometers mounting holes. Don't over tighten otherwise you'll start boring the drill through the plastic lid.

What About the Arduino?
I'm glad you asked! With everything mounted in the enclosure lid, attempt to fit it to the enclosure base (without the Arduino inside). You may find (like I did) that the sliding potentiometer legs are slightly too long to fit in the enclosure when it's closed. I simply used a pair of needle nose pliers and bent each leg at about half of length at a 90 degree angle.

Now that everything fits grab the Arduino and place it inside the case towards the back, with the USB socket facing the back. I found that I could actually line up one of the enclosure's PCB stand-offs with the hole nearest the USB on the Arduino, which would mean the USB socket sat flush with the back wall once a hole had been cut.

Gently close the lid to ensure none of the components touch the Arduino. If the components do touch it, shift the Arduino to another location and try again. You may find that the arcade button legs get in the way of the Arduino. Rather than bending them like the slider legs, pop the arcade button out and insert it again at a different angle.

More Drilling and Filing?
This is the last of it, I promise! Once you've decided on the location of the Arduino, mark out where to cut a hole for the USB socket. The USB socket itself is about 12mm wide and 11mm high. Using the 11mm drill bit, drill an opening straight down on to the edge of the enclosure until the tip of the drill is about half way down.

Take your regular file and square up the edges of the opening. Sit your Arduino's USB socket in the opening to check if it fits. If not, file away some more. Repeat this process until the USB socket sits nicely in the rectangular opening.

You will also need to file a small section out of the bottom edge of the enclosure lid to accommodate the top of the USB socket. Place the lid onto the enclosure base and mark out where to file based on the opening in the base. Take out the components from the lid if you haven't already, then file away about 2mm. Check the USB socket fits with the Arduino inside the case.

One Last Thing
We need a couple of stand-offs for the Arduino PCB. I chose to cut in half one of the 10mm nylon spacers, and then glue each half to the base of the enclosure where the remaining screws for the Arduino needed to go. 

Step 5: Wiring

Picture of Wiring

With all of the components securely fitted inside the enclosure, it's time to work out what needs to be wired where.

The ATMega328 chip used on the Arduino contains internal pull-up resistors, so we won't need to wire individual resistors for each of the arcade buttons. This greatly simplifies the controller wiring. So all that needs to be done to wire the arcade buttons is to solder one leg to ground, and connect the other leg to one of the digital inputs on the Arduino board.

That said, pin 13 can not be used as a digital input with the internal pull-up resistor. See the pullup resistors section in the Digital Pins article on the Arduino website for the reasons why. For this pin we'll be using an external pull-down resistor. If you're unsure what a pull-up/pull-down resistor does, check out this great tutorial on .

Wiring the potentiometers requires a ground wire, a wire to the one of the Arduino analogue inputs, and a third +5V wire. As the potentiometer is rotated or adjusted, the resistance of the potentiometer changes between the ground and +5V wire. According to Ohm's law, voltage = current*resistance, so with a constant input current and a variable input resistance, the output voltage will be variable. It's this variable voltage that the Arduino reads on the analogue pins.

The attached wiring diagram (created with the great Fritzing software) shows how to wire up each of the components to the Arduino board. The black wire represents ground, the red wire represents +5V, the purple and orange wires are digital inputs to the Arduino, and the blue and green wires are analogue inputs to the Arduino. Note that the ground wires and +5V wires have been bridged between the buttons and potentiometers.

Before proceeding to the next step you may find it helpful to print out a copy of the wiring diagram to refer to whilst you solder.

Step 6: Soldering

Picture of Soldering

Plug in your soldering iron if you haven't already. Once it's nice and hot, tin the tip of the iron (melt a bit of solder on to it, and then wipe it off on a damp sponge). It's a good idea to do this after each wire/joint you solder. Now tin all of the legs of the potentiometers and arcade buttons.

We'll start by soldering all of the ground connections to the potentiometers. Cut a length of black wire approximately 80mm long, and two more lengths approximately 50mm long. Strip about 8mm of the insulation from each end of the wires. Now line up one end of each wire, and twist the copper of all three wires together. We'll be attaching this group of wires to pin one of the top left rotary potentiometer. The 80mm wire will then go to the ground pin of the Arduino, while the other two wires will go to the adjacent rotary and sliding potentiometers.

Tin the twisted end of the trio of wires with some solder so the wires are fused together. Don't solder it to the potentiometer yet though!

Cut a short length of heat shrink tubing (about 12mm) and slide it over the twisted end of the wires, making sure it's at least 20mm from the exposed copper and solder. Now go ahead and solder the twisted wire to the potentiometer leg. Once that's done you can slide the heat shrink over the leg, protecting the soldered joint. Just leave the heat shrink loose for now, and we'll apply heat to it later once we've done all of the soldering.

Now cut another 50mm length of black wire and strip each end. Line up one end of the wire with the free end of one of the 50mm wires from before. Twist the copper of the two wires together, and then tin the joint. Again don't solder the joint yet, but first cut some heat shrink and slide it over the tinned wires. Solder the twisted wires to pin one of the second rotary potentiometer and slide the heat shrink over the joint.

Repeat this process for each potentiometer leg and arcade button leg, referring to the wiring diagram. Not every joint will be the same, so make sure you know what wire needs to go where. Don't solder anything to the bottom right most arcade button (on pin 13) as it's quite different and covered in the next section. When all of the ground wires and +5V wires have been soldered, roughly measure and cut the analogue and digital input wires and solder them in place. Tin the tips of the free end of each wire and insert them into the Arduino board.

Pin 13 and the Pull-down Resistor
As mentioned in the previous step, pin 13 requires a pull-down resistor so it can be read by the Arduino. Referring to the wiring diagram, solder the resistor to the common (black) wire of button 11. Solder a short length of black wire to the other end of the resistor so it can reach button 12. Now twist together the end of the short black wire with the data wire which will connect pin 13 to button 12. Solder the wires together, and then solder the pair of wires to one of the legs on button 12.

Run a wire from the +5V leg of rotary potentiometer four to the free leg of button 12 (see the long red wire on the right in the photo below). Solder the wire to the potentiometer and button.

Closing the enclosure
Sounds simple enough, but just be sure that none of the components interfere with the wires connecting to the Arduino. Note in the second photo that all of the digital input wires run to the right of the Arduino board. This allows room for the first column of arcade buttons to sit nicely above the Arduino without crushing it.

You may require a little force when fitting the lid to the base. If it won't close properly, try and see what components or wires are getting in the way. You may need to bend a few button legs and rearrange some wires for it to close nicely. Once the lid is on, screw it all together with the included screws.

Add the rubber feet to each corner of the base (not over the screw holes just in case you need access inside) and you're done! 

Step 7: Programming

Picture of Programming

Congratulations on making it this far! You must be itching to test out your very own MIDI controller.

First things first, we need to program the Arduino board. If this is your first encounter with an Arduino board, you'll need to setup the Arduino IDE on your PC so it can talk to the Arduino and you can load programs on to it. To do this simply follow the Getting Started guide on the Arduino homepage. You will also need to install the Timer1 library . Download it and unzip it to /hardware/libraries/Timer1/

Edit: As of, Timer1 is no longer needed.

Once your Arduino is up and running, we'll need to load a sketch on it that reads all of the digital and analogue channels and converts that info into MIDI messages. Those MIDI messages are then sent serially over the USB cable to the PC.

Download the attached sketch and upload it to your Arduino. The code has been documented so you can see what is going on. In a nutshell the code continually polls all of the digital and analogue inputs checking for changes. If a change is detected (a button was pressed or a slider was moved), a MIDI message corresponding to the input is sent to the PC.

One thing to note is that the logic for when a button is pressed and released may seem a bit backwards. When a button is pressed the digital input goes 'low', and when it's released it goes 'high'. This is to do with the internal pull up resistor and the buttons being wired to ground in the previous step.

When there is no input to the digital pin (no button is being pressed), the input is being pulled up, or high, hence the name. So the default state of the digital pin is high. Each button was wired to ground so that when a button is pressed, the pin will read low.

Code revision history:
- Updated to support Arduino 1.0 (updated Serial.print to Serial.write)

- Added default #defines for Teensy 2.0 and Teensy++ 2.0 digital pins
- Removed #defines for Teensy 1.0 as usbMIDI is not supported

- Teensy USB code added (thanks to Tim Crawford).
- Updated with #defines for Arduino Mega and Teensy USB for easy compilation

- Removed TimerOne library. Each analogue pin now maintains its own time since it was last moved, rather than one timer for all pins. This stops sending jittery movements on analogue inputs which haven't been touched.

- Modified analogue input logic so only pins moved within the timer period are updated, not all of them.
- Experimental code added for higher speed (but less accurate) analogue reads
- Reduced analogue timer length from 1000ms to 250ms

- Updated MIDI output to send same MIDI signals as official MIDI Fighter
- Reduced debounce length from 5ms to 2ms

- Initial Release

Step 8: Software

Picture of Software

The sketch from the previous step only sends MIDI messages over a standard serial port. To map those MIDI messages from the serial port to a MIDI port you'll need two bits of software.

Firstly you need a virtual MIDI port to connect to your audio or video software. I'd recommend MIDI Yoke on Windows (if you're using Vista or 7, you will need to disable UAC to install the driver). I did try using LoopBe1 and while it works the majority of the time, the automatic feedback detection kicks in when making rapid knob/slider movements, essentially killing your MIDI control. If you're on OS X you can setup a virtual MIDI port using IAC driver under Audio MIDI Setup (there instructions at the link below).

The second bit of software required converts MIDI messages coming in on a serial port to messages on a MIDI port. There are a number of software solutions to do this, but I use the simply named Serial-MIDI Converter by SpikenzieLabs. It's Java based so will run on Windows, OS X and Linux.

Once everything has been installed and setup, fire up Serial-MIDI Converter and configure it by pressing the matching letter in the list of items to match your serial and MIDI port settings. I use the settings COM 5 (yours may vary), 115200 kbps, In From MIDI Yoke 1 and Out To MIDI Yoke 1. Once you've gone through the setup, hit some of the buttons on your MIDI controller. You should see the little Serial RX and TX indicators in the bottom right of the window flash green.

Step 9: MIDI Mapping

Picture of MIDI Mapping

Fire up your favourite audio / DJ / video software and begin mapping the controller's pots and buttons to one or more actions. This step is obviously software specific so you may need to refer the software's documentation. In general I've found that an action to perform is first selected, and then the corresponding pot or button is pressed on the controller to map the two together.

There is no limitation on what you map to where, so just experiment and play around with things until you feel comfortable. My initial controller mapping for Traktor is below. All inputs act on the selected deck, except for the two sliders.

Deck A Volume - Slider 1
Deck B Volume - Slider 2
Chained Effect 1 Amount - Pot 1
Chained Effect 2 Amount - Pot 2
Chained Effect 3 Amount - Pot 3
Effect 1 On - Button 1
Effect 2 On - Button 2
Effect 3 On - Button 3
Play/Pause - Button 4
Cue points 1-8 - Buttons 5-12

Step 10: Future Enhancements

I hope you've enjoyed creating your own MIDI controller (and my first Instructable)! Please post any suggestions or features you'd like to see in future revisions of the MIDI controller.

There are a number of things I'd like to add and change in future MIDI controllers.

1. Create a simple software/hardware architecture to allow for easily expandable I/O. This would be through the use of additional microcontrollers or dedicated I/O chips.

2. Utilise the LUFA library to make the controller a true USB MIDI controller, and not rely on extra PC software.

3. Update the Arduino sketch to support 14-bit MIDI messages

4. Build a CNC machine for cutting out holes in the enclosure (you may have noticed some of the button holes I made are a bit wonky).


DooM94 (author)2012-11-12


I really like your project and i wanna build that! I'm just planning to build it with 4x4 buttons. Could you help me with the schematic?

thank you

fraganator (author)DooM942012-11-14

Here's an updated schematic for a 16 button controller. Note that pin 13 is not used here, so you don't need the pull-up resistor. Instead the button is connected to pin A0, and the extra 4 buttons connected to pins A1 to A4.

The sketch will also need to be modified to match the 16 button layout. Let me know if you need any help with making the changes.

AdyaY (author)fraganator2016-04-26

if using this scheme , how about the program ? changed or remained the same ?

tngks :)

JackyH16 (author)AdyaY2018-01-05

I want to know too

MathijsB (author)2017-12-17

I made one! it worked fine BUT, now I wanted to make a bigger one with more imputs. I figured I could use a multiplexer to make this work for which I used the readananalogsignals code from here:

I really really suck at coding and cant figure it out...

My wiring is pretty solid I think because when I just have the multiplexer sending signals (not MIDI) it works, and when I run code that only reads everything BUT the multiplexer (MIDI) it works... It really is the combining of the multiplexer code and the code from this instructable build that wont work. :(

please someone help!

AlbertoP87 (author)2017-11-26

Great project, i'm just working on it! I would be glad if you could let me know how the code would change if you wanted to use an Ultrasonic Sensor HC-SR04 instead of the buttons as your digital inputs, thanks!

MattS418 (author)2017-09-12

Fraganator you should make a video you can easily make 1000$ worth of youtubes views

MattS418 (author)2017-09-12

OK maybe i am asking too much but how can we use 32 buttons

pls PLS respond 32 or 64 works

BramV43 (author)2017-06-06

Hello friends

Has anyone already been able to use 16 buttons?

if so

Can you share the code with me

Raseka (author)BramV432017-06-18 here is a video where someone makes a 16 button midi control with the code in the description check it out if you havent yet.

MattS418 (author)Raseka2017-09-12

OK maybe i am asking too much but how can we use 32 buttons

pls PLS respond 32 or 64 works

Pora_desu (author)2017-08-28

Will it work with a ARDUINO UNO?

MattS418 (author)Pora_desu2017-09-12

yee it sure will if anything it will work even better the arduino used in this instructable is actually to keep the cost low

Ace Gambit (author)2017-07-04

This is so cool! I have the perfect buttons for this!

RickM182 made it! (author)2017-06-27

Awwwww yeah!

arturo.briceno.148 made it! (author)2016-12-25

Hello, how could I do to know the status of each pushbutton using leds, for example if in traktor is configured a pushbutton like hold, toggle or direct, I am using an arduino UNO, 11 digital and 5 analog like digital to be able to use 16 pushbuttons like The midi fighter, I just lack the subject of the leds, I do not understand, can someone help me please?

You would need more digital outputs, and in this case you are using all of them, so there's no way out of the box to do that. Like he said in the tutorial, you would need shift registers, or multiplexers, to do that. This way you'll have many more inputs/outputs in your Arduino. Other way out is using another Arduino or Teensy board with more in/outs built in, like the Arduino Mega, or the other Teensys. The code is optmized for that.

Hi thanks for replying, I have the MEGA arduino, how can I modify the code so that the LEDs work that way?

do you speak Spanish?

A mi también me interesa saberlo. ¿Esto serviria solo para que los leds se enciendan al pulsar el boton o se pueden hacer más cosas como en el launchpad o midi fighter? Yo estoy usando teensy

JohannM12 (author)2017-05-21

it is possible to use a teensy instead of the arduino to get more buttons?

beyondal (author)2017-04-11

Hello, Is this still possible to do? I'm on a Osx Sierra and the software doesn't work for the serial communication. Doesn't even start up. Java errors. Want to create this for a arduino mega and connect it to max/msp!

tyoga (author)beyondal2017-04-11

hello! have you try to download the older version ? it works for me !

beyondal (author)tyoga2017-04-12

Old versions of the arduino code or the Serial midi converter. Because on my mac osx Sierra I can't use the software to convert serial to midi? Do you have the same setup?

beyondal (author)beyondal2017-04-12

I've used the hairless midi converter which recognizes the arduino. But the new code doesn't work, because it says it can only be used with an USB MCU?? :/ This is coming from the MidiUsb library...? Hope the original author sees this to and can update the project!

error code Arduino: 1.8.2 (Mac OS X), Board:"Arduino/Genuino Uno"

In file included from /Users/myname/Downloads/MIDI_Controller/MIDI_Controller.ino:2:0:

/Users/myname/Documents/Arduino/libraries/MIDIUSB/src/MIDIUSB.h:16:2: error: #error MIDIUSB can only be used with an USB MCU.

#error MIDIUSB can only be used with an USB MCU.


exit status 1

Fout bij het compileren van board Arduino/Genuino Uno

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

tyoga made it! (author)2017-04-11

Hello! i have a little problem, sometimes the button send the multiple midi signal to the daw im using, how to fix this ?

sorry for my bad english, im from Indonesia

sorry for

RodrigoL7 (author)2017-03-16

Hello! i made it but i use reason and i can't make it work as i want on the kong pad. i can't assign buttons on pads. i'm really sad about this. i hope you can help me

arturo.briceno.148 (author)2017-01-16


int buttons[16]= {

1, 5, 10, 14,

2, 7, 11, 15,

3, 8, 12, 16,

4, 9, 13, 17


// FORMAT <----> //"BTN#" "NOTE"\\



// *C-1* *C#-1* *D-1* *D#-1*


// 1 - C3 | 1 - E4 | 1 - G#5 | 1 - C7

// 2 - G#2 | 2 - C4 | 2 - E5 | 2 - G#6

// 3 - E2 | 3 - G#3 | 3 - C5 | 3 - E6

// 4 - C2 | 4 - E3 | 4 - G#4 | 4 - C6

// 5 - C#3 | 5 - F4 | 5 - A5 | 5 - C#7

// 6 - A2 | 6 - C#4 | 6 - F5 | 6 - A6

// 7 - F2 | 7 - A3 | 7 - C#5 | 7 - F6

// 8 - C#2 | 8 - F3 | 8 - A4 | 8 - C#6

// 9 - D3 | 9 - F#4 | 9 - A#5 | 9 - D7

//10 - A#2 | 10 - D4 | 10 - F#5 | 10 - A#6

//11 - F#2 | 11 - A#3 | 11 - D5 | 11 - F#6

//12 - D2 | 12 - F#3 | 12 - A#4 | 12 - D6

//13 - D#3 | 13 - G4 | 13 - B5 | 13 - D#7

//14 - B2 | 14 - D#4 | 14 - G5 | 14 - B6

//15 - G2 | 15 - B3 | 15 - D#5 | 15 - G6

//16 - D#2 | 16 - G3 | 16 - B4 | 16 - D#6


int topbanks[4]= {

18, 19, 20, 21


arturo.briceno.148 (author)2017-01-14

Please help me, How can i do to have 4 banks in ableton?

gustavo.silveira.167 (author)2016-12-26

I think this was the first tutorial that I've seen when I first tried to make my own controller, back in 2013. Now, I even have my website and teach people how to make this stuff. Thanks for that!

arturo.briceno.148 (author)2016-12-25

Hello, how could I do to know the status of each pushbutton using leds, for example if in traktor is configured a pushbutton like hold, toggle or direct, I am using an arduino UNO, 11 digital and 5 analog like digital to be able to use 16 pushbuttons like The midi fighter, I just lack the subject of the leds, I do not understand, can someone help me please?

whereisbob (author)2016-11-24

If anyone had a problem where if you had two potentiometers in analog inputs A1 and A2 set to control two different parameters (say Gain and HI EQ) twisting eiter potetiometer would control both parameters! in fact any potentiometer in any port would cross over and and effect any assigned value.

for my Card (Mega 2560 clone) i had to change the analog pinmode from




(in the code under where it says :

// Set the pin direction to input.)

hope it helps anyone

Huehuecrazy (author)2016-10-31

Awesome tutorial!

I have one question. If the arcade buttons have three legs instead of two, is it the same soldering process???

ChhuangaC (author)2016-10-12

my slider value keeps shaking small movements. and my slider moves up only from half of the slider. i have identified that my connections are correct. please help

arturo.briceno.148 (author)2016-07-22

It does not work with hiduino , as I can fix that ?

change serial to Serial.begin(31250);

Thibaut A made it! (author)2016-08-10

Very cool tutorial. Thanks! I used Hairless Midi to convert Serial to Midi, very useful to debug the midi messages and check that everything is working.

Maybe you should have explained how to test a slider potentiometer and determine where the wiper is, as the provided wiring won't work with any model.

The case I used is a biscuits box that I stripped, sanded and clear coated. On the back of the lid, I have a thin layer of wood so the buttons have enough material thickness to properly clip (the potentiometer second holes are also drill in the wood only).

limK11 (author)2016-07-18

can someone give me the program code for 4x4 controller

Stuck for almost a month...

bravodelta (author)2016-07-12

looks great, I am going to give this a shot...but my only confusion is with how you mounted the board. the teensy has no holes

ScarlettR1 (author)2016-04-18

I'd absolutely adore it if you made a tutorial for how to accomplish LED feedback (LEDs lighting up) by pressing the triggers.

reset2 (author)2016-04-09

nice project! I need to build an only 4 button midi controller for Qlab,
would it be necessary to change something from the Arduino code?(I'll be using an old Duemilanove) thanks.

FredmanC1 (author)2016-03-13

hey brother can you help me code a 2 channel mixer for traktor ,i am pretty much trying to mock the pioneer djm s9 ,specially the hotcue pads and the loop section ,

ThaWolf made it! (author)2016-03-11

So, I couldn't find an enclosure so I decided to improvise.

ThaWolf (author)ThaWolf2016-03-11

Couldn't get any potentiometer neither, I had to change the code to work with just the digital inputs. Great project.

wrathgod (author)2016-03-01

Help needed here. I'm a noob when it comes to programming. I downloaded the required TimerOne lib and get the following error after compiling the sketch:

MIDI_Controller.pde: In function 'void controlChange(int, int, int)':

MIDI_Controller.pde:335:29: error: 'BYTE' was not declared in this scope

Error compiling.

The sketch i used was " (4 KB)"

Thanks in advance! XD

DjoksO (author)2016-01-26

very great project! I made a old arcade pad with your sketch and it will be so cool! fo real Hid support, i have uploaded Hiduino to the bootloader and change the serial baud rate of your sketch to 31200 and it's function perfecly! i want to put some led on backlighting of the arcade button but I have independently digitalpin output for each and I dont know how I can map it in your sketch for when I push a button the led bring on it. if you can help me, I can post a photo of the finished project ^^. thanks a lot

Ragamuffyn (author)2016-01-20

Or a joystick for XY effect

Ragamuffyn (author)2016-01-20

How hard would it be to make a larger scale version of this? Could you chain a second Arduino to it? Would the program have to be modified? Would also love LED lights.

Jontuzz (author)2016-01-09

Hey nice project! I would like to know if it is possible to use this to control for example game volume, skype volume and web browser volume separately on windows? How do I do that? Is it possibble?

johnny85824 (author)2015-12-21

what midi maping software do you use?

About This Instructable




More by fraganator:Arcade Button MIDI Controller
Add instructable to: