Serial Port MIDI Relay

by Stephen Hobley on February 15, 2010

MIDI Relay - sends serial port data straight to the default MIDI port

When it comes to creating MIDI controllers the Arduino is tough to beat. There’s a great development community out there and creating MIDI data is a breeze.

What’s not so cool is that it’s very very difficult to send MIDI data over the standard USB serial port that is used to communicate with the Arduino.

Wouldn’t it be nice if there was something you could do to test your creations, without:

(a) having to solder a 5 pin DIN connector onto the serial port TX pin
(b) hunting around the house for that old USB/MIDI interface that you *know* is in one-of-those-boxes-over-there(tm).


Well now you can – I put together this really simple application that lets you choose a serial port, click start and then it retransmits all the incoming data over to the default MIDI port you configured in Windows control panel.

Click here to download – it was built using Visual Studio 2008 – so will need the .Net framework 3.5 installed to run.

If you use MidiYoke you can route the data straight back into a VST softsynth.

You will need to transmit from the Arduino at 38400 speed.

Job done!
…and not a 220 Ohm resistor in sight.

P.S. – At the moment it only supports note on / note off and controller data.


{ 15 comments… read them below or add one }

Graham Dean June 27, 2010 at 4:12 am

hey, nice work. I’m trying to use it to connect arduino with ableton live on windows 7 – wondered if you could send me a quick email to make contact?

Graham Wykes September 18, 2010 at 8:14 pm

I’m currently building an organ console using Arduino Mega to scan 256 switch points. It’s working beautifully but I would love to be able to send the MIDI out via USB. The organ sends NoteON/Off, Controller and Program Changes. I’d like to add the PC capability but I’m not able to start from scratch. Your work here looks like the perfect start. Are you prepared to release the source? If not, can you point me to some sources for this kind of development?

Stephen Hobley September 20, 2010 at 11:52 am

Hi Graham,

Thanks for getting in touch – check out this article :

The essence is about how to receive power from, and send native MIDI instructions to a host computer over USB without needing extra drivers or software.

I am using the standard UART (serial out) built into the Arduino – you need to open the serial port at 31250 baud (MIDI standard) and then send the MIDI commands following the spec.

Mark Norman April 17, 2011 at 9:01 am

Hi Steve,

That’s a really nice program, better GUI, neater and faster than any other I’ve found. Am I right in thinking it only works in one direction, for MIDI coming into the PC? I am wanting to send MIDI out to my arduino and am having great difficulty finding a program/driver to do this which works with Windows 7.

Stephen Hobley April 17, 2011 at 9:11 am

You are correct, it could be modified to receive MIDI, although there’s never been much demand.

Mark Norman April 17, 2011 at 10:04 am

Please would you be able to modify it? (Or if you let me have a copy of the source I probably could.)

Best regards,

Carl May 14, 2011 at 9:35 am

This app would be PERFECT if it let choose wich midi driver is sending the data, cose on win7/vista it’s really a pain in the arse, thank you anyway!

Stephen Hobley May 15, 2011 at 6:24 am

Y’know, I thought I had done this – I’ve certainly coded it somewhere. exactly for that reason – Windows 7.

Arian June 15, 2011 at 5:25 pm

Very informative site you have here. Great stuff.


Bruno August 8, 2011 at 7:34 pm

It’s a very interesting software, would you mind sharing the source of it?

Diogo August 31, 2011 at 2:52 pm

I can’t receive MIDI messages on my arduino …
I’m using your program, which detects input (from arduino) but not output (coming from Traktor)
Can you help me?

Stephen Hobley August 31, 2011 at 7:02 pm

Although it’s been a while since I looked at it, I’m pretty sure that communication was only one way – from device to host.

Scott Stevenson September 16, 2011 at 9:36 am

I’m having a difficult time getting this to work over the USB connection on my Diecimila. I’m running Windows 7. I open the serial/MIDI port, but no input shows up in MIDI-Ox. I’m using the Arduino MIDILibrary ( Any hints?

Newk May 10, 2012 at 5:33 am

This is a great program and it worked perfectly until very recently..
now it seems to have doubled the input of ControlChange data and it goes up to 127 when
the knob/slider is only halfway. Do you have any idea what could have caused this? What libraries is it depending on? Maybe something i installed?
When i look into serial monitor of Arduino it sends to 127 in the full range of the parameter so it must be on Serial Port MIDI Relay end or something on its way there..
I’m pulling my hair here i really need it to work soon 😮 (my own fault for depending on it fully :p ) Really hope this can be fixed by (re)installing something.


Beorn “Newk” Lebenstedt

Newk May 10, 2012 at 5:34 am

i’m on XP sp3 by the way

Leave a Comment

Comments links could be nofollow free.

{ 3 trackbacks }

Previous post:

Next post: