Troubleshooting
How do I send a increment value to a fader with a button?
Started by jenz on .
Sign in or create an account to join the conversation.
I have multiple faders that controls paning. I would like to have a button that sends de value of 17 on a grided fader(33) to put the values back to the center. (reset Paning)
Thanx!
Thanx!
Subject: Re: How do I send a increment value to a fader with a button
The grid steps have very little to do with the value of the fader. All lemur objects range from 0 to 1.So, a centered fader with a gird of 33 steps would be grid step 17, but the x value would be 0.5
A fader with 11 steps, would be centered on step 6, but the x would still be 0.5.
on your object, make a script on execution x, if x == 1, Fader.x = 0.5;
Subject: Re: How do I send a increment value to a fader with a button
Thanx for your time and sorry I'm new to this...Do you mean, create a script on the button that I want to send information to the fader?
If yes, it dosen't work and the spelling of the name of the fader is good.
What am I doing wrong?
Thanx
Screen Shot 2013-03-29 at 11.02.26 PM.png
Subject: Re: How do I send a increment value to a fader with a button
Slight coding error there..... the if statement should be included in parenthesis....so....
if (x==1) KICKdr.x=0.5;
will work!As a sidenote, you can add multiple actions for the evaluation of the script with the use of { }
So for exampe, if you had two objects to set to 0.5 you would type
if (x==1)
{
KICKdr.x=0,5;
AnotherObject.x=0.5;
}
Finally, another note is that 1 (or any value besides 0) returns true, and 0 returns false. What this means is that the statements
if (x==1) ...
if (x>0) ...
if (x != 0) ...
can all be replaced by the shorter if (x) ...
while the statementif (x==0) ...
can be replaced byif (!x) ...
Subject: Re: How do I send a increment value to a fader with a button
Thanx Softcore!!! I'm learning!!!