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


 
Remove these adsRemove these ads by Signing Up

Step 1: What You'll Need

Picture of What You'll Need
tools.jpg
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
Solder
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
sanwa_obsf24_drawing_large.jpg
design1.png
design1_profile.png
design2.png
final_design.png
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
schematic_cutout.jpg
drill4.jpg
drill3.jpg
drill5.jpg
drill6.jpg
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
mounting2.jpg
mounting1.jpg
mounting3.jpg
usb_hole1.jpg
usb_rear.jpg
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
MIDI_controller_wiring_schematic.png
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 ladyada.net .

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
soldering2.jpg
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 MIDI_Controller_2011-03-21.zip, 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:
2012-01-20
- Updated to support Arduino 1.0 (updated Serial.print to Serial.write)

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

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

2011-03-21
- 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.

2011-03-14
- 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

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

2011-02-22
- 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).
1-40 of 344Next »
RachelY122 days ago

Hi thanks for your instructable! Everything is going well but I was just wondering if it was possible to setup the pushbuttons to be used as a piano keyboard? Like with a DAW or something?

By default, it is set up to do exactly that. The first button plays C, the second plays C#, the third plays D, and so on. :)

Omg got it, thanks! Is there anyway to remap the buttons so it starts on C3, followed by C#3, D3...? Also, I know the layout of the buttons follow the Midi Fighter's bottom to top order but is there a way to change it so it goes from top to bottom? Thanks so much for your help! I really appreciate it (:
I'm loving the controller!

Don't worry I found it! For anyone who wants to know, I replaced lines 159 to 178 with this:

#else

#define MIDI_CHANNEL 1

// First note, starting from upper left button

#define NOTE NOTE_C2

// This pin order corresponds to the top left button being zero, increasing by one as we move from left to right, top to bottom

// 0 1 2 3

// 4 5 6 7

// 8 9 10 11

// This array size must match NUM_DI above.

#if defined(ARDUINO_MEGA)

#define DIGITAL_PIN_ORDER 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53

#elif defined(TEENSY_PLUS_PLUS)

#define DIGITAL_PIN_ORDER 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37

#elif defined(TEENSY_2)

#define DIGITAL_PIN_ORDER 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

#elif defined(TEENSY_PLUS_PLUS_2)

#define DIGITAL_PIN_ORDER 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37

#else

#define DIGITAL_PIN_ORDER 10, 11, 12, 13, 6, 7, 8, 9, 2, 3, 4, 5

#endif


Great project you have here, it's just perfect

I made my own with just 8 pots instead of all the sliders and buttons; they all work fine except one, which gives a "MIDI feedback shortcut" error, and says not to connect the in and out to the same port. Oddly this only seems to happen with the one port. Any ideas?

Actually it sometimes works, but I have to use LoopBe30 and route it through 2 different ports with HairlessMIDI (instead of MIDI Yoke since Windows 8)

IDK what's up with that

Do the push buttons need to be momentary or lock?
MangJ2 months ago

somebody help me please... i have arduino micro, can i use it as Midi controller??? i'm new on this community... please help me...

the circuit diagram also...

Juan ManuelK2 months ago

Hello such , I am Argentine and I'm doing the midi controller . USE sorry for translators .
My problem is this , I can not load the program to Arduino entiedo Not For Long . I hope your help. thousand thanks

error de arduino.PNG

I want to use only 16 buttons, as I do?

midifighter_black_purple.jpg

for arduino nano is necessary to modify the code ? that's ok?:

#if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328__)

#define ARDUINO_NANO

#elif defined(__AVR_ATmega328P__)

#if defined(ARDUINO_NANO)

// Number of digital inputs. Can be anywhere from 0 to 68.

#define NUM_DI 13

// Number of analogue inputs. Can be anywhere from 0 to 16.

#define NUM_AI 8

Help me ! when i run the code i get this error
'PIN_D6' was not declared in this scope

It's been a few months since this was asked so I doubt you still need help. For others like me who might also run into this issue, I was able fix this by making some changes to the code(just a heads up, very minimal programming experience). Basically, seems like the code was detecting my leonardo as a teensy or something so I commented out the teensy #defines at the top:

#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)

#define ARDUINO_MEGA

//#elif defined(__AVR_AT90USB646__)

//#define TEENSY_PLUS_PLUS

//#elif defined(__AVR_ATmega32U4__)

//#define TEENSY_2

//#elif defined(__AVR_AT90USB1286__)

//#define TEENSY_PLUS_PLUS_2

#else

#define ARDUINO

#endif

jmlynch2 years ago
if i wanted to change the code so that the digital buttons sent a simple on/off signal instead of playing a note how could i do that

yes, how do I do this? Apparently it is not possible through Ableton so it probably needs to be programmed in.

Hi, thanks for your instructable, it's great! Can you explain more about the LUFA library and how to make a true USB MIDI controller?

