Second iteration: USBmidi2
USBmidi2 is a USB MidiStreaming class-compliant device, in double. It connects your computer, over MIDI, to another computer.
USBmidi2 is also a component that you can embed in your own musical instruments. Add a USB MIDI device port to your project, along with the three standard MIDI jacks!
To skip to the end of the story, I built a few of them to share.
Drop me an email if you are interested in acquiring one at a reasonable price.
Boards | Available? | Price |
---|---|---|
USBmidi 1x1 | Sold out! | |
USBmidi 4x4 | Almost there! |
I got a few requests for a MIDI interface for the Raspberry Pi, so that the Pi could be used as a component in a hardware synth module. The point was that most MIDI interfaces only have a single USB device port for connecting to a computer, and that one is taken when you plug it to your Pi. Yet a synth should behave like a USB MIDI device itself, so there should be a second port for a laptop.
So two computers, talking to each other over MIDI over USB, both acting as USB hosts… no problem! Stijn had told me about these really really nice Kinetis KL26 microcontrollers with plenty of UARTs and a built-in USB interface. One USB interface, per chip.
The only MCU with two USB interfaces that could possibly fit this purpose was the NXP LPC43xx series that I used in the signal analyzer. But the LPC is massive – TQFP144 – while the KL26 is small and flexible. So it was clear: there should be two KL26’s, with one USB port each, connected together. And the overall design seems simple enough, this way:
The board appears as two MIDI ports on both computers. First port goes directly to the other USB host. The second one is connected to the MIDI jacks, and data is interleaved from both computers.
You can see the MIDI in/thru/out ports and the slave USB connector in the picture of the front of the device, at the top of this page. The backside has just the USB jack for the Pi, and looks like this:
This is how it works in practice:

usbmidi2 connected to a Raspberry Pi; the board is intended to be mounted behind a panel, so that the Pi fits inside the same enclosure.
I’m also working on the expanded version; since you read all the way down here, here’s a teaser ;-)
usbmidi 4×4 – not announced yet!
Mounting dimensions: See datasheet.
Further technical details: TBD
Source distribution: https://github.com/rpc-fw/usbmidi2
Hey I’m very interested in acquiring one or two of these fromm you to use. Let me know if you still have them. My email is davidjkim22@Gmail.com thanks!
April 14, 2016 at 19:16
Hello,
I would like to connect my keyboard to the Raspberry . ( Midi IN / Out / Thru ) to transfer MIDI files ( sequences ) in the standard format ( GM / GS ) .
Would that be possible with your solution ?
Price with shipping to Germany
MfG
Frank
September 3, 2016 at 09:09
Hi Frank,
yes, transferring standard MIDI sequences will work.
– Lauri
September 4, 2016 at 14:15
Please let me know when usbmidi4x4 is out and the price.
Looks great.
I just want to confirm that it looks like these are not usb midi host, meaning I could connect a midi keyboard with a midi synth that only has midi usb. I would still need to use a computer. Am I correct?
January 22, 2017 at 17:11
Hello, do you know of a device which can bridge between a USB MIDI controller and a USB MIDI device? Basically object A sends USB MIDI (normally to a computer) while object B receives USB MIDI (normally from a computer). I want a device which will act as a MIDI host to one device at the input and repeats the MIDI as a USB MIDI output. The device sits between a USB MIDI controller and a musical instrument which can receive USB.
Thanks for your help.
March 15, 2017 at 11:12
Yes, Hobbytronics makes a usb host that they program for midi. hobbytronics.co.uk
Check out youtube to see what one person did.
https://www.youtube.com/watch?v=FDh5pj9ExQE
One usb midi host controller tx went to:
2nd usb midi host controller rx
Then rx from number 1 to tx on number 2.
Ground and +5 from each went to a micro usb breakout board. Just plug an external battery into that and you are good to go.
July 4, 2017 at 23:24