The Arduino I/O board is becoming the board of choice for building DIY electronics projects cheaply and easily. It’s affordable, it’s flexible, it’s open source (and has a growing community to help you out), and evolving nicely. Naturally, one of the first things we want to do with it is build some cool music electronics projects. Todbot has been doing a terrific series of tutorials for his “Spooky Arduino” class, and in the latest installment, turns to drum triggers and MIDI:
Spooky Arduino Projects #4 – Musical Arduino [todbot blog]
Be sure to check out the full class notes and PDFs; they’r really helpful if you’re getting started with Arduino (in addition to what’s on the Arduino site, of course)
Now, before a bunch of CDM readers chime in, I know we have some true connoisseurs of drum triggers, so let’s assume this is a beginner DIY project rather than a way to make a full-featured drum project. (As such, though, it looks like a great way to get started.)
But what’s also nice here is that the tutorial explains how to use the Arduino as a MIDI interface, with links to further resources. You need physical MIDI DIN connectors, and you need to format your messages properly (remembering that MIDI really is a serial protocol):
… to implement a MIDI interface, all you really need is the ability to send serial data at 31,250 bps. This is easily done with ÃƒÂ¢Ã¢â€šÂ¬Ã…“Serial.begin(31250)ÃƒÂ¢Ã¢â€šÂ¬Ã…“. Once that is done, a complete three-byte MIDI note-on message can be sent with three ÃƒÂ¢Ã¢â€šÂ¬Ã…“Serial.print(val,BYTE)ÃƒÂ¢Ã¢â€šÂ¬Ã‚? commands.
I still like the MIDIsense as a plug-and-play DIY MIDI solution, especially with new Windows software and more I/O on the way. But the Arduino works well for MIDI in situations when boards like the MIDIsense won’t do. (And if you’ve got a few projects going, you might wind up with both on your workbench.)
MIDI Over USB?
Andy Bennett, aka SteamSHIFT wonders if it’s possible to send MIDI messages over USB, as you would with another MIDI device. Certainly, you can send the messages; see the example above. The problem as I see it is that the current Arduino drivers map the board as a serial port, and most music software doesn’t recognize serial device inputs as MIDI devices without additional drivers. It seems like you might have to write a USB MIDI driver for the board. But I’m not sure; I haven’t done anything like this. Anyone with some insight? (Here is the point where I expect someone to correct me on something I said that turns out to be wrong.)