Introduction: Arduino MIDI Controller

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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


gsharp9 (author)2017-12-28

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!


gsharp9 (author)gsharp92017-12-28

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

ChrisS879 made it! (author)2017-12-19

I made my own version :D I removed the sliders and pots, then redesigned the Illustrator file so that the enclosure resembles something closer to the Midi Fighter. Kept the code the same though, laser cut clear acrylic and ordered some nice yellow buttons to match the USB cable. Works a treat with Ableton! However I had to use Hairless Midi Serial instead of Serial Midi Convertor. Overall useful tutorial though, thank you!

pasila (author)ChrisS8792017-12-21

Hi Chris are you using resistor for this project? Cause I don't know how much (Ohm) that i can use if I want to make only six buttons. If the same? thx

Sorry for my bad english

ChrisS879 (author)ChrisS8792017-12-19

Also here is a video of it all working.

KauaS1 (author)2017-12-03

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


MaxD57 (author)2017-10-21

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?

gianbattista (author)2017-08-13

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

pablog146 (author)gianbattista2017-08-15

Same. Please, can you help us?

limK11 made it! (author)2017-07-16




Kun HoL (author)limK112017-08-12

Oh and this is what we can do

LiutaurasM (author)2017-06-03

There's the best way to use multiplexer

AdamS499 (author)2017-05-13

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



curtis.newton.104203 (author)2017-04-30

"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."

curtis.newton.104203 (author)2017-04-30

this sucks, I dont want to convert serial to usb

nowadays midi controler works via usb

this project sucks

DavidR519 (author)2016-06-01

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

Israeld7 (author)DavidR5192017-01-06

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)

weaseltrap (author)2016-10-03

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.)

MusicJoshua (author)2016-08-09

Does anyone know how many total midi buttons you can get on the Arduino?

Idin47 (author)2016-03-04

Sorry I realised it is but is Ableton gonna pick it u automatically or it needs to be set up through the software?

WayuH (author)Idin472016-07-19

i have the same problem. mine is different setting.i am using mocoLUFA firmware so that i dont need any virtual midi port or software. itdirectly recognize as usb midi device but as soon i try to map,ableton automaticlay takes the value. i wonder if somebody could help

WayuH (author)2016-07-14

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.

Idin47 (author)2016-03-04

Sorry I realised it is but is Ableton gonna pick it u automatically or it needs to be set up through the software?

Idin47 (author)2016-03-04

Sorry I realised it is but is ableton gonna pick it u automatically or it needs to be set up through the software?

Idin47 (author)2016-03-04

Sorry I realised it is but is ableton gonna pick it u automatically or it needs to be set up through the software?

Idin47 (author)2016-03-04

Sorry I realised it is but is Ableton gonna pick it u automatically or it needs to be set up through the software?

Idin47 (author)2016-03-04

Is your product adoptable on Ableton?

wrathgod (author)2016-03-02

I get the following error after compiling:

MIDI_Controller.pde: In function 'void noteOn(int, int, int)':
MIDI_Controller.pde:294:29: error: 'BYTE' was not declared in this scope
MIDI_Controller.pde: In function 'void noteOff(int, int)':
MIDI_Controller.pde:314:29: error: 'BYTE' was not declared in this scope
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.

Any help that you could provide would be awesomely appreciated.

Idin47 (author)2016-02-29

I do not want to use the push buttons ;)

Idin47 (author)2016-02-29

I do not want to use the push buttons ;)

Idin47 (author)2016-02-29

Hi is there any way to creat a MIDI controller that is been conteoled only by a conductor matterial? If there is please send me the instructure guidelines. Thanks

MagaratK (author)2016-02-05

How much did this whole project cost you?

dannykitainik (author)2016-01-11

Hi dylanstout

Great project!

I am working on a similar project but smaller scale using a ATMEGA328P chip, which I believe to be the same chip used in the Arduino UNO. I would like to use some of your features as they are awesome! Are you able to provide the schematics?

petikalo (author)2015-12-22

hi! this is a super serious code for this application dude! but could you or someone please tell me which MIDI message command do I have to use for digital pins (for button control)? I have built a potentiometer only controller, which has simpler code, and I guess there is some kind of MIDI command like that one has for analog stuff.

it is: MIDImessage(176,1,val) that has the "176" MIDI command, the second preference for assigning the pot, and the val for the 8 bit value.

is there an analogy for "digital" midi commands which represent the button pressing only? I'll have only two buttons, so I want to write something simpler than your code. Or can I use this command with the same 176, and for value HIGH or LOW will work? I'm new to this arduino/MIDI stuff, so sorry for dumb questions (and english), and thanks for any kind of help!:)

leslie_schamber (author)2015-12-10

do you have the schematic for the connections?

madebyvince (author)2015-10-07

Hey guys, I would like to make a simpler version of this controller using only 4 buttons and 4 rotating potentiometers but I'm more than a zero in electronics and simplifying the schematic supplied for this project is too complex for me.

Is there anyone who could help me ?


makeosaurus (author)2015-07-07

What software is this?

mcevallos aleman (author)2015-06-20

Can a layer button be added on pin 13?

tomatoskins (author)2015-06-12

Really cool! How did you make your enclosure?

dylanstout (author)tomatoskins2015-06-12

I created a sketch in Adobe Illustrator CS3, uploaded the file to a laser cutter, and had the sketch cut out on acrylic!

PatrickE4 (author)dylanstout2015-06-13

how big the uno i have an old control box for car hydraulic's being as i have no access to a laser cutter would it fit in that if i put some of the buttons and dials on the sides +it measures 4 1/2 x 8 inches and is 3 inches deep

dylanstout (author)PatrickE42015-06-14

Yeah it should. I am not positive though because I do not know exactly what your enclosure looks like, but keep in mind that the arcade buttons are 30mm in diameter.

PatrickE4 (author)2015-06-13

and can i give it a usb interface to work with my daw software?

NTT (author)2015-06-13

Video please!

About This Instructable




More by dylanstout:Arduino MIDI Controller
Add instructable to: