virtualMIDI SDK

Virtual MIDI driver for Windows XP up to Windows 10, 32 and 64 bit with the ability to dynamically create and destroy freely nameable MIDI-ports.

The necessity for virtualMIDI came along when I implemented my rtpMIDI-driver.  Later I also used this driver when I created loopMIDI for people who only need simple loopback MIDI-ports.

I had some pretty specific requirements:

• Compatibility from XP to Windows 10
• Both 32bit and 64bit operation
• On-the-fly creation (and destruction) of freely nameable virtual MIDI-ports
• Only one side of the ports was supposed to be visible to the public
• The other side only visible via a private interface
• Multi-client-capability

Since I had been hanging around on the wdmaudiodev mailinglist for quite some time due to my interest in kernel-streaming, I had already read quite a bit on the topic over there.

All of the people there suggested to use the DMusUart and the MPU401 sample as a starting-point. So that’s what I did and creating the actual driver had been not too hard after getting enough insights at the WDK-documentation.

Nevertheless all the stuff people had done prior to my attempts would not quite achieve what my requirement were.

All of those other virtual MIDI miniport driver implementations actually developed simple static “loopback” MIDI-ports.  Loopback meaning that both ends of this port would be public.  Static meaning that the number of ports and their names would be fixed at install-time of the driver (via the inf-file of the driver).

This was not satisfactory, so I looked some more and I found references to dynamic creation of sub-devices.  But this was a hard nut to crack.  Finally I had been able to locate a guy who was doing something similar for a virtual soundcard-driver for digital-audio-broadcast.

His insights have been invaluable.  It still took quite some time to get everything going smoothly, but I finally succeeded in creating this driver.

One problem remained:  Since Microsoft introduced Vista, all drivers for 64bit need to be code-signed.  Though the idea itself is pretty nifty – to know the specific company that the code running in the kernel comes from – it had a severe drawback:

Only companies incorporated could apply for such a code-signing-certificate.  Many people in the driver-development-community urged Microsoft to rectify this.  And finally in May of 2010 it has been done.  Since that time it is also possible for individuals to get their own code-signing certificate to be able to run their drivers on the 64bit versions of Vista and Windows 7.

The driver is currently part of the rtpMIDI-driver network-MIDI driver and the loopMIDI virtual loopback MIDI cable. But it can be used for other tasks as well.

If you have a music-application that needs to create its own freely named MIDI-devices on-the-fly – virtualMIDI is exactly the right tool.  I have prepared a small & simple to use SDK with bindings for C/C++, Delphi, Java and C#.