How do I send a increment value to a fader with a button?

Discuss problems and solutions.
Post Reply
jenz
Newbie
Posts: 46
Joined: 21 Jan 2012 06:02

How do I send a increment value to a fader with a button?

Post by jenz »

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!
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: How do I send a increment value to a fader with a button

Post by Traxus »

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;
jenz
Newbie
Posts: 46
Joined: 21 Jan 2012 06:02

Re: How do I send a increment value to a fader with a button

Post by jenz »

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
Attachments
Screen Shot 2013-03-29 at 11.02.26 PM.png
Screen Shot 2013-03-29 at 11.02.26 PM.png (10.61 KiB) Viewed 1684 times
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: How do I send a increment value to a fader with a button

Post by Softcore »

Slight coding error there..... the if statement should be included in parenthesis....

so....

Code: Select all

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

Code: Select all

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

Code: Select all

if (x==1)  ...

Code: Select all

if (x>0) ... 

Code: Select all

if (x != 0) ...
can all be replaced by the shorter

Code: Select all

if (x) ...
while the statement

Code: Select all

if (x==0) ...
can be replaced by

Code: Select all

if (!x) ...
;)
jenz
Newbie
Posts: 46
Joined: 21 Jan 2012 06:02

Re: How do I send a increment value to a fader with a button

Post by jenz »

Thanx Softcore!!! I'm learning!!!
Post Reply