Arduino MIDI Controller




A MIDI controller is any piece of equipment that generates and transmits MIDI data to MIDI-enabled devices. In short, if you have buttons on your MIDI controller, you can program those buttons to any sound you want through musical software (ex.: Ableton, Garage Band, etc.). You can also program potentiometers to control effects, volumes, etc..

This instructable will show you how to create your own MIDI Controller using Arduino. With a MIDI controller, you are rarely limited with what you can do. There is endless possibilities and endless fun.

Step 1: Gathering Materials


  • Soldering iron
  • Solder
  • Small gauge wire (three colors ideally)
  • Wire stripers
  • Wire cutters
  • Phillips-head screwdriver
  • Laser cutter


Step 2: Designing Enclosure

To design the acrylic enclosure, I used Adobe Illustrator CS3. Free alternatives include Inkscape and Pixlr.

Here is the file to my design:

Step 3: Wiring and Soldering

Arcade Buttons

You will now want to push the buttons through the holes. You will want to push them slowly in so that you do not crack the acrylic. Once the buttons are in, you will want to solder a wire to one of the legs on every arcade button (looking at the backside of the buttons). This will be the data wire. Make sure the wires are the same color and on the same leg of each of the arcade buttons. I used red wires for this. Also, you need to make sure that the wires are at an appropriate length so that they reach the Arduino that is placed in the top left corner (looking from above). The bottom right corner button (looking at the backside of the buttons) will need to have a wire soldered to the same leg as the other buttons but it will go up to the pot potentiometers so measure the length of the wire accordingly.

On the button in the bottom right corner (looking at the backside of the buttons), you will need to solder a 560 ohms resistor to a short piece of different colored wire that will then be soldered onto the ground leg of the button which is the leg that is not already occupied. I used blue wire for this. On the other side of the resistor solder the same color wire on so that it reaches the other ground leg on the next button. Then solder that wire. To the same leg, solder the color wire that you used for the data pins (red) onto that leg as that wire will serve as the data pin.

On the next button to the left of it, solder another wire to the ground leg that reaches the next ground leg on the next button and then solder that wire to the ground leg. Continue the process until the last button. As you are connecting the ground legs with wires, move to the left (looking at the backside of the buttons) and then go up as you reach the end of the row and the go to the right until you are at the end of the row. At the end of the row, solder a wire onto the ground leg that will go to the GND pin on the Arduino so measure the wire accordingly.


The wire that comes from the arcade button that has the resistor on it needs to be soldered to the pot potentiometers. The wire needs to be soldered on the bottom prong of the potentiometer. Once this is done, stick with the same color of wire (red) to connect all of the potentiometers including the sliding potentiometers. This wire will be the power. Make sure to connect the wires to the same prong throughout soldering. On the same prong of the pot potentiometer that connects to the sliding potentiometers, solder the same color wire (red) onto the prong. This wire will go into the 5V pin on the Arduino so measure the length accordingly.

On the top prong of the pot potentiometer that is directly connected to the arcade button, solder a different color wire (blue) onto it and then connect this wire to all of the potentiometers including the sliding potentiometers. Once all of the potentiometers are wired together, solder the same color wire (blue) onto the same prong of the last potentiometer that you connected. This wire will go into the GND pin on the Arduino so measure the length accordingly.

On the prongs of the potentiometers that do not have wires on them, solder a different color wire (yellow) onto the prongs. Make sure you measure the lengths of these wires so that they can reach the Arduino. These wires will go into the ANALOG IN pins of the Arduino.

Step 4: Connections


The wires that are the data wires on the arcade buttons will go into the DIGITAL pins. These wires should go into the pins how they are aligned. For example, if I was connecting the data wire for an arcade button to DIGITAL pin 5, the data wire for the arcade button next to it would go into DIGITAL pin 6.


The wires that are the data wires on the potentiometers will go into the ANALOG IN pins. These wires should go into the pins how they are aligned. For example, if I was connecting the bottom right pot to ANALOG IN pin 0, the data wire for the top right pot would go into ANALOG IN pin 1.


The free wire that is connected to the pot potentiometer goes into the 5V pin on the Arduino.


The free wire that is connected to the arcade button goes into the GND pin on the Arduino. The free wire that is connected to the sliding potentiometer goes into the GND pin on the Arduino.

Step 5: Constructing

Connect the sides to the bottom piece, back piece, top piece, and front piece. On the joints where the pieces connect, you will want to put a small amount of hot glue on. You do not need a lot. It should look like this up to this point.

Before putting the pieces with the arcade buttons and the potentiometers on, consider glueing the Arduino down. This is optional. However, it might be easier to connect the USB cord to the Arduino. Now, connect the pieces that have the arcade buttons and the potentiometers onto the base. If you want to be able to take these pieces off, do not hot glue them. If you want to glue these pieces down, you can.

Step 6: Programming

