DIY MIDI Controller

Posted on

Step-by-step instructions for how I built my own MIDI controller

Omega Audio engineer Adam Stamper at the consoleI’m an audio engineer for Omega Studios, as well as an instructor for the audio production school. I like to discover new ways to create the sound I want and I encourage my students to do the same. This past summer I decided to build my own MIDI controller as a little personal side project. There were a couple of features I had been wanting in a MIDI controller for years now, but could never quite find so building my own seemed like a logical solution. First off I’d like to say that I am no electronics wizard. I have the basic concepts of electronics down and can solder well enough, but building a MIDI controller from scratch is probably outside of my abilities.

So, I did some research on DIY MIDI controllers and found a product that would make the whole process a little easier. Livid Instruments (based in Austin, Texas) has been creating custom control surfaces and quality MIDI controllers since 2004. They also happen to carry a line of DIY MIDI products. Perfect! The two core products in their DIY product line are the Brain and Brain Jr.  Both products have a number of digital connections (for on/off controls like buttons and switches), a number of analog connections (for variable resistance controls like potentiometers, faders, and sensors), a number of LED connections (for lights of course), and a USB connection (for computer communication). The Brain Jr. is less expensive because it has less connections for controls and no direct MIDI connections (only MIDI over USB), but for my purposes it fit the bill just fine. The Brain Jr. was also smaller and was easier to fit into the size of enclosure I was going for.

Livid Instruments Brain Jr.

LIVID INSTRUMENTS BRAIN JR.

Now that I had a “brain” for my controller it was time to start ordering all the other parts I would need. I knew I wanted to have some buttons, and buttons that light up are always better than buttons that don’t, so I found some LED lit momentary buttons online. Momentary means the buttons are non-latching and will return to their original state (on/off) when released.  Buttons can be found in normally open and normally closed configurations. Normally open means the connection between the two terminals on the button is open (or not connected) when the button is up, and closed (connected) when pressed down. Normally closed would be the opposite; up is closed, down is open. Thanks to Livid Instruments the Brain Jr. can use either type as each button’s on/off state can be inverted from within the companion software.  I went with normally open buttons because that made more sense in this case and would probably work better in future projects if I had extras.

16mm Illuminated Pushbutton

16MM ILLUMINATED PUSHBUTTON FROM ADAFRUIT.COM

Of course I wanted to have some knobs on my MIDI controller, and sense knobs are only useful if they are connected to potentiometers, so I also needed those. The Brain Jr. isn’t too picky when it comes to potentiometer values, but they recommend values between 10k-100k for best results, so I stayed in that range. I generally use electronics surplus sites for this sort of thing because they save me a lot of money (All Electronics and Electronics Goldmine are two examples).  Knobs come in various mounting styles. Some use set screws and mount to smooth rounded shafts, some required knurled shafts, and some require a flatted or “half-moon” shafts.  All require a specific diameter of shaft. I tend to find the knobs I like first, because that’s all you’ll really see in the finished product, and then I find potentiometers with the proper shafts.  Potentiometers (or pots for short) also come in various mounting styles. For this project panel mounted pots were going to be the best solution.

Knobs and buttons are cool, but what MIDI controller doesn’t have those. I wanted joysticks too!  Joysticks come in two main categories, analog and digital. Analog joysticks are basically just two potentiometers (one on the X-axis and one on the Y-axis) and this makes them fully variable.  Digital joysticks are constructed from a series of switches like the joypad on an old Nintendo controller (one switch for up, one for down, one for left, and one for right).  The Brain can use either, but each has it’s benefits and prefered uses. For my purposes the analog option would be best and is usually more expensive. After much Googling and some frustration on not wanting to spend over a hundred dollars on two joysticks, I finally found two surplus analog joysticks that were salvaged from old RC remotes. These were great because the X-axis springs back to center and the Y-axis ratchets up and down. Both those features could also be removed if needed.

Salvaged RC remote joystick

SALVAGED RC REMOTE JOYSTICK FROM EBAY.COM