hey , is it possible to make a controller with two faders , 8 knobs?

keyblade43218 months ago

Great instructable. I'm having some trouble with the slide pot. It believe I wired everything correctly but when I map the controller manually in Ableton and test out the slider, it has a very jumpy rise. Like moving the knob a centimeter would make the volume jump from the bottom and red line. But when I test the same thing on the rotary pot, it has a very smooth rise and fall. Why is this? I can't figure it out and I don't think I burned the pots because I was very careful when soldering and testing the resistance every time. Help please!

I had this issue and that was because how we should wire it and how the resistors are labelled are different ( and sometimes wrong) so just swap where the wires are going on the slide pot until it works :)

Thats how I fixed it haha

One of your pots might be logarythmic, and the other is probably linear. They have different resistance curves. Otherwise, the slider might have dirty contacts.

The pot is linear so how do i fix a dirty contact? or should i replace?

AssAulterPT3 years ago
Hi, i'm using only 12 buttons. Do I need to change the code or can i still use the same?

And, on Serial MIDI Converter, the TX doesn't flash green. What's happening
Do you have any idea?
Hey dude/Dudette
No you dont need to change the code in any way!!
Thats whats so awesome about his code, it is fluid.. meaning you can have as many or as little as you feel you want!! with in reason :)

As for the midi problem, do you have midi yoke installed??
If not, look up "MIDI Yoke" on google, download and install
That is most likely your problem!!!

Get back to me if it works or not!!
Cheers, hope it helps!!!
:)

Hi everyone;

I have the same problem. The Tx doesn't flash green on the Serial_midi program. Only the Rx. However on my Arduino board The Tx is flashing but not the Rx. Thats very strange.

I didn't installed the Midi Yoke because i'm on Mac. So i'm using the IAC driver.

Also, i build my board with Arduino Uno. Could it be the reason why the code doesn't work?

Please help me guys!

Its been like 2 years since I've had a crack at this hahaha So I doubt I can help but I'll try

I occasionally encountered this problem and I fixed it by re flashing the software and making sure all of the connections work well"

Like literally re-flashing the software fixes alot of bugs for me from when I was using it; otherwise maybe look for an updated tutorial?

Good luck :)

Hey, i have the same TX problem !? Have you been able to fix it?

cadogan3028 months ago

Nice setup. Just wondering how would i go about making this with an arduino Mega 2560? Do i have to change a lot of the code? What digital inputs do i use?I want to be able to hook it up to my old organ instead of using the push buttons(each key has the 2 wires so i think that should work)This project comes closer than anything i have seen for what i need it for :)

yuriyabi8 months ago

I have built a similar midi controller with an atari joystick, pots and 5 toggle switches on Digital pin 3-7. The problem is that when using them to turn effects on in Ableton I flip up to turn the effect on, but have to flip down and up again to turn the effect off. What I want is to turn the toggle switch on/up to turn an effect on and turn the button off/down to turn the effect off. How can I change the code to work like this with my switches? Thanks for your help!

2014-11-20 20.53.43.jpg
swoephowx9 months ago

where is the code?

davelanda9 months ago

Good job !! could you share me your code please? david_spow@hotmail.com

What program are you using? And do you have any videos with screenshots? While this instructable may not be the place for it, I was curious about what technique you're using between the controller and the program to create the demo video.

Leonardo Paiva10 months ago

what if we want use rotary encoders? i`m trying to change the code a little for make it capable of using some infinite scrolling, but didn't worked. Any clues?

Hey what if I wanted more sliders and knobs and less buttons? Thanks!

pj.jones.589512 months ago

I can't seem to be able to find the correct sized enclosure. If anyone has a working URL that would be helpful. Thank you.

ALoGeNo made it!1 year ago

Hi! , I did it!, this is working with ARDUINO LEONARDO, to do works just add:

#define serial serial1

Also you must have the code clean of errors.

Cheers and thank you for this great project.

IMG_20140213_202145.jpg
Taha99 ALoGeNo1 year ago

alegeno did you change the connections to or just the code , and did you add more inputs.

where do you buy the 10k linear sliding potentiometer?
Mudo1 year ago

Any chance to implement midi without usb? I need it to talk with my old gear with my old 168/328 arduino board…

Good work!

nnugroho1 year ago

none of my buttons work... hmm... my potentiometers and sliders work just fine.. each time i checked the midi signal (using MidiPipe) the buttons only recognized as a random midi signal. Also as i open up the Arduino console, my computer pick up so many random noise. I'm happy already by just using the slider for the crossfader in my DJ software :D :D

eatyone3 years ago
Many thanks for this great tutorial. My question: Do you think we can mix your code with the HIDUINO project and using midi.h instead of serial com, to transform our Arduino uno and Mega as UsbMidi devices?
1-40 of 344Next »