How to make a MIDI controller?

Status
Not open for further replies.
Hello,

I've been thinking of making a MIDI controller like the MIDI Fighter but don't know where to start. I would like to have the finished product to have the arcade buttons. I have the benefit of using my school's workshop so I can use the soldering stations and materials that are available.

I would fist like to say that I am a complete beginner of microprocessors and have not come around to them until I wanted to start on this project.
I started by asking for help on Reddit on how to make one of these MIDI controllers for myself instead of buying it for twice or three times the price. After reading and responding to the replies a lot of them mentioned starting the project using a Teensy... To me it is like an Arduino but ready to send MIDI signals right off the bat? I have no experience in electronics, all I have seen are projects such as this and a Teensy that I can afford. I would also like to make this box plug-and-play through USB.

Thanks in advance.
 
First, if your main motivation to do this project is merely saving money, I think you should really investigate the many hidden costs. Especially when it comes to fabricating some sort of enclosure, adding nice buttons, and physical construction, it's easy for a DIY project to turn out more expensive than a mass-market product.

Usually learning, making something special or custom that you can't buy, or just the fun of building are good reasons to go the DIY route. Who knows, maybe you can save money, but if that's your main motivation, consider the hidden costs before you start.

As a starting point, I'd recommend you download and install Arduino and Teensyduino. Even if you don't have any hardware yet, you can open examples, like File > Examples > Teensy > USB_MIDI > Buttons. Please read that code. It has lots of comments to explain how things work. If you can more or less understand that, I'd say you're good to move forward. If that example looks horribly complex or far more than you want to learn, you might reconsider whether to start this project.

There are a lot of people who've made awesome MIDI controllers. I'm sure you'll find several if you search for older conversations on this forum. A lot of the hardware questions involve trying to connect HUGE numbers of inputs to the relatively small number of pins. As you can see in that example code, things are pretty simple if you connect 1 thing per pin.
 
First, if your main motivation to do this project is merely saving money, I think you should really investigate the many hidden costs. Especially when it comes to fabricating some sort of enclosure, adding nice buttons, and physical construction, it's easy for a DIY project to turn out more expensive than a mass-market product.

Usually learning, making something special or custom that you can't buy, or just the fun of building are good reasons to go the DIY route. Who knows, maybe you can save money, but if that's your main motivation, consider the hidden costs before you start.

As a starting point, I'd recommend you download and install Arduino and Teensyduino. Even if you don't have any hardware yet, you can open examples, like File > Examples > Teensy > USB_MIDI > Buttons. Please read that code. It has lots of comments to explain how things work. If you can more or less understand that, I'd say you're good to move forward. If that example looks horribly complex or far more than you want to learn, you might reconsider whether to start this project.

There are a lot of people who've made awesome MIDI controllers. I'm sure you'll find several if you search for older conversations on this forum. A lot of the hardware questions involve trying to connect HUGE numbers of inputs to the relatively small number of pins. As you can see in that example code, things are pretty simple if you connect 1 thing per pin.

I understand most of it as I started programming in Java recently which helps... I think the stuff I don't understand can be quickly taught to me. I can use spare materials and resources in my school to make the box to put everything inside. The only option to buy the electronics are ebay for the moment. I have found this for the time being: http://www.ebay.co.uk/itm/Adafruit-...841?pt=LH_DefaultDomain_3&hash=item2593d1fa71
 
Paul's advice is sage.

But if you want to jump in let me help you with button selection etc.

To make it all talk midi is DEAD EASY with teensy.

It's the hardware which is "hardest".

You can do it, but you can probably buy a MIDI fighter spectra for the same outlay. So you need to ask the question: do you want the satisfaction of DIY? It will be hard work, particularly if you want rgb illumination.
 
Last edited:
Paul's advice is sage.

But if you want to jump in let me help you with button selection etc.

To make it all talk midi is DEAD EASY with teensy.

It's the hardware which is "hardest".

You can do it, but you can probably buy a MIDI fighter spectra for the same outlay. So you need to ask the question: do you want the satisfaction of DIY? It will be hard work, particularly if you want rgb illumination.

I still haven't got a full list with all the parts I need but I would still think that it would cost less than £150...
 
When costing a project don't forget time, including that to learn everything you need before starting. If you have plenty of it and it's a learning project then assign it a low value, if you are working full time with a family and are starting this because you want a midi controller on a deadline then you need assign it a high value before making the call.

Many things can be made better and cheaper and with more fun DIY. What those are depend on your skill, interests and most importantly - needs.
 
Hi there and welcome on the Teensy forum!

