In the last couple of years I’ve become aware of the huge boom in DIY music equipment. The internet provides a massive (and free!) repository of interesting and inspiring projects to try. A great many of these projects are built on the Arduino platform, an open-source board which will do pretty much whatever you program it to. Not being a coder by any stretch of the imagination, I had wondered whether or not I’d have the skills to make anything useful using an Arduino. It turned out my fears were unnecessary- this project can be realised by a total novice.
I was looking to get a small midi controller, but found myself frustrated by the fact that most of the smaller, cheaper ones were USB only. Fair enough – there are issues with the amount of space to fit a MIDI port on a small controller, and they are marketed mainly at computer musicians. However, a bit of googling led me to this discussion on a V-Guitar forum, which suggested that using a USB Host shield and an Arduino could translate USB Midi to a ‘regular’ 5-pin Midi output, as well as providing power to the controller itself. So I took the plunge and ordered the two boards. Total cost was around £21, so even if it didn’t work, I hadn’t spent a bomb.
MAKING IT WORK:
Now- important disclaimer: I am not the author of any of the code here, the credit must firstly go to Collin Cunningham for writing the code (way back in 2010). Yuuichi Akagawa’s updates on Github made it possible to use multiple devices via USB Hub (more on that later), and “Spider” over on the V-Guitar forums provided the invaluable step by step guide to making it work. This is the beauty of open-source and the internet, and really the point of this post: anyone can get the info and do-it-themselves!
The picture below shows what I ended up with (click for larger version)
As per Spider’s instructions, the TX port of the Arduino shield connects up to the Midi out socket, with a 220 ohm resistor inbetween, along with the ground and 5V pins. The small piece of breadboard holds a 6N137 optocoupler for the Midi input. This, it later turned out, was unnecessary. My advice would be to stick to a one-way conversion- USB Midi in to hardware midi out, but more on that later.
So far so good. While I was at home over Christmas, my Dad offered to case the thing up (having a much better selection of tools, not to mention a lot more practical skill!). The resulting device is not much bigger than two packs of playing cards.
Here you can see it at home in a portable synthesizer rig I constructed over the Christmas break. This is completely standalone from any sort of computer, and runs off just two plug sockets. The little Akai keyboard (MPK Mini mk1) is great for this setup, as it has different presets which allow you to switch between controlling the two synthesizers- each of which is set to a different midi channel. In the example shown, the Mutable Instruments Midipal provides a midi clock for both instruments, but I did try it out as a channel splitter, which enabled the entire thing to be played as a 4 voice synth (albeit with a very cramped keyboard!).
THERE’S ALWAYS A BUT:
So the converter works, and works well. It runs quite happily on USB bus power, any generic USB plug adaptor that you might get with a mobile phone, or a 9v DC supply. However there are a couple of things that it currently won’t do.
You can’t currently convert midi from your computer to hardware midi using this device. The way I see it- it isn’t designed for that. It acts in place of a computer in hosting the USB device, and is therefore more suitable for stand-alone operations.
I failed to get the hardware midi in port to work at all. The biderctional_converter (sic) example specified in Spider’s guide would not compile, no matter what I tried. This may just be an issue with my particular computer, and I’m hopeful that at some point in the future a modified code will appear. The beauty of the Arduino platform is that it’s so easy to change the program running on the chip, so this isn’t a dealbreaker. I now think of the midi in port as ‘for future expansion’!
I did however test running multiple USB inputs via a generic (unpowered) USB hub. This worked fine with two USB devices, and I couldn’t make it “choke” by sending multiple CCs. Adding more than two devices may be possible, but I was unable to test it out.
Thanks to the generosity of technically-minded folks such as those mentioned above, it’s easier than ever to get into DIY projects like the one detailed here. For such a minimal amount of money, I’m really pleased with this little black box. The fact that it runs on an open source platform means that it’s endlessly customisable (with the right code, of course). For a first time toe-dipper in the world of Arduino, it’s extremely encouraging. In the words of Alec Baldwin: “Go and do likewise, gents*!”
*and ladies, Alec.