Once you have all of the wires connected to the Arduino, you now need to program the Arduino. The code below will be the code that you want to compile into your Arduino. When it asks you if you want to "Create this folder, move the file, and continue?", press "OK". Now, verify and upload the code.

Step 7: Software

The code in the previous step only sends MIDI messages over a standard serial port. You'll need to map those MIDI messages from the serial port to a MIDI port. To do this, you will need two pieces of software.

Firstly, you'll need a virtual MIDI port. This will connect you to your audio software. If you are using OS X, like I did, you can use IAC Driver under Audio MIDI Setup to create a MIDI port. To do this, you can follow these instructions. Make sure to set up two ports, one named "Output to Audio Software" and the other named "Input to Audio Software". If you are using Windows, use MIDI Yoke. To install the driver on Windows Vista or Windows 7, you will need to disable UAC.

To convert MIDI serial port messages to MIDI port messages, you will need the second piece of software called Serial-MIDI Converter. It can run on Windows, Linux, and OS X since it is Java based. If your computer does not have Java, you will need to instal it.

Now that you have setup everything, open the Serial-MIDI Converter and type in the numbers that correspond with your Arduino and ports. To know if your MIDI controller is working, press the buttons and the Serial RX square should be lighting up green.

Step 8: MIDI Mapping

Mapping is the process of configuring the potentiometers and buttons to what you want them to do through audio software.

Open up your audio software and begin mapping your MIDI controller. The process of mapping depends upon your audio software so you will need to figure out how to map with your software. With Ableton, it is done by selecting what you want to map your controller to, press the button or potentiometer you want to map it to, and unselecting the effect, sound, etc. Mapping what you want where you want is completely up to you as there are no restrictions. For example, here is what I mapped my MIDI controller to:

Buttons 1-12: drum sounds

Pot 1: reverb amount

Pot 2: flanger amount

Pot 3: phaser amount

Pot 4: chorus amount

Slider 1: volume amount

Slider 2: pitch

3 People Made This Project!


  • Classroom Science Contest

    Classroom Science Contest
  • 1 Hour Challenge

    1 Hour Challenge
  • Fandom Contest

    Fandom Contest

45 Discussions


2 months ago

I have some question about arduino uno can you give me arduino code for 16 buttons please


2 years ago

can you give me code for 16 potentiometer f for arduino mega. i have code for uno only and i dont know how to chage it for mega.

1 reply

Reply 2 months ago

Hi can you give me code for arduino uno I'm using 16 buttons please


3 years ago

Is the max inputs only 18? If I wanted to exceed this is there a way to link multiple arduino to one input?

2 replies

Reply 2 years ago

Use a matrix keyboard instead of a one to one kyeboard to input. For instance in order to get 16 keys you will only need 8 pins (4+4 cables to make an 4*4 matrix)


Question 1 year ago

Hi, I wondering, is it possible to push 3-4 or more buttons in same time and if YES are they working correctly?


Question 1 year ago on Step 8

Is there a way to use one of the effect buttons as a bank. So that you have more options for drums and samples


1 year ago

I am really wanting to make my own midi controller for a digital guitar rig. Seems like its pretty normal when i look online to find ideas for program changes. Those seem to be typical. However, I am wanting to add a deeper layer function or possibly a second "mode" to perform midi control changes as well. How do I know which board is appropriate for this need? new to the idea of making my own but knowledgeable in midi, etc... I have a manufactured pedal that is close, but lacks the programming to do what i want. The manufacturer says the feature will be added late next year in firmware update... NOT WAITING IF I CAN JUST MAKE ONE! would love input from you guys!!! THANKS IN ADVANCE!


1 reply

Reply 1 year ago

also, forgot to mention, need to do all of this through USB Midi.....


1 year ago

Please how i can change one pot slide for a sensor ultrassonic ? i want use for



1 year ago

I am able to download the Seial-Midi Converter by searching for it online. I download it just fine but cannot launch the executable file.

Has anyone been able to work it out?


1 year ago

Congratulations! Just a question: I'm not able to download Seial-Midi Converter from the link becouse it do not allow. Please, may you suggest where I can find it? Many thanks.

Looking forward, have a nice day!

Gian Battista Pettinelli

1 reply

2 years ago

There's the best way to use multiplexer


2 years ago

IT's cool project.


Could You help me to create SIMPLY MIDI Controller ?? :

Arduino MEGA 2560

I'm using "serial.begin(9600)

- without MIDI.h - beacuse i'd don't know how to programming it

10 potentiometers

32 Buttons

ONLY :-)

Thanks forany help




"These library allows any microcontroller with native USB capabilities
(atmega32u4 based boards or ARM boards) to appear as a MIDI peripheral
over USB to a connected computer."


this sucks, I dont want to convert serial to usb

nowadays midi controler works via usb

this project sucks


2 years ago

I followed the steps considering software and the arduino, to test the concept first, but now when I start to map the buttons it recieves a lot of "button presses" even though nothing is plugged into the arduino. Any idea about what could be the problem? (pic might clarify it more.)