USB MIDI interfaces - dwhinham/mt32-pi GitHub Wiki

USB MIDI interfaces are commonly used to send and receive MIDI data from a modern PC. You can also use a USB MIDI interface to receive data on mt32-pi.

Additionally, many USB MIDI controller keyboards are available which you can connect directly to the Raspberry Pi for playing live.

Compatibility

If you want to receive MIDI on the Pi using a USB MIDI interface or controller, any class-compliant device should work fine. If the device works on Windows or Linux PCs without requiring any drivers, there's a high chance it will work with mt32-pi.

If you're shopping for a USB MIDI interface, the following devices have been confirmed as working properly (or not) by our testers. Feel free to contribute test results with your own MIDI interfaces and we can list known working ones!

Interfaces and cables

Manufacturer Device PC send* mt32-pi receive† Comments
AZSMZ USB MIDI Converter ❓ βœ”/❌ 1 in, 1 out; female DIN sockets. Received notes and passed to Pi but sounded incorrect. I assume it was missing SysEx. Tested by @cturczynskyj.
iConnectivity mio ❓ βœ” 1 in, 1 out; male DIN plugs. May need power-up delay. Tested by @sdstrowes.
IK Multimedia iRig MIDI 2 ❓ βœ” 1 in, 1 out, 1 thru; female DIN sockets. Tested by @lucjanssen.
M-Audio MIDISport 1x1 βœ” βœ” 1 in, 1 out; female DIN sockets. Tested by @nswaldman.
M-Audio Uno βœ” βœ”/❌ 1 in, 1 out; male DIN plugs. May need power-up delay. Some serial number ranges may be defective and subject to a product recall, others may simply be incompatible for receiving with the Pi. Tested by @dwhinham.
Midiman MIDISport 1x1 ❓ ❌ 1 in, 1 out; female DIN sockets. This is an older MIDISport with Midiman labeling. Would not respond to any MIDI input. No lights turned on either. Adding power-up delay had no effect. Testing in Raspbian I had to apt install midisport-firmware to get it to work. Tested by @cturczynskyj.
Miditech MIDIFace II THRU 1x1 ❓ βœ” 1 in, 1 out, 1 thru; female DIN sockets. Tested by @cturczynskyj.
Roland UM-1EX βœ” ❓ 1 in, 1 out; male DIN plugs. Tested by @Higgy69.
Roland UM-1G βœ” βœ” 1 in, 1 out; male DIN plugs. Tested by @kuroken.
Roland UM-ONE mk2 βœ” βœ” 1 in, 1 out; male DIN plugs. Tested by @nswaldman.
Yamaha UX16 ❓ ❌ Discontinued. Not class compliant. Tested by @jake_worrell.

Notes

  • * The PC send column indicates that the device has been tested for sending data to mt32-pi (i.e. the USB connection is made with a PC or other device).
  • † The mt32-pi Receive column indicates that the device has been tested for receiving data (the USB connection is made with the Raspberry Pi).

MIDI keyboards/controllers

Manufacturer Device Working? Comments
Arturia KeyLab 61 (original) βœ” Requires USB boost to avoid dropped data. Tested by @LuckyNES.
Novation Launchkey Mini βœ” Tested by @dwhinham.
iRig Keys Pro βœ” Tested by @danbee.
M-AUDIO Keystation Mini 32 MK3 βœ” Tested by @kuroken.

Troubleshooting

If you are trying to use a class-compliant USB MIDI interface and it doesn't seem to work reliably or only works in certain ports, there are a couple of things you can try.

Power-up delay

The device may need some extra time to power up.

Try editing your cmdline.txt on the SD card to add usbpowerdelay=2000 to the end of the first line, i.e. so that it reads:

fast=true usbpowerdelay=2000

This sets the number of milliseconds to wait between powering on the device and attempting to access it. The default value used when this option isn't set is 510.

If this works, you can try lowering it in increments to optimize startup time.

USB boost

The device may need slightly faster handling of USB bulk transactions in order to avoid lost MIDI events. If you frequently encounter stuck notes or missed key-presses, try this option.

Edit your cmdline.txt on the SD card to add usbboost=true to the end of the first line, i.e. so that it reads:

fast=true usbboost=true

This option may put more load on the system. It is currently unknown if this will have any consequences for audio quality or performance.

Cheap/generic USB interfaces

If you are looking to purchase a USB MIDI interface, it is strongly recommended that you avoid no-name cheap interfaces. Don't be tempted by their cheap price. The device pictured on the right is still widely available from online sellers, and is particularly notorious for its poor quality.

These devices are well known to corrupt System Exclusive data or just not function at all because of crucial missing components 1, 2, 3. A quick Google search for "Chinese MIDI interface" will reveal several accounts of these devices behaving unreliably.

Some of these devices will appear to work just fine for sending simple Note On/Off commands or Control Change messages, which are only two or three bytes long. The problems occur when longer messages such as SysEx are transmitted.

The reason behind this seems to be that these devices declare that they can support packet sizes of over 4 bytes, but don't actually work with large packets. Operating systems/drivers that are unaware of this (e.g. Windows) will attempt to send large packets, and they will be corrupted in transit by the MIDI interface, which results in the connected MIDI device receiving garbage.

Workarounds

The Linux USB MIDI driver has a list of USB Vendor/Product IDs that are known to suffer from this problem, and implements a workaround/quirk for them 4, 5.

If your only option is one of these devices, try using a Linux computer to send data using your cheap MIDI interface. A user in issue #25 reported successfully being able to send SysEx data after connecting their cheap interface to a Linux machine, confirming that the quirk works.

Otherwise, consider purchasing a MIDI interface from a trusted manufacturer.