Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulating a MIDI device - Windows

I need some advice on windows programming, MIDI and WDM. I am trying to write a small application that will sit in the sys tray and be advertised to the system as a MIDI In/Out device so that MIDI programs can send to it and it will convert the messages into a different format. I have been reading Cant's WDM book and scouring for information about writing device drivers, but don't know if I'm going down the right path. I don't see yet how to:-

a) register my driver as MIDI capable (do I stick a ref to it in the registery and let the OS direct MIDI calls to the functionality in a dll?)

b) direct MIDI data through the my driver to my app, which is probably going to be too large to be a driver itself.

Any advice on where to start would be much appreciated. thanks, Pete

like image 336
user380998 Avatar asked Jul 01 '10 10:07

user380998


People also ask

Does Windows 10 have a MIDI driver?

Use Windows Update to Find the MIDI Drivers In your case, it might also install the MIDI driver that your Windows 10 is missing. To launch it, type update in the Windows start menu search bar and select the best match. When the Windows Update window appears, click Check for updates.

What is a virtual MIDI?

Introduction. Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It doesn't produce any sound by itself, but can be used to drive a MIDI synthesizer (either hardware or software, internal or external). You can use the computer's keyboard to play MIDI notes, and also the mouse.

How do I use MidiKey2Key?

Download the MidiKey2Key Windows installer-file. Open it with a double-click and follow the instructions. Connect a Midi-device to your PC (USB-device or Midi-device connected to a Midi-interface). Find MidiKey2Key in your startmenu-folder in a folder named "Midikey2Key" and start the application.


2 Answers

Windows MIDI drivers do not need to be implemented in the kernel, they can be implemented entirely in userspace as DLLs.

MSDN has some information about the functions you need to implement - Audio Device Messages for MIDI - unfortunately it is somewhat lacking.

There used to be sample code for this kind of driver, as part of the NT4 DDK, but more recent releases of the DDK / WDK unfortunately don't include it any more.

Some better (though older) documentation and sample code can still be found after some searching:

  • Introduction to Multimedia Drivers (From NT4 DDK)
  • Sample MIDI Wine Driver for Mac OS X
like image 136
Nick Dowell Avatar answered Sep 28 '22 01:09

Nick Dowell


Devices are enumerated (or simulated) by device drivers, not applications. What you see in the sys tray is an application icon. Hence, you will need to have both a driver and an app - you can't have one bit of compiled code acting as both.

On the driver side, you probably want to have a peek at the MSDN docs. This will answer part (a) of yopur question.

Assuming that you still would like to continue, (b) is best don by letting your application pull the data from the driver. That's far easier than the other way around - an application can trivially find a driver, but a driver has big problems finding a specific app (process)

like image 31
MSalters Avatar answered Sep 28 '22 01:09

MSalters