"Hijack" a MIDI output?

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
Anonymous user
"Hijack" a MIDI output?

Can I capture the data going to one output device and re-route it to a different output device? Here's why I ask:

I've been trying for several weeks to get MIDI commands from a specific program out of a USB to MIDI adapter.  Google gave me lots of references to the same registry setting and a bunch of apps that modify that setting, but that doesn't work for this program.  The program did work in XP, which according to my research, had its MIDI Mapper at address 0. Now in Vista and later, address 0 seems to be hard-coded for the crummy built-in synth, addresses 1 and above refer to other installed devices, and address -1 uses the registry setting to tell it which positive address to use.

Windows Media Player responds to the registry setting, and I used that to verify that my USB adapter works.  I highly suspect that my program is hard-coded to use address 0, which as I mentioned before, was just fine in XP.  Can I capture the data going to address 0 and re-route it to address 1 or somewhere else?

Thanks!

Posts: 1972
Joined: March 25, 2012 - 01:19
I suppose you can't.

I suppose you can't do what you need: if your software is locked on device 0, the only one could listen to these messages will be device 0.

AFAIK device 0 is the MIDI mapper, so you must configure it to drive messages to the desired device.

Another try: open this registry keys (please backup your registry before any change!)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32

Here you'll find some midi keys: midi, midi1, midi2, ...
These are the configured device drivers on your system.
Try to swap them to let your desired one as first...

Anonymous user
Doubt it, but Possible

According to my research, device 0 is the MIDI Mapper, but only on XP and before.  Starting with Vista, they removed the Mapper, hard-coded their own synth as device 0, and (probably as a "cover your back" / simply good programming practice) bounced device -1 off of a different registry key (*), which contains a positive number for the default device.

So if a program asks for device 0 on XP, it gets whatever the Mapper is set for.  If the same program runs on 7, it always gets the built-in synth, regardless of any settings in Windows.  If you want the same functionality on 7, you ask for device -1, not device 0.  Or you can specify a positive device and always get that one, regardless of any settings in Windows.

I'll try those keys that you mentioned, but I highly suspect at this point that I need something that can capture the traffic going to device 0 and at least copy it to another device.  It doesn't actually matter to me if the built-in synth also receives that data because it's all System Exclusive messages designed for lighting and other equipment.  Sysexes are silent on their own.

(*) The registry key that I found, based on many other forums on the 'net, is:

HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\devenum\{4EFE2452-168A-11D1-BC76-00C04FB9453B}\Default MidiOut Device

Anonymous user
Update

I've been away from this for a while, catching up on other things, but I did look at the keys that you mentioned.  The midi_ keys were all set to the same windows wdm driver dll, and there was a midimapper key that was set to midimapper.dll.  That was true in both places.

I copied the midimapper key into the midi key, and regular audio stuff quit working.  So I undid that and copied the midi key into the midimapper key.  Then regular audio worked and midi quit working.  The only midimapper.dll file on this system is 20kB in C:\Windows\system32.

I wonder if replacing that might fix my problem?  The new one might just route anything that's addressed for device 0 or device 1 to device 1.  Or maybe route device 0 to device -1 for better flexibility, as long as the key that I found isn't set to device 0.  (feedback loop)

I'm an embedded programmer, so my expertise is really in software-driven hardware devices.  I can do a little bit of Windows programming in C#.NET, I can figure out most source code, and I can use a hex editor, but that's about it in this area without a LOT more research.  Anyone want to take this up?