I am have some effects, that really only need to last a few seconds. And I if I forget to turn it off, well, lemur can do that for me.
But I am not able to turn a button of after X amount of time.
I tried to make it with a canvas overlay, send to front, to catch the clicks.
I figured I made 2 expressions, one on "On cursor Down" to make X 0 or 1, and Catch the time on that press, and another on that is set 'On Expression x==1' to see when my delay time is passed.
So far I have no success, really hope someone has a golden tip for me.
Turn on a button for X seconds
Re: Turn on a button for X seconds
To get a button to react after x seconds, you need a few things:
- An expression that is set to the current time, when the button is pressed => timePressed = currenttime
- An expression that calculates the delay => delayPassedcurrenttime - timePressed > delayTime
- An script that listens to that expression and react if it evaluates true => delayPassed == 1
I've attached an example. It has a lot of extra objects to show the above logic.
- An expression that is set to the current time, when the button is pressed => timePressed = currenttime
- An expression that calculates the delay => delayPassedcurrenttime - timePressed > delayTime
- An script that listens to that expression and react if it evaluates true => delayPassed == 1
I've attached an example. It has a lot of extra objects to show the above logic.
- Attachments
-
- Button Reset.jzml
- (4.46 KiB) Downloaded 108 times
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
https://soundcloud.com/mrcorba
Re: Turn on a button for X seconds
Wow, I think I understand it, and learned some new tricks about the scripting.
So the expressions keep on monitoring the values, regardless if you do anything with the button.
Thank you soo much, spend too much time in trying to solve this one.
So the expressions keep on monitoring the values, regardless if you do anything with the button.
Thank you soo much, spend too much time in trying to solve this one.
Re: Turn on a button for X seconds
It is also possible to use a Pad and adjust the behaviour parameters and message timing to achieve a delayed turn-off
It can also be used as a ramp up/down if controlling send/return volume rather then just being on-off..
cheers
It can also be used as a ramp up/down if controlling send/return volume rather then just being on-off..
cheers
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]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]