Midi Key plays DOWN/UP

Brian H

2009-09-17 20:03:46

I'm creating a simple music game where i want the user to press a midi key which translates to a key on the computer keyboard. When i press the midi key, it returns a down and up keystroke. For example, if i have middle C on the piano mapped to the letter k. When i press Middle C, K plays when pressed and released. I just need k for the key down.

I am also having an issue with the velocity. When i assign a midi key. It will only go through if i play the key at the same velocity as assigned.

What am i missing? What am i doing wrong?

Thanks!

joesapo

2009-09-17 22:45:46

Brian H wrote:I'm creating a simple music game where i want the user to press a midi key which translates to a key on the computer keyboard. When i press the midi key, it returns a down and up keystroke. For example, if i have middle C on the piano mapped to the letter k. When i press Middle C, K plays when pressed and released. I just need k for the key down.

I am also having an issue with the velocity. When i assign a midi key. It will only go through if i play the key at the same velocity as assigned.

What am i missing? What am i doing wrong?

Thanks!
Hi there Brian!

You just need to have a variable assigned to the velocity of your incoming MIDI action.

Like so;

Code: Select all

Translator 1: Translator_K_Keypress
Options: stop=false
Incoming: MIDI 90 4F pp
Outgoing: Keystroke: K 
Likely you have your incoming action ending with a '7F' (velocity value 127) or something static, whereas you need to have a variable such as 'pp' there instead. When you have a variable as part of the incoming midi action the translator will activate on *any* value of the variable instead of just one.

Hope this helps! :D

joe