I'd like to give my few pennies to the discussion: first of all, I really encourage trying the DIY way of living. The satisfaction of building something that's just like you wanted it is priceless. A MIDI controller also is not an hard project, even for a beginner in hardware and electronics design. I mean, in the end that's just some buttons or knobs that trigger some commands.

The idea behind that is pretty simple:
to know the value of a knob (read: potentiometer, or variable resistor), you use ANALOG inputs on the Teensy
to get the status of a button (ON/OFF) you can use DIGITAL inputs; I'll avoid the third option which is velocity- and pressure-sensitive keys, since you want to implement a MIDI fighter-like controller.

You connect a bunch of potentiometers to analog inputs, a bunch of buttons to digital inputs, read all the inputs and trigger MIDI events accordingly.

If you run out of pins, but you need MOOOOAR then you can use a very neat piece of electronic wonder: the Multiplexer! It's an IC that practically lets you use fewer pins to control more inputs.

In numbers, on the electronic side the cost is pretty low; although you might keep an eye on side-costs, like enclosures, nice looking arcade buttons, etc. So keep an eye on that.

Finally, not to let you down, but to have an easily configurable MIDI controller, and I mean a controller in which you can assign notes/commands to buttons/knobs on the fly, you will have some code to write, not only for the teensy, but also for an application that runs on your PC, like a control panel or something.
That's a different story: it won't cost you any money, but may cost you a lot of time coding.

But if you have time to spend learning, just go for it ;) you won't be disappointed, and people here is always helpful.

Cheers
 
But if you want to jump in let me help you with button selection etc.

I would love to hear some advice on button hardware.

