Device On / Off in one button

demoode

2013-11-02 22:43:27

Hey Guys i need help here.
I am trying to remap my Akai APC40 to studio one, i have read and did some work and i understand how midi translator is work, but i came via a problem and i didn't find any solution.
I need to remap my button which is outgoing is note on and note off midi type to something like when i press it for the first time if the active button on my vst is on it should make of and viceversa.
i know that in order to make the button on i should send an out going midi with velocity of 127 and if off is 00, how can i make the same button send 2 velocities or is there any other way to make device on / of button, and by that i dont mean momentary button, i need when i click it, it will toggle between on and of
thanks

DvlsAdvct

2013-11-03 00:22:19

Hi demoode

The main way to do this is with a global variable. Using the variable will ignore the signal when you release the button and alternate between on and off every press. It would look something like:

Code: Select all

Translator 1: Button
Incoming Signal: 90 40 7F
Rules: if g0==0 then Goto "On"
if g0!=0 then Goto "Off"
Label "On"
g0=127
Exit rules, execute outgoing action
Label "Off"
g0=0
Exit rules, execute outgoing action
Outgoing Signal: 90 40 g0
What this does is only responds to when you press the button (7F) and alternates the outgoing signal between 0 and 127. Does that make sense?

J

Sacco

2014-02-06 01:08:38

Thanks :D worked perfectly :D