script to control custom button with pad??

Discuss problems and solutions.
Post Reply
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

script to control custom button with pad??

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

Re: script to control custom button with pad??

Post 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

Code: Select all

Custombutton_name.x=1;
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)
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: script to control custom button with pad??

Post 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
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: script to control custom button with pad??

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

Re: script to control custom button with pad??

Post 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.
Attachments
example.jzml
(9.83 KiB) Downloaded 82 times
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: script to control custom button with pad??

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