This project has moved and is read-only. For the latest updates, please go here.

Sending SysEx data

Mar 6, 2011 at 3:55 PM

can anyone offer advice on sending SysEx data with the NAudio library?

I'm a beginner programmer but I have managed to parse the MIDI Output ports and send basic Note messages, but my aim is to send simple (short) SysEx strings to set various parameters in my MIDI equipment.

Any help would be gratefullt received




Mar 7, 2011 at 5:13 PM

I'm afraid it isn't something I've tried, but I have made wrappers for some of the Windows MIDI API. I think to do Sysex you have to use midiOutLongMsg


Mar 8, 2011 at 10:34 PM

Hi Mark,

thanks for the reply. Yes it is MidiOutLongMsg, I've used it in a Visual C++ v6 program which I am trying to bring up to date with C# and .NET but as I said I am something of a beginner.

I saw that in MidiInterop.cs there is a DllImport for MidiOutLongMsg and I looked at the source for SysExEvent.cs but I'm afriad it was a bit beyond me. I was hoping there might be some notes or a tutorial on how to actually send a buffer using these calls?




Mar 10, 2011 at 11:01 AM

You might get an answer on StackOverflow. I haven't used MidiOutLongMsg myself.

Feb 22, 2013 at 9:57 PM
Have there been any changes to NAudio in the last two years to support sending a SysEx message? I have 8 bytes (F0......F7) I need to send to my midi hardware and am trying to avoid using another library. Can a method be readily added to NAudio to simply send an array of raw byte values out the opened midi port?

If I cannot use NAudio, the C# Midi Toolkit ( is the only readily available managed MIDI library that I am aware of which supports SysEx. (If anyone knows of an alternative library, please let me know.)


Feb 23, 2013 at 7:54 AM
No, I'm afraid no new sysex features have been added to NAudio. I'll gladly accept contributions in this area. If you're looking for a MIDI library, I'd take a look at Marc Jacobi's MIDI.NET.
Feb 23, 2013 at 4:33 PM
Thanks for the heads up on Marc Jacobi's MIDI.NET. I am familiar with his VST.NET tool.