Page 1 of 1
script to control custom button with pad??
Posted: 11 Mar 2013 13:16
by tput73
Deep into lemur with Traktor but I cannot for the life of me figure out
how to make a custom button send a midi message right when pad release
is to 0.
Can anyone help??
thanks
T
Re: script to control custom button with pad??
Posted: 11 Mar 2013 15:28
by Softcore
Pads, switches and custom buttons have the x value to indicate on off state (off = 0, on =1). To make them interact with each other is as easy as adding a script to the "sender" object to set the "receiver" object's x.
In your case.....Map your custom button to the Midi message you want.
Go to your pad button
Add script.....
On expression x, and then make sure you change the "any" to "drop to zero" (arrow pointing down). This ensures that the script will "run" when the pad's x "drops to down".....in other words when the pad is released.... Then type the following script
obviously, this will result in the custom button turning on when the pad is released - I think this is what you are asking. (and obviously change the name in the code above to the actual name of your custom button, case sensitive)
Re: script to control custom button with pad??
Posted: 11 Mar 2013 17:17
by tput73
Dunno what I'm doing wrong?
Custom Button's name is CustomButton2
So script read:
Custombutton_CustomButton2.x=1
I do have release on pad set at various
levels so it slowly reaches zero, does this matter?
Anyhow custom button not doing anything
when pad gets to zero
What am I doing wrong?
and thanks so much for helping
Re: script to control custom button with pad??
Posted: 11 Mar 2013 18:21
by tput73
Ok changed custom button name to Mute
So now script reads:
Mute.x=1;
It goes to black now so no syntax errors
But custom button doesn't react when
pad reaches zero?
Re: script to control custom button with pad??
Posted: 11 Mar 2013 18:55
by Softcore
You can even make it go on as soon as you leave the pad by using "-" instead of the "drop to 0" arrow...."-" means when x is decreased - dont forget, the script is in the Pad so the plain, alone x refers to the pad's x.
See attached example.
Re: script to control custom button with pad??
Posted: 11 Mar 2013 19:05
by tput73
SUCCESS!!,
I was trying to do this on the ipad editor and forgot to put an x in the space under expression-DUH!
Thank you so much, this opens new doors!
If you use traktor lemme know i'll post my mapping'
Tim