Sveva,
I thought you meant a Key on a Keyboard (QWERTY), sorry, If you want to use a Key on a MIDI Keyboard, then you would replace the 'Keystroke' inputs with the MIDI message of your (MIDI) Key... Like so:
Code: Select all
Translator 0: MIDI Through
Options: stop=false
Incoming: MIDI B0 01 oo
Rules:
if ga==1 then exit rules, skip Outgoing Action
Outgoing: MIDI B0 01 oo
Translator 1: Through Key Toggle
Options: stop=false
Incoming: MIDI 90 2D oo
Rules:
ga=ga+1
if ga>=2 then ga=0
Outgoing: (none)
The
'stop=false' is nothing you need to worry about, it's just the way the translator is displayed then you copy and paste it as text (like I did above).
Translator 0 is just passing through a MIDI message, but it doesn't allow it if the variable '
ga' is 1.
B0 01 oo is just an example CC message I pulled from the top of my head... Replace it with the MIDI message you want to receive from and send on, whether that is a CC or Note message.
The second translator is just defining the 'ga' variable; whether or not the first translator is to allow the message through or not. 1=NO, 0=YES (although this may seem a little backwards, 0 is the default value of a global variable, and by default you want the message to pass through, right?)
Both the rules do not need to fit onto 1 line, they read like text in a book, left to right, top to bottom. You can have as many rules as you like in 1 translator.
Maybe I'm not understanding what you want to do correctly? Are you wanting to stop/allow a message through on a key press? if so, do you want it to only pass through if the key is held down, or toggle whether it allows or not?
Scott