Button to Toggle Script Utilization of Fader

Discuss Lemur and share techniques.
Post Reply
SBPBK
Newbie
Posts: 19
Joined: 20 May 2012 04:34

Button to Toggle Script Utilization of Fader

Post by SBPBK »

Hi!

I'm trying to write a script (conditional statement) to have a button toggle on/off a fader's use of a separate script.

Since the fader script that I want to toggle on/off is itself a conditional statement, I am a little confused as how to write that conditional statement within the conditional statement that will handle toggling the script on/off dependent on the button's state.

The fader script which I need to toggle on/off is:

if (z==0) x=0;

So, to be clear, what I am trying to figure out is something along the lines of:

if button.x=127 then {if (Fader.z==0) Fader.x=0;} else nothing happens

I have tried a few different ways of writing it but to no avail.. Any help or guidance would be much appreciated!!

Cheers
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Button to Toggle Script Utilization of Fader

Post by Phil999 »

try to begin your script, that you want to toggle, with:

Code: Select all

if(Switches.x==1) return;
...
So if the switch is on, the rest of the script won't be executed.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
SBPBK
Newbie
Posts: 19
Joined: 20 May 2012 04:34

Re: Button to Toggle Script Utilization of Fader

Post by SBPBK »

brilliant, exactly what I needed. thank you so much!! :mrgreen:
Post Reply