Button to send specific number to program-change fader?

Discuss problems and solutions.
Post Reply
anders_bach
Newbie
Posts: 6
Joined: 09 Jul 2012 17:56

Button to send specific number to program-change fader?

Post 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
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

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

Post 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 94 times
alloedee
Regular
Posts: 55
Joined: 29 Dec 2012 12:35

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

Post 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?
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

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

Post by Macciza »

Hi
You reference it as Container.Fader
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
alloedee
Regular
Posts: 55
Joined: 29 Dec 2012 12:35

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

Post by alloedee »

Hmmm, it does'nt seem to work
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

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

Post 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"?
alloedee
Regular
Posts: 55
Joined: 29 Dec 2012 12:35

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

Post by alloedee »

Hmm strange, I dont know what went wrong, but now its working.

Thx man :D
anders_bach
Newbie
Posts: 6
Joined: 09 Jul 2012 17:56

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

Post 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
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

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

Post 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!
Post Reply