Today I found an excellent forum post, Trying to understand... - which I was looking for, for the blinking pad as soon as I hit the pad for launching a clip in Ableton Live.
The formula:
((remote_in==127||remote_in==1)*1+(remote_in==126)*0.5*((time%0.3)<0.15))*0.5-0.5
elj gave an excellent description:
Hi,
Is this script for a 'light' setting? I'm not familiar with the liveclip manipulator, but this is what it seems to be doing:
(remote_in==127||remote_in==1)*1
This part is testing whether remote_in is equal to either 127 OR 1. If either one is true, this part evaluates to 1... otherwise, it evaluates to 0.
(remote_in==126)*0.5*((time%0.3)<0.15)
If remote_in is NOT equal to 126, then this whole expression is 0. If remote_in IS equal to 126, then the time part can be calculated (otherwise, 0*anything = 0, so it doesn't matter what the next part is).
(time%0.3)<0.15
This expression switches between 0 and 1 over time, roughly every 1/3 of a second. You can see how this works if you set up two Monitor objects: set the value of the first one to 'time' (without quotes - 'time' is an internal Lemur variable), and the other set to (time%0.3)<0.15
Then, after all of that is evaluated, it's multiplied by 0.5, and 0.5 is subtracted.
(
(remote_in==127||remote_in==1)*1+ (remote_in==126)*0.5*((time%0.3)<0.15)
)*0.5 - 0.5
So, what this all means is that while remote_in is 126, the light switches between -0.5 and -.25. If remote_in is 1 or 127, the light is 0. If remote_in is not 1, 126, or 127, the light is -0.5.
Hope this helps!
I know for sure it's going to help me for the M4L ClipLauncher.
| < Prev |
|---|






