Windows::Devices::Midi API support

Posts: 3
Joined: 4 Dic 2017 - 22:28
Windows::Devices::Midi API support

Hi, this is Nicholas from Synthesia LLC.  We just released an update that includes support for the (finally, after 25 years) updated MIDI API that Microsoft pushed out about a year ago with one of the Windows 10 Creator Updates.

Lots of info about the new (Windows 10-only) API, here: https://github.com/stammen/winrtmidi  That's a wrapper for the new API made by a Microsoft employee and it shows a lot of the typical ways a MIDI-using app would do things.  (I'm less sure that it shows the way an app like VirtualMIDISynth would do things; but it's a good starting point nonetheless.)

In any event, we heard feedback almost immediately that VirtualMIDISynth doesn't appear in the device list anymore.  I had assumed that registering yourself as a MIDI device would get you to show up in both the legacy and new API's device lists automatically, but that doesn't appear to be the case.

I am certain there is a way to do it, because the software loopback driver "LoopBe1" shows up in the new list just fine.

It will be nice to have VirtualMIDISynth show up in both lists for any apps supporting the new UWP MIDI API.  Thanks!

Posts: 3
Joined: 4 Dic 2017 - 22:28
Re: Windows::Devices::Midi API support

Poking around a little more, it looks like Tobias' loopMIDI also shows up in both APIs.  So, there might be some hints in his virtualMIDI SDK, here: http://www.tobias-erichsen.de/software/virtualmidi.html  (That's the underlying component that powers loopMIDI.)

Posts: 1125
Joined: 25 Mar 2012 - 01:19
Re: Windows::Devices::Midi API support

Nicholas, thanks for the info.

I've read something about the "new" MIDI layer and, honestly speaking, most of them are negative ;)
MS missed the MIDI train a long time ago, and now they're trying to hurry up and get users back...
The new APIs still have unfixed bugs (like the device names bug) and I'm really scared this could be a nightmare to support and then abandon in a few months...

Back to the point, AFAIR bot loopMIDI and LoopBe1 are device drivers (.sys) and not User Mode (.dll) devices, so they must be installed with an .inf file (and will also appear in Device Manager).

I'm looking for documentation on how to properly register an User Mode device, other than "switch to .sys driver" or "switch to "DirectX device mode".
Already tried that way and abandoned (DirectX have an unacceptable latency and far moooore complicated SDK).

Posts: 3
Joined: 4 Dic 2017 - 22:28
Re: Windows::Devices::Midi API support

You're not wrong about the bugs.  I'd barely call their new API an alpha version.  The names that come back from the API are completely unusable, so Synthesia does some digging around in the device properties for each reported device to try to cobble together something a little more sensible (using the manufacturer and product name).  It's mostly hit or miss.

It was only when I was composing my first post here that I noticed how wide-spread the negative feedback was.  Crashes in the new MIDI API immediately became our #1 source of Windows crashes when the new release went out the door.  So I've also been trying to think of alternatives that would allow users to have their Bluetooth MIDI support (and maybe the lower-latency built-in Windows synth) while still mostly using the old API.  Some hybrid where Synthesia only uses the new stuff for Bluetooth MIDI devices.  Those are still rare enough that most users would be able to avoid the crashes.

I'm not sure about the .sys vs. .dll stuff.  I don't remember needing to agree to an unsigned driver when installing either LoopBe1 or loopMIDI... but the last time I did it was years ago, so it's almost certainly my memory failing me.  That'd be a shame if the new API didn't allow user-mode drivers.  Hrm.

Still, you may be right about this being too little, too late for Microsoft.  If no one ever adopts the new stuff, it won't matter!  Perhaps Synthesia was a little too early to the WinRT MIDI party.

Posts: 1125
Joined: 25 Mar 2012 - 01:19
Re: Windows::Devices::Midi API support
Nicholas wrote:
Still, you may be right about this being too little, too late for Microsoft.  If no one ever adopts the new stuff, it won't matter!  Perhaps Synthesia was a little too early to the WinRT MIDI party.

Well, I could be wrong but I've seen a lot of new and unbeatable technologies in the last 20 years; and that makes me feel skeptical about new things replacing well working existing ones.

I'll try to find some in-depth documentation in Windows 10 SDK and wll share some ifno when/if I found something.
Feel free to do the same (even privately).

warning

Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.