There’s a non-legacy Windows API for MIDI: to wit, Windows.Devices.Midi
There’s a sample (for the app side of things) here:
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/MIDI
It doesn’t support custom drivers, though. (If you would like it to, please
file a feature request in Feedback Hub, and send me a link.)
________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on
behalf of Chris Hubbard <chris@xxxxxxxxxxxxxxxxx>
Sent: Wednesday, May 23, 2018 5:13:21 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Developing a "simple" user mode installable MIDI
driver.
Hi Matthew,
Thanks, that’s exactly what I was looking for.
MIDI is indeed a (very) legacy API. My main app calls API functions that were
first introduced back in the days of win 98.
Kind Regards,
Chris Hubbard,
CH Sound Design.
www.chsounddesign.com
Sent from my abacus.
From: Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for
DMARC)<mailto:dmarc-noreply@xxxxxxxxxxxxx>
Sent: Thursday, May 24, 2018 9:42 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Developing a "simple" user mode installable MIDI
driver.
Well, there’s documentation for those things here…
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/audio-device-messages-for-midi<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Faudio%2Faudio-device-messages-for-midi&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C08d975ddef464dbf8a0108d5c10b41ad%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636627176469029327&sdata=Jp3z%2FZpOLgbxuF43pCbuQcTWqubPROBW2f00VYG21bs%3D&reserved=0>
… but if you read it you will see how deeply legacy this API is.
________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on
behalf of Chris Hubbard <chris@xxxxxxxxxxxxxxxxx>
Sent: Wednesday, May 23, 2018 4:38:29 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Developing a "simple" user mode installable MIDI
driver.
Hi Matthew,
Thank you for your message.
There is no custom MIDI hardware involved in what I am doing, and other vendors
appear to be doing what I am wanting to do. An examination of their DLLs shows
that three functions are exported: DriverProc, MidMessage and ModMessage.
Kind Regards,
Chris Hubbard,
CH Sound Design.
www.chsounddesign.com
Sent from my abacus.
From: Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for
DMARC)<mailto:dmarc-noreply@xxxxxxxxxxxxx>
Sent: Thursday, May 24, 2018 1:38 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Developing a "simple" user mode installable MIDI
driver.
Windows doesn’t support user-mode drivers for custom MIDI hardware; only Kernel
Streaming (usbaudio.sys or a third-party driver) and Bluetooth MIDI are
supported.
* DriverProc function
This kind of solution is supported for the audio compression manager (see
acmDriverAdd) but not for MIDI.
Can you add a feature suggestion for custom user-mode MIDI endpoints in the
Feedback Hub, and share a link?
https://blogs.msdn.microsoft.com/matthew_van_eerde/2016/09/26/report-problems-with-logs-and-suggest-features-with-the-feedback-hub/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblogs.msdn.microsoft.com%2Fmatthew_van_eerde%2F2016%2F09%2F26%2Freport-problems-with-logs-and-suggest-features-with-the-feedback-hub%2F&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C55443ee4a550403183f008d5c10667a1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636627155623592484&sdata=p6bRcFBJV9gIFphTlA2xSOygen9miqM5SUfSX4%2FvptY%3D&reserved=0>
________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on
behalf of Chris Hubbard <chris@xxxxxxxxxxxxxxxxx>
Sent: Tuesday, May 22, 2018 8:44:21 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Developing a "simple" user mode installable MIDI driver.
Hi All,
I develop a range of applications which communicate with external equipment via
MIDI.
However, there are a number of devices which my app also communicates with that
have different interfaces. For these devices, I provide “translator” apps,
which convert the standard MIDI messages into whatever the device needs. The
user then needs to “connect” the translator app to my main application using
their preferred MIDI loop back driver.
I would however like to make things a bit simpler for my users, and it would
seem that one way to do this would be for the translators to become user mode
installable MIDI drivers. This would then result in the translators appearing
in the main application’s list of available MIDI ports.
My research so far has suggested that they need to become DLLs, which include a
DriverProc function. What about all the other functions like midiInGetDevCaps?
Do they have their entry points, or are they somehow called via DriverProc?
Are they any samples anywhere I can download?
Thank you in advance,
Kind Regards,
Chris Hubbard,
CH Sound Design.
www.chsounddesign.com
Sent from my abacus.