Converting Midi Data To Keyboard Presses

Okay, what I want to do is this:

take MIDI data, and get certain values to trigger keyboard presses. for example:

say a certain midi cc value is 10, i want that to trigger the letter Q on my keyboard, as if i pressed Q physically in windows, so it could for example trigger something to happen in an application which responds to keyboard presses.

alternatively can you convert midi data to some form of control pad data, so basically speaking perhaps you could press a midi key, and that would translate to the same effect as hitting the fire button on a joystick.

does that make sense? what i want is to change midi data so it affects things as if it were a normal keyboard mouse or joystick input device.

there is plenty about getting joysticks to control midi, but not the other way around!

any hints would be useful. i’m looking at this with respect to getting max msp to send commands to other programmes by triggering key press data, but as far as I can tell there is no easy way to send key presses in max, only recieve them. perhaps there is another programme though which would allow me to do windows scripting based on midi presses, and then i can just send midi data from max.

incidentally, i dont know how to program or use visual basic or anything like that…

a bit more googling reveals:

which seems to work for the basic idea here. still would be interested if people know other ways though

I remember seeing in the Kid beyond/ableton live demo video thing that he uses some kind of program to convert his midi foot pedal presses into keys on ableton live. I forget what he said it’s called though and don’t have time to check:

i’m looking for what you’re looking for too.
bome’s would usually be a perfect solution for this, however renoise does not work with it at all.
for some reason, the way renoise is written does not allow bome’s to access it.

looking for more windows solutions anybody?

im actually trying to get it to work with with Quake at the moment. I want to control quake via midi.

unfortunately the best i can do at the moment is assign 5 different pads to different mouse functions, since mouse functions register, while keystrokes do not. I read on the bome’s forum this may be to do with Direct Input keystrokes, which some games use (and possibly renoise, if it doesn’t work?)

I’ve also tried using autohotkey. you can send keystrokes from MT to AHK and get autohotkey to send different keystrokes. unfortunately in quake the results are the same - the keystrokes just wont work in the game.

AHK does allow you to do more things than MT though, so MT+AHK might solve the problem in renoise, depending what you want to do. AHK would allow you to trigger a mouseclick at a specific location, for example… that should at least let you press most global buttons?

There won’t be… Renoise works with DirectX and uses the DirectInput routine for keyboard control.
Bome’s Midi translator converts MIDI messages to windows API keypresses only and sends them to the active application.
Renoise does not respond to COMMDLG messages. Besides, DirectX hooks cannot be shared between two applications (unless both are connected to eachother on purpose).

i think the best solution is to have a midi controlled robot physically typing what you want in the corner.

here’s the video I made of FOV in quake being controlled via midi:

neato. if i may ask, does it serve a purpose in a larger project?

Hey Genfu… I’ve always wanted to do this as well for gaming. I tried tonight with some different utilities than you used, but still to no luck.

Basically all I need is one additional key which would be controlled with my foot controller. So I’ve got the foot controller hooked up thru the midi keyboard. I tried using MT but same problem as you, nothing would recognize the keystrokes. So I tried another trick which I call “ppjoykey back to keyboard”, which is … If you run PPjoykey to emulate a joystick with your keyboard, then use Xpadder to emulate a keyboard with your joystick. :) (I use it to remap keys for doujin shooter games that don’t allow remapping). Anyway, same problem… PPjoykey wouldn’t recognize the key.

So, I tried MT pro and it works to left click the mouse… But, I can’t get it to “hold” the mouse button down (and then subsequently release) which is what I need it to do.

oh well …

My next project will just be to solder the pedal’s circuit onto a keyboard or gamepad PCB. THAT WILL TEACH WINDOWS A LESSON!! :D

+1 for a midi to keypress translator being integrated to renoise

i got this working directly from max/msp in the end with a mxj object someone made which does precisely what i wanted (you can send keystrokes directly from max/msp to quake)

here’s the most recent demo:

what you have here is a couple of things going on, max/msp reads the game logfile (which is a text file which updates as events happen), you can use these to trigger stuff in max, then max sends keystrokes to the game. i’ve got the fog colour cycling, as well as fog density. when you pick up backpacks notice a slight 3d seperation between the red and blue (havent seen this with 3d glasses on yet, but hopefully it will look weird… at least it looks sort of cool as it is), also when you pick up something it triggers a noclip sequences which throws you out the level for a second and makes you fire loads of rockets, then chucks you back to where you were.

the general idea was to make a psychedelic distortion of quake, and of course you can mess with the sounds too. its a bit crude at the moment, but as i get time i’ll be developing this further