General
simple buttom question
Started by digitalson on .
Sign in or create an account to join the conversation.
what was the way to make a button preform 2 functions when holding it down longer,? i want to press it for fast forward and hold it for the fast fast forward,,,any suggestions?
One way to do this is to use an onframe script that "checks" if "x" of the button is on for a period of time....
And then make it so, that if that period of time has passed, an added expression (say, k) will go to 1, and when the button is off k goes to 0. Then map "k" expression to your desired function.
And then make it so, that if that period of time has passed, an added expression (say, k) will go to 1, and when the button is off k goes to 0. Then map "k" expression to your desired function.
can u give me an example,im kinda new to lemur,i spent the last 3 months making a complete nuendo cubase templete ,and it is killer ,but need more multifunction stuff,,,thanks
I used to do it how softcore mentioned, until he pointed out the multislider physics apply even when you change the value from a script. That's what I've been using for my short timers and animations lately, and it works awesome (and is inexpensive I think?)
I gotta run, but:
--- for an on frame script
-make a script execute on frame
-make an array or a couple variables. 1 value will be a trigger and the other will be a timer
-have a script when you press the button and have that turn the trigger array value to '1' or whatever
-in the on frame script have it check when that trigger value ==1 then have the timer value increment (++)
-then if/when the timer reaches your desired value, you trigger the other action and reset the timer and trigger values.
But with a multislider, you can create a trigger/timer system and the timer will just be the time it takes for the multislider to reach '0' or wherever the gravity is pulling to.
ok gotta go!!!
I gotta run, but:
--- for an on frame script
-make a script execute on frame
-make an array or a couple variables. 1 value will be a trigger and the other will be a timer
-have a script when you press the button and have that turn the trigger array value to '1' or whatever
-in the on frame script have it check when that trigger value ==1 then have the timer value increment (++)
-then if/when the timer reaches your desired value, you trigger the other action and reset the timer and trigger values.
But with a multislider, you can create a trigger/timer system and the timer will just be the time it takes for the multislider to reach '0' or wherever the gravity is pulling to.
ok gotta go!!!
Indeed thats what I thought too, exactly why I was happy to discover thisndivuyo wrote:I used to do it how softcore mentioned, until he pointed out the multislider physics apply even when you change the value from a script. That's what I've been using for my short timers and animations lately, and it works awesome (and is inexpensive I think?)
@ digitalson: One question though, is it going to be a Pad object or a switch object?
a pad,,,i want to use ff and rewind and hold longer to use fast rewind and forward ,i saw some one do it ,can someone give me a example for the snytax for the script,,,,thanks i am new to lemur
Here you go....Map the Pad's expression "p" to anything you want to be mapped to the "long Press".
Inside the Pad object you can change the "delay" time (the time that is considered to be the threshold for a long press) to your liking,
Feel free to delete the monitor objects - they are there just to show you that it works.
Pad-withDelayedOutputP.jzml
Inside the Pad object you can change the "delay" time (the time that is considered to be the threshold for a long press) to your liking,
Feel free to delete the monitor objects - they are there just to show you that it works.
Pad-withDelayedOutputP.jzml
thanks sooo much,,,its gonna clear up lots of buttons,,,,and if u or anyone are using cubase ,my lemur project is killer,took me 3 months to do,and had to change lots from nuendo 6.5 to cb pro 8,i will send it when done,it prob has 400kc's
hey i tried the delay thing,and its not really working correct maybe cause its a pad not a button,when pressed and held it still does the 1st command,so heres an idea,,,,can i use a switch to change the action of a button,? cause i can wrap 2 or 4 switches around a button, how can that be done, a switch that changes the output of a button?
this way i can clean up lots of buttons that do simalair things
That can be done too....but I dont get why the Pad doesnt work in the first place....
You do see in the exampel that I sent you that the p is turned to 1 after the delay right? Did you correctly map "p" to your preferred "delayed" action?
You do see in the exampel that I sent you that the p is turned to 1 after the delay right? Did you correctly map "p" to your preferred "delayed" action?
...unless what you want is after the delay to switch off the first command and only have the second.
The example I sent, sends the first command (not delayed) then after the delay sends the second (delayed) BUT the first one is still kept on. Do you, perhaps want when the delayed command is on, the first one to be switched off?
The example I sent, sends the first command (not delayed) then after the delay sends the second (delayed) BUT the first one is still kept on. Do you, perhaps want when the delayed command is on, the first one to be switched off?
Yes...but your switch idea is much better...thanks...I'll send u the transport I made with it