Page 1 of 1

Button to send specific number to program-change fader?

Posted: 22 Jan 2013 12:19
by anders_bach
Hi,

Is it possible to make a "button"-object in "pad"-mode send a specific number to a "fader"-object sending program change-messages?
For example: pressing one button makes the fader in the interface go to 98, another button makes the fader in the interface go to 56 and so on.

Is this possible?

I really hope you can help!
Thanks a lot.
Best,
Anders Bach, Denmark

Re: Button to send specific number to program-change fader?

Posted: 22 Jan 2013 15:53
by Softcore
All obejcts variables have a "native" range of 0 to 1. This means you can easily for example make a fader go to its "halfway" position by adding the following script in your pad-button object

on expression x, rising (up arrow)

Code: Select all

Fader.x=0.5;
So, the best way to go about this is to set up a monitor object so that it "sees" the fader's x values

In the monitor object define

value=Fader.x

Now move the fader to the positions you would like the pad-buttons to set it to....Observe the monitor's value and copy those values in the above script (the first one for the pads). of course you can then go ahead and add a lot of pad-buttons and add the prefered value for the script above in each one of them.

here is an example of the logic:
pads-set-fader.jzml
(9.71 KiB) Downloaded 95 times

Re: Button to send specific number to program-change fader?

Posted: 23 Jan 2013 09:03
by alloedee
Sorry to steal this topic, but I have a question regarding this.

What shall I name the fader in the script, if I want the button to control a fader inside a container, when the button is outside?

Re: Button to send specific number to program-change fader?

Posted: 23 Jan 2013 09:16
by Macciza
Hi
You reference it as Container.Fader
MM

Re: Button to send specific number to program-change fader?

Posted: 23 Jan 2013 11:07
by alloedee
Hmmm, it does'nt seem to work

Re: Button to send specific number to program-change fader?

Posted: 23 Jan 2013 11:24
by Softcore
Double check that the reference has the correct names - bare in mind it is case sensitive......

Containername.Fadername should work! Perhaps you have named your container something other than "container"?

Re: Button to send specific number to program-change fader?

Posted: 23 Jan 2013 11:55
by alloedee
Hmm strange, I dont know what went wrong, but now its working.

Thx man :D

Re: Button to send specific number to program-change fader?

Posted: 23 Jan 2013 18:48
by anders_bach
Softcore wrote:All obejcts variables have a "native" range of 0 to 1. This means you can easily for example make a fader go to its "halfway" position by adding the following script in your pad-button object

on expression x, rising (up arrow)

Code: Select all

Fader.x=0.5;
So, the best way to go about this is to set up a monitor object so that it "sees" the fader's x values

In the monitor object define

value=Fader.x

Now move the fader to the positions you would like the pad-buttons to set it to....Observe the monitor's value and copy those values in the above script (the first one for the pads). of course you can then go ahead and add a lot of pad-buttons and add the prefered value for the script above in each one of them.
Thanks so much for the reply.
This is my first time scripting in Lemur, so I hope you'll be patient with me. :)

I can't seem to figure out where to write the fader's values? I've created a new pad and made an "act" script like your's, written "On Expression" "x" and with a rising up arrow - but where to write the value?

I hope you can help me out with this!
Thanks.
Best,
Anders

Re: Button to send specific number to program-change fader?

Posted: 25 Jan 2013 11:41
by Softcore
Replace 0.5 with the desired values of course!!! In the example project I posted check out the scripts in all the pads to understand!