Introduction: 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
- Small gauge wire (three colors ideally)
- Wire stripers
- Wire cutters
- Phillips-head screwdriver
- Laser cutter
Step 2: Designing Enclosure
Step 3: Wiring and Soldering
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
2 People Made This Project!
We have a be nice policy.
Please be positive and constructive.
Hi, I wondering, is it possible to push 3-4 or more buttons in same time and if YES are they working correctly?
Is there a way to use one of the effect buttons as a bank. So that you have more options for drums and samples