-
Notifications
You must be signed in to change notification settings - Fork 0
QS1 Expr Usage
home/reference v1.x/{expressions}/Usage
this is a complete list where inside the quescript {expressions} can be used
<anim name="anim1" duration="{expr}" fadeout="{expr}">
<track name="track1" fadeto="{expr}">0. {expr}</track>
<send>/sendadress command {expr} {expr}</send>
</anim>
<expr>{expr}</expr>
<expr>
<wait until="{expr}"/>
<wait while="{expr}"/>
<wait>
<print>{expr}</print>
<print>
<send>/sendadress {expr}</send>
<send>
<out>{expr}</out>
<out>
<osc>{expr}</osc>
<osc>
<trigger>{expr} {expr}</trigger>
<trigger>
<while init="{expr}" condition="{expr}" next="{expr}">
</while>
<while>
<if true={expr}>
<else>
</else>
</if>
<if>
###Usage Examples
<expr>{global = if(global==0, 45, global)}</expr>
Allows to execute expressions. Since it is also possible to assign variables inside expressions, more complex algorithmic constructions are possible.
<anim name="anim1" duration="10s" fadeout="2s">
<track name="t1" fadeto="{log(global)}">0. {global}</track>
<track> in combination with <anim> creates two variables that changes its value over time, from the first set value (0) to the last set value ({global}) in 10 seconds.
the name of the first variable is t1 and can only be used inside the <anim> command. the name of the second variable is anim1.t1 and can be used inside the <que> command (as soon as the <anim> node was executed)
<send>/sendadress command {t1} {anim1.t1}</send>
this <send> command references the created values and creates a send message.
</anim>
<wait until="{anim1.t1 > (var_1 / 2)}"/>
the <wait> command waits until the value of the variable anim1.t1 is greater than half of val_1. If this <wait> command was right after the <anim> command, it would wait for 5s before the script carries on, because it takes the <anim> command 10 seconds to reach var_1 for the variable anim1.t1.
(c) by Martin Froehlich maybites