What I really want is that silicone stuff that stuff like the Traktor Kontrol has. (no they aren't doing the contact thing, they have a nice clicky feeling due to the tacticle switches on the pcb... http://4.bp.blogspot.com/-F7pQKpxqX...A3M/6AQLvjJnIrw/s1600/IMG_20130223_102330.jpg IMG_20130223_102330.jpg

I have searched for a while and the only resource I found was on alibaba (and I don't need 6000 of them though!)
http://www.alibaba.com/product-detail/White-silicone-single-button_1901104849.html
http://www.alibaba.com/product-detail/custom-silicone-rubber-push-button_716033092.html

I recently ordered some of these http://www.aliexpress.com/item/Free...12X7-0-4-pin-DIP-Through-Hole/1722780267.html (not from that specific seller but exact same product) which are cute and nice but I run into the classic problem of how the hell do I mount them? (I can do a PCB right up to the case which may be the way, or make a transparent cover with a 3d printer to actuate them (small edge that bends enough to press them - like some front panels on stereos use)

this is another option for those cheap tact switches http://www.aliexpress.com/store/pro...Series-Tact-Switch-6-6/331295_1415990053.html

The one part I have been unable to track down is a smooth encoder (all the ones I have found have that click which is useful for emulating knobs/pots) - searching for optical encoder only turns up industrial stuff.
 
Hi there and welcome on the Teensy forum!

I'd like to give my few pennies to the discussion: first of all, I really encourage trying the DIY way of living. The satisfaction of building something that's just like you wanted it is priceless. A MIDI controller also is not an hard project, even for a beginner in hardware and electronics design. I mean, in the end that's just some buttons or knobs that trigger some commands.

The idea behind that is pretty simple:
to know the value of a knob (read: potentiometer, or variable resistor), you use ANALOG inputs on the Teensy
to get the status of a button (ON/OFF) you can use DIGITAL inputs; I'll avoid the third option which is velocity- and pressure-sensitive keys, since you want to implement a MIDI fighter-like controller.

You connect a bunch of potentiometers to analog inputs, a bunch of buttons to digital inputs, read all the inputs and trigger MIDI events accordingly.

If you run out of pins, but you need MOOOOAR then you can use a very neat piece of electronic wonder: the Multiplexer! It's an IC that practically lets you use fewer pins to control more inputs.

In numbers, on the electronic side the cost is pretty low; although you might keep an eye on side-costs, like enclosures, nice looking arcade buttons, etc. So keep an eye on that.

Finally, not to let you down, but to have an easily configurable MIDI controller, and I mean a controller in which you can assign notes/commands to buttons/knobs on the fly, you will have some code to write, not only for the teensy, but also for an application that runs on your PC, like a control panel or something.
That's a different story: it won't cost you any money, but may cost you a lot of time coding.

But if you have time to spend learning, just go for it ;) you won't be disappointed, and people here is always helpful.

Cheers

Thanks for the info, but the problem is now that I don't know where to start.
 
Well as a place to begin I'd say, first get your head around Arduino, C programing and Teensy. unsure how much of this you already know but starting from scratch

My suggested starting places for 'how do I do that' would be:
https://learn.adafruit.com/category/learn-arduino
https://learn.sparkfun.com/tutorials/tags/arduino
there is also the reference web link found in the arduino help

If you are really new to this stuff it may help to buy or borrow and Arduino Uno since that will remove some potential complications but all the tutorials can also be completed with a Teensy3. Key item is with Teensy3 you MUST set pinMode(pinNumber,INPUT); for analogRead(pinNumber) or digitalRead(pinNumber); to work, which the example code does not do.

There is a lot of things you can do with Arduino and listed in those links but to cut them down to the things you really must to get your head around for this project and suggest actually step through would be
https://learn.adafruit.com/lesson-0-getting-started note in your case you will be selecting teensy 3.1 @ 48mhz and later selecting USB midi
https://learn.adafruit.com/adafruit-arduino-lesson-1-blink
https://learn.adafruit.com/adafruit-arduino-lesson-2-leds
https://learn.adafruit.com/adafruit-arduino-lesson-5-the-serial-monitor Serial monitor will be your friend when you start working on the MIDI part of things, make sure you sort out print vs write
https://learn.adafruit.com/adafruit-arduino-lesson-6-digital-inputs
https://learn.adafruit.com/adafruit-arduino-lesson-8-analog-inputs

https://learn.adafruit.com/multi-tasking-the-arduino-part-1

The Teensy specific examples and help start at:
https://www.pjrc.com/teensy/tutorial.html
and include
https://www.pjrc.com/teensy/tutorial3.html

but assume a degree of knowledge, hence why I linked to those earlier examples.

Once you can make a teensy do stuff it's onto the actual meaty part
https://www.pjrc.com/teensy/td_midi.html

or look at:
examples->teensy->usbmidi-> buttons
With Teensy in a bread board wire up four buttons to teensy inputs 0 through 3. These need to be connected so that when pressed they ground the input since the pullups are set make them active high. Then get your receive side working seeing those four sends. Once that's going you can flesh out the buttons to however many will usefully fit on your protype (example takes up to 12, suggested four to start to reduce wiring tangle).

Then you need to start on the sequencer part which will involve storing previous buttons states in an array and life will get truly interesting!

Once all is working there it's time to start the physical design and that's a whole nother post.
 
but the problem is now that I don't know where to start.

Well, did you download Arduino and Teensyduino, and then open the example with File > Examples > Teensy > USB_MIDI > Buttons?

That is the place to start.

You can even do all that and at least read the example code without buying anything. Of course, to actually run it you'll need a real Teensy, but you can first just look at the code and see if it makes any sense. If it's not clear, perhaps your next question could mention whatever specific part you're having trouble understanding.....
 
Last edited:
Re button hardware nothing will be more tactile and feel nicer than Sanwa arcade buttons.

They do a lovely little small one I bought accidentally, it's only about 2.5 cm across
 
Last edited:
Well, did you download Arduino and Teensyduino, and then open the example with File > Examples > Teensy > USB_MIDI > Buttons?

That is the place to start.

You can even do all that and at least read the example code without buying anything. Of course, to actually run it you'll need a real Teensy, but you can first just look at the code and see if it makes any sense. If it's not clear, perhaps your next question could mention whatever specific part you're having trouble understanding.....

Yes I have tried this and found the code in that program understandable but I really didnt get some of the stuff which I think is easily teachable such as whatever "pinmode" means...
 
OK, I'm actually at a computer now; I'm on my holidays! =D

Those tactile switches are all very well for play/start/stop etc. but they're not going to be much good if any for drum machines, or midi-fighter style usage.

They also complicate your world, with PCB requirements.

If you aren't into backlighting then these are my recommendation:
Option 1)
http://www.arcadeworlduk.com/products/Sanwa-OBSC-24-C-Arcade-Button.html

This is the small 24mm version. IF you want a full size arcade button they have a matching 30mm version instead. This is the type of button used by MIDI fighter, as far as I know (albeit they use the flat profile, so replace "C with "F" and use 30mm of course).

For the midi fighter they created a PCB to solder these terminals directly onto. This also gave them the opportunity to place RGB LEDs on the PCB so that they shine through the button casing, affording backlighting. Of course you'll need the clear button for that.

Option 2)
Alternatively you could use another button type (30mm) which has plug in LEDs in the back (which is what i did) but you'll find they are very deep, and you'll need to get Cherry D44x microswitches to get a nice light action (and remove the springs!!). Those are not RGB, typically. They are easier to wire up because you don't need a custom PCB, and all the connections are spade end, which was the attraction for me.

