Timeout function

77 views
Skip to first unread message

Ron Schioldager

unread,
Jun 21, 2013, 1:46:09 AM6/21/13
to ligh...@googlegroups.com

 
The scenario is this - LJ is going to run unattended creating all sorts of patterns... but I want the crowd to be able to interact. So using the IPAD (via OSC) the user flips a switch which deactivates a scene. Got that working bidirectionally between LJ and the IPAD. But, if the user walks away, I want the scene to start up by itself in 15 seconds. I suspect it is a matter of using the timeout(X,Y) function.... but I just cant seem to figure it out.

Mathieu

unread,
Jun 21, 2013, 8:35:20 AM6/21/13
to
Hi Ron,

Good question :)

The trigger function is all you need in this case. This formula returns 100% as long as there's been activity (user constantly flipping the switch!) in the last 15 seconds in the osc(0) value:

trigger(onbeat( osc(0) ), 15, 0, 100, 0)

In your case, you need to reverse the result, since you want to deactivate a scene when there's user activity, so the formula becomes:

100 - trigger(onbeat( osc(0) ), 15, 0, 100, 0)

or

!trigger(onbeat( osc(0) ), 15, 0, 100, 0)

Hope this helps!

Cheers,
Mathieu



Reply all
Reply to author
Forward
0 new messages