simple buttom question
-
- Regular
- Posts: 143
- Joined: 21 Mar 2015 02:26
simple buttom question
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?
Re: simple buttom question
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.
-
- Regular
- Posts: 143
- Joined: 21 Mar 2015 02:26
Re: simple buttom question
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
Re: simple buttom question
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!!!
Re: simple buttom question
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?
-
- Regular
- Posts: 143
- Joined: 21 Mar 2015 02:26
Re: simple buttom question
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
Re: simple buttom question
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.
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.
- Attachments
-
- Pad-withDelayedOutputP.jzml
- (4.98 KiB) Downloaded 86 times
-
- Regular
- Posts: 143
- Joined: 21 Mar 2015 02:26
Re: simple buttom question
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
-
- Regular
- Posts: 143
- Joined: 21 Mar 2015 02:26
Re: simple buttom question
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?
-
- Regular
- Posts: 143
- Joined: 21 Mar 2015 02:26
Re: simple buttom question
this way i can clean up lots of buttons that do simalair things