I'd like to be able to control directx games via MIDI - eg use a guitar footboard that has a pedal and switches etc to generate game controller events.
All the vaguely related references I've found on the web are for using directx controllers to generate MIDI events! I want to use MIDI events to generate the equivalent of key presses, mouse buttons or (say) a throttle control.
Are there any drivers that do this already If not, how difficult would it be to roll my own, and what would it involve
I'm quite competent at C/C++ etc but most of my experience is in an embedded environment, not Direct X.
Thanks,
Chris

Controlling Game By MIDI
xavier gonzalez
No I'm not sure either. I presume it's easier to manage the MIDI interface at the top level api, but then you're going in and out of kernel space...
I had a look around to see where I might have read about user mode drivers and found this on wikipedia:
"A new user-mode driver model called the User Mode Driver Framework, which is part of Microsoft's new driver model, Windows Driver Foundation. User-Mode Drivers in Windows Vista are not able to directly access the kernel but use it through a dedicated API. If an error occurs the new framework allows for an immediate restart of the driver and does not impact the system. A user-mode driver would typically be used for devices which plug into a USB or Firewire bus, such as digital cameras, PDAs and mass storage devices, as well as "non-hardware" drivers, such as filter drivers."
I'd have thought what I want to do fits into the category of ""non-hardware" drivers, such as filter drivers", but else where it talks about this building on known good drives so perhaps not.
Thanks for you help, I'll go and investigate further.
Semicolin
MIDI events go through their own stack starting in kernel space. I'm not sure if it's better to try to get them directly from the MIDI input miniport driver at the bottom of the stack (in kernel space) or at the top of the stack from the user-mode MIDI APIs.
Vista doesn't change anything, you still need to write a kernel mode driver that can talk to the kernel mode drivers lower down in the HID stack.
Kalaka
Hi Chris,
I was quite surprised not to find anything available to achieve this. I have a Korg Padkontrol which I want to use as gamecontroller as well. I'll keep an eye on this thread, but would you drop me a line if you find anything before I do (I'll be sure to return the favor
)
regards,
Eric
Machhindra
Hi,
After some surfing because of a quiet day at work I stumbled onto this little tool: http://www.bome.com/midi/translator
Might just do the trick.
Ciao,
Eric
Michal Levy
brajeshkumar69
I've been a little busy since my last post but I don't have much hope of finding a solution 'out there'.
If I get the time then I may look into the SendInput approach, although I'm a little concerned that it might be perceived by some games as cheat mechanism (not that it would be but...).
If I do then it would probably be limited to mapping patch change buttons to keys. It would be nice to map continuous controllers to controller axes but that would require a more involved development than I could take in the near future.
yzzid
One of the limitations of the User Mode Driver Framework is that the user-mode drivers can't have any kernel-mode clients. That means that the driver either has to be at the top of the stack or only have other user-mode drivers above them.
If you're willing to limit yourself to just keyboard or mouse input you could implement a purely user-mode solution by using SendInput().
TomJ72
Thanks for the pointer.
I've written some custom PCI drivers for NT4/Win2k and a custom IPSec filter for ndis, but that was quite specialised.
From my reading, it looks like I'd have to write a kernel mode driver, which I'd like to avoid. If the MIDI events are being received in user mode, then I'd need to send them to the driver and then back up the hid stack...
I have some recollection that Vista will move more of DirectX out of kernel space
Chris