Sure! let's use g0 to remember if Toggle 1 is ON (i.e. g0=1), and g1 for Toggle 2. Otherwise we'd send repeated Toggle ON commands all the time (and toggle off, as well!).
We'll need to separate this by toggle function, so we need 4 translators:
Code: Select all
Translator 1: Toggle 1 ON
Incoming: MIDI: B0 01 pp
Rules:
if pp>96 then exit rules, skip outgoing action
if g0=1 then exit rules, skip outgoing action
g0=1
Outgoing: Keystroke <Switch Toggle 1 to ON>
Translator 2: Toggle 1 OFF
Incoming: MIDI: B0 01 pp
Rules:
if pp<=96 then exit rules, skip outgoing action
if g0=0 then exit rules, skip outgoing action
g0=0
Outgoing: Keystroke <Switch Toggle 1 to OFF>
Translator 3: Toggle 2 ON
Incoming: MIDI: B0 01 pp
Rules:
if pp<32 then exit rules, skip outgoing action
if g1=1 then exit rules, skip outgoing action
g1=1
Outgoing: Keystroke <Switch Toggle 2 to ON>
Translator 4: Toggle 2 OFF
Incoming: MIDI: B0 01 pp
Rules:
if pp>64 then exit rules, skip outgoing action
if g1=0 then exit rules, skip outgoing action
g1=0
Outgoing: Keystroke <Switch Toggle 2 to OFF>
If Toggling uses the same keystroke, just insert the same keystrokes in Translators 1/2, and 3/4, respectively. As an exercise to the user would then be an optimization to squeeze everything into two translators
![Smile :)](../../../images/smilies/icon_smile.gif)
But you can also just leave it as it is. If it works, that is!
Regards,
Florian