As a final more unique feature I wanted some sort of non-contact or Theremin like controls. I already had an assortment of photoresistors, which vary their resistance based on the amount of light that hits them. I could vary the light by moving my hand in front of them, but this isn’t exactly like a Theremin as it’s not a function of distance. I did find some cheapo IR distance sensors that utilized an infrared transmitter and an infrared receiver to sense distance and in turn varied their resistance. I ordered those to experiment with.

Photoresistors

PHOTORESISTORS

Finally I needed something to put all this in. This is known as a project enclosure in the electronics world. I could either salvage a box from something else, build a box from scratch, or order a pre-made blank enclosure. I played with all these options, but eventually found a reasonably priced enclosure online. Enclosures come in all sorts of shapes and materials. I needed something larger than the popular guitar pedal sized enclosures, but smaller than your average MIDI controller. I also wanted something plastic because it’s much easier to work with when it comes time to cut mounting holes.

Serpac 17-S Sloped Project Box

Serpac 17-S Sloped Project Box from iProjectBox.com

(I ordered mine in Black)

Once I had all the parts in I began testing. The free software required for programming the Brain Jr. includes tools for testing the functionality of each component. I connected some of my buttons and tested those, I tested my pots and joysticks, and I experimented with various photoresistors to find the right values. Unfortunately different values of photoresistors are going to work in different lighting conditions. To make mine more flexible I choose a more sensitive photoresistor and wired a potentiometer in series that could act as a trim knob.  That way I could adjust the sensor to different lighting conditions. I experimented with various potentiometer values until I found the best fit for the job. I also tested the IR distance sensors I had ordered, but unfortunately they produced too much noise in the circuit and this in turn made their output values unstable.

The last feature I had been wanting in a MIDI controller for years. For lack of a universal term I call this feature a potentiometer bank. The idea is to have multiple pots that can each be set to different values and then switches or buttons can be used to activate each of those values. All the pots would be associated with the same MIDI Control Change # and the idea would be to toggle between various preset values for that one CC#. Imagine this CC# was mapped to the LFO rate in a soft synth. You could set one pot in the bank to a 1/2 note rate, one pot to a 1/4 note rate, and so on. Then you could quickly jump between these different LFO rates by activating the various pots. For this feature all I needed was some pots and some DPDT switches, which I already had on hand.

Now that everything was tested and I knew what was going in the box, I needed to design a layout for all the controls. I created an image file in Photoshop and sized it to the exact size of my enclosure. I then created a new layer for each part using pictures or rough drawings and sized those to scale. Now I could move all these pieces around and visually see what the final product would roughly look like. I had to be careful to measure and account for not just the visible portion of each component, but also the portion that’s hidden inside the box, which is often larger. I then printed the photoshop image as a guide and traced out the placement for the mounting holes. I then used my dremel tool and some small files to cut and fine tune all the mounting holes. I’m sure there are more professional techniques for this (CAD for example), but this worked well enough for me and I already had Photoshop and knew how to use it anyway.

Next I mounted all the components to the front panel of my enclosure and began soldering wires to all the appropriate leads.  The other end of the wires all went into the Brain Jr. which has terminal connections that do not require soldering (just the right gauge wire or male end jumpers).  With this I was sure to take my time and double check each connection on the Brain Jr. as I go.  It was also helpful that I planned ahead and measured out the proper lengths of wire for each component to reach the circuit board.

Making Connections

Adam Stamper, Making Connections

Once connections were complete I made sure to test everything in the Brain Jr. software before closing up the enclosure. By the way all those wires made closing this thing a little tricky, but with a little patience and some careful routing of the wires the enclosure buttoned up just fine.  I printed a little front panel graphic on some high quality photo paper and here’s the finished product.

Completed MIDI Controller

COMPLETED MIDI CONTROLLER

This was a fun and fulfilling project for me and produced something I can use for years to come. I enocurage my students in the audio production school to experiment in this way all the time.

Creating your own MIDI controller isn’t as difficult as you might think and can result in new and inspiring ways of interacting with your MIDI devices.  Start by researching what others have done with their DIY MIDI controllers and then start imagining your own.

Leave a Reply