Page 1 of 2

simple buttom question

Posted: 26 Apr 2015 06:02
by digitalson
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

Posted: 26 Apr 2015 19:24
by Softcore
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.

Re: simple buttom question

Posted: 27 Apr 2015 14:43
by digitalson
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

Posted: 27 Apr 2015 23:25
by ndivuyo
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!!!

Re: simple buttom question

Posted: 28 Apr 2015 21:17
by Softcore
ndivuyo 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?)
Indeed thats what I thought too, exactly why I was happy to discover this

@ digitalson: One question though, is it going to be a Pad object or a switch object?

Re: simple buttom question

Posted: 29 Apr 2015 15:12
by digitalson
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

Posted: 29 Apr 2015 19:43
by Softcore
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.

Re: simple buttom question

Posted: 01 May 2015 07:00
by digitalson
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

Re: simple buttom question

Posted: 02 May 2015 04:54
by digitalson
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?

Re: simple buttom question

Posted: 02 May 2015 04:55
by digitalson
this way i can clean up lots of buttons that do simalair things