Since a long time I’ve been somewhat frustrated with how difficult it is to use MIDI with Arduino-based devices when connecting them to a computer by USB. If the ‘duino implements the MIDI protocol, basically I want to be able to set it up as a MIDI device to communicate more or less directly with other MIDI based software on my laptop. But because the FTDI USB drivers present the Arduino as a serial device, and there seem to be no utilities available to convert serial to and from MIDI, this has been quite impossible.
Well, no longer so. I’ve written a small command-line utility which connects a MIDI device to a serial port. Furthermore it lets you connect using non-standard serial speeds such as the MIDI standard of 31250 baud.
-p FILE set serial device
-s NUM set serial speed
-v print messages sent/received over serial
-l list MIDI input/output devices
-i NUM set MIDI input device
-o NUM set MIDI output device
-c NAME create MIDI input/output device
-h or --help print this usage information
This is actually extremely useful for MIDI DIY-ing. If you wire up a DIN plug to the Arduino you’ve got an instant MIDI out port (see for example Todbot’s Spooky project), but since MIDI runs on 31250 baud you are out of luck with USB – most applications, including the Arduino IDE and Processing, only accept standard serial speeds, and MIDI applications still don’t do serial.
The utility is written using POSIX termios for serial comms, and the cross-platform JUCE library for MIDI, and should compile on Linux and Windows as well as Mac OS X. I’ll try to make a Linux build available soon. It should work fine with any serial connection, not just Arduinos.
Ah, so while writing this I’ve made the inevitable discovery that someone’s beaten me to it – in fact there seem to be several utilities doing pretty much the same thing listed at arduino.cc. Well there doesn’t seem to be a Mac version around so maybe there’s room for another.
Another discovery I’ve just made is that cvs.pingdynasty.com is, um, not showing up the project, or anything else for that matter. I’d better get on that, then. In the meantime, get the source code from here, and a Mac OS X 10.6 i386 binary here.