Option 3)
is any kind of 30mm clear button with an "Angel eyes" style backlight but this will be an expensive approach. I nearly choked on my corn flakes when i saw how much they were!

Personally, if I was to start over, I'd go for option 1, building my own custom PCB with RGB LEDs and a piezo sensor directly under each button for velocity detection. I'd use 30mm ones for the 16 drum pads and 24mm for the transport buttons.

I was really disappointed wit hthe mini-buttons I bought and I've been looking all over for tactile buttons like the ones you propose, which are panel mounted. So far i've come up empty :(
 
Last edited:
Oh and one more thing, re: rotary encoders, you can actually pry open a rotary encoder and remove the detents, which are the mechanical nubs which give it the steps in rotation. Once removed they will run smoothly.

I bought a bunch of encoders with detents from china and the mechanical detents don't match with the gray code reliably, so sometimes one detent jumps 2 steps for example - just be aware if you doever need to use one with detents that this can be an issue. I bought a replacement from Adafruit in the hope that they've selected an encoder which spits out gray code to match the detents but I havent tested it yet. I'll be removing the detents from the rest because they are useless as they are :)

But you'd be better off finding an encoder supplied without the detents. You can find them on Ali baba described as "no detent", or mouser have a fair few to choose from:
http://uk.mouser.com/ProductDetail/Bourns/PEC09-2025K-N0015/?qs=sGAEpiMZZMsWp46O%252bq11WRXHHEZNdVJJi5wXdfd8Kgg%3d
 
I'm not really interested in a midifighter style thing. (maybe some day but I have MPD 26 for that sorta stuff) so having a real tactile fast action style controller is not what i'm looking for. The buttons I want would be for stuff like a step drum machine, toggling ARP on/off, toggling FX, etc (if I can get enough that I like cheaply, a matrix style controller would be real nice). Basically pressed at the same rate that transport controls are pressed - this isn't for 'live' usage like a midi fighter or MPC clone would be.

Other issue is the arcade push buttons are too large and too sensitive - it's easy to accidentally hit one (I have lots of experience with them playing fighting games)

Buttons over toggle switches, like encoders serve the purpose that I can control multiple virtual instruments without having the settings get out of wack.

(and thanks for the 'no detent' that's exactly the keyword I was looking for!)
 
I'm not really interested in a midifighter style thing.
I got you confused with the OP, who is.

The buttons I want would be for stuff like a step drum machine, toggling ARP on/off, toggling FX, etc (if I can get enough that I like cheaply, a matrix style controller would be real nice). Basically pressed at the same rate that transport controls are pressed - this isn't for 'live' usage like a midi fighter or MPC clone would be.

OK - a bit out of my field of knowledge then. Cast your eye over the Adafruit Trellis or its larger, more flexible RGB cousin from Sparkfun. It's not tactile in that way though, they feel like TV remote buttons.

But they'd work out of the box, if a grid system is what you are after. I can't see a way for the LEDs and a tacile button to live under those buttons, having built this with the trellis:
https://www.youtube.com/watch?v=a-elzPv6dpU
 
yikes that's expensive and not quite what i'm after.


But they'd work out of the box, if a grid system is what you are after. I can't see a way for the LEDs and a tacile button to live under those buttons, having built this with the trellis:
https://www.youtube.com/watch?v=a-elzPv6dpU

With the traktor kontrol x1, they use those normal tiny tactile push buttons, with a SMD led and the silicone pad actuates it. They actually work rather well (you can't do live drums but you get the nice clicky feeling with the transparent silicone cap)

Know a source for http://www.adafruit.com/products/1611 That's a pretty nutty price for rubber silicone. Only place I found was on alibaba ( http://www.alibaba.com/product-detail/custom-silicone-rubber-push-button_716033092.html ) and I don't need 6000 of em.
 
If you go to the sparkfun website, find their (larger ) version, it has a manufacturers data sheet, telling you who makes them.

But they aren't going to sell you 2 or 3.
 
I was hoping to find a seller on aliexpress.

6000 is only 420 which isn't all that crazy. If I can get a sample of them and they are acceptable I might be willing to eat that cost and try and get rid of the rest myself on ebay or my local hacker space.
 
I still haven't got a full list with all the parts I need but I would still think that it would cost less than £150...

Word of warning, I thought that too.

Having now ordered replacement microswitches and numerous tools to do the job, then lost bits, then bought them again (rubber feet! and flux pens!) it all adds up.

By the time i've finished my MPC project I could probably have bought a second hand MPC.
 
Status
Not open for further replies.
Back
Top