Electronic – Implementing a class-compliant USB MIDI device


I'm building a device that I want to communicate with a computer using MIDI over a USB connection. There are lots of USB MIDI devices that are class-compliant and thus require no special drivers, which is exactly what I want.

I was hoping that I could use a microcontroller with hardware USB (e.g., MSP430) or a FTDI-style serial-to-USB chip to do this, but it seems like none of them support setting the device descriptors to identify as a MIDI device. So how can I accomplish this? Do I need a dedicated USB controller MCU?

I have only a fractured understanding of USB, but I've tried to read the USB MIDI spec.

I'm aware of serial-to-MIDI converter software, but it's not what I'm looking for here.

Best Answer

There is no chip that would support USB MIDI in hardware (except the QinHeng CH345, which is buggy, and the MFM0860, which also is buggy).

You can use any general-purpose USB microcontroller for USB MIDI. However, you have to write all of the firmware yourself, or modify the software for some existing protocol (like CDC).

In the case of the MSP430, you would not be able to use the Descriptor Tool but had to construct the descriptors by hand.

There are also several open-source USB MIDI implementations for 8051-based microcontrollers; and the LUFA library for AVR and NXP chips. Cypress has a USB MIDI library for their PSoC chips.

If your device is generating the MIDI commands (as opposed to receiving MIDI data from somewhere else), you do not need to parse the MIDI stream to convert it into USB MIDI event packets, and your implementation becomes easier.