• No results found

12 TASKS AND EXPRESSIONS 2

In document Version 4 SENSATION CREATION (Page 185-193)

The Task window allows you to create multiple auxiliary timelines, and to specify their triggering conditions using expressions. Auxiliary timelines behave very much like the main timeline, but can be started and stopped independently.

If an auxiliary timeline displays images on stage, those images will appear on top of any images originating from the main timeline. You can control the order in which images from multiple, concurrent auxiliary timelines interact by dragging the tasks to the desired order in the Task window.

Drag a task towards the top of the Task list to make its images appear in front of other tasks’ images.

See “Task Window” on page 100 for more information.

Click to add more tasks. Task’s triggering expression.

186 Chapter 12 Tasks and Expressions

AUXILIARY TIMELINE Double-clicking an item in the Task list opens its associated auxiliary timeline.

HINT: Change the name shown in the Task list by first opening the auxiliary timeline and then choosing “Timeline Settings” on the Timeline menu.

Starting and Stopping Manually An auxiliary timeline has three primary modes:

• Stopped (red stop button is illuminated). In this mode, the timeline doesn’t contribute to the stage.

• Paused (neither button is illuminated). In this mode, the time isn’t moving, but any cues at the current time position does contribute to the stage. • Playing (green play button is illuminated).

You can control these modes manually by clicking the buttons either in the Task window or in the lower left corner of an open auxiliary timeline window.

NOTE: You don’t need to open an auxiliary timeline to run it. Just click its play button in the Task window.

Double-click the task name to open its timeline.

Click here to start, stop or pause the auxiliary timeline…

…or click here after opening its timeline window.

Starting from an Input Alternatively, you can trigger an auxiliary timeline using an external signal, brought in as an input in the Input window. For details on how to configure inputs see page 173. “Triggering Tasks” on page 178 describes how you use an input to trigger a task. The task will be started when the value of the trig- gering expression becomes non-zero. This expression may combine multiple inputs and constants using operators (see “Expression” on page 188). For example, to trigger a task when the input goes above 50%, enter an expression such as this one:

ModWheel > 0.5

NOTE: The task will be triggered only when the value of the expression goes from being zero to being non-zero. In order to trigger the task again, the value must first return to zero.

Starting from Another Timeline You can use a Control cue to position, start, stop or pause an auxiliary timeline from another timeline. See “Controlling Other Timelines” on page 172.

NOTE: You can not control the Main Timeline from an auxiliary timeline. Only Control cues on the Main Timeline can control the Main Timeline.

To see the current value of an expression, point at the expression using the mouse.

188 Chapter 12 Tasks and Expressions

Stopping an Auxiliary Timeline An auxiliary timeline will stop automatically after playing to its end.

HINT: Set the length of an auxiliary timeline using the Timeline Settings command on the Timeline menu while the auxiliary timeline’s window is active.

Alternatively, use a Control cue (either on the timeline itself, or on another time- line) to stop it. When stopped, its images will disappear from the stage.

EXPRESSION An expression is a simple mathematical formula, combining values such as

inputs and numeric constants using operators in a way that yields a numeric result. Expressions are used to:

• Start tasks, as described on page 187 and under “Triggering Tasks” on page 178.

• Influence tween tacks (see “Controlling Tween Tracks” on page 176). In its most basic form, an expression consists of a single value, such as an input (this example assumes that an input with the name “ModWheel” exists in the Input window – see “MIDI Controller Input” on page 174):

ModWheel

If this expression is used in the Trigger column of the Task window, that task will be started when the ModWheel’s value becomes non-zero (that is, when the modulation wheel on the attached MIDI device is moved from its zero position). Likewise, if this expression is used as a formula for an Opacity tween track, the opacity will be controlled only by the modulation wheel (that is, the value of the tween track itself will have no effect).

Using Numeric Operators In some cases, you may want to combine multiple values. For instance, in the previous example, you may change the expression so that the modulation wheel modulates the value of the cue’s Opacity tween track by entering the following expression into its formula dialog box:

This expression combines the value of the ModWheel input with the value coming from the tween track itself by using the TweenValue identifier, which provides the enclosing tween track’s current value. Since both values are in the range 0 through 1, multiplying them in this way will work as desired.

Alternatively, you may want to combine the two values so that the opacity can be controlled by either the tween track or the modulation wheel. This can be accomplished by changing the formula to

TweenValue + ModWheel

Now the resulting image will appear on stage if the tween track or the external input says so. Note that if both the tween track and the input are at their maximum value, the result of the expression will be 2. However, the opacity

Enter an expression for a tween track by clicking its formula button (see page 177).

190 Chapter 12 Tasks and Expressions

value is effectively clipped to the range 0 through 1 (as the image can’t be more than fully opaque or fully transparent). Most parameters work in this way, with the notable exception of the color hue, as it allows the color wheel to be rotated multiple revolutions.

Using Relational Operators When using expressions to trigger tasks, it is often useful to specify a threshold for the triggering value. If the input is used on its own, the task will be triggered as soon as the input leaves zero. If you prefer the input to exceed a certain value, you can use a “greater than” operator to test for this:

ModWheel > 0.5

This operator yields a value that is 1 if the value on the left hand side is greater than the value on the right hand side, otherwise its value is 0. Likewise, if you want to trigger the task when the value becomes zero (rather than when it leaves zero), you can write:

ModWheel = 0

This uses the “equals” operator, yielding 1 if the value on the left is the same as the value on the right, else it yields 0.

Using Logical Operators Occasionally you may want to create more complex triggering conditions, combining multiple inputs, so that the task will only be triggered when all conditions are met. That can be accomplished using the “and” operator:

ModWheel > 0.5 && MiddleC

This will trigger the task when the modulation wheel is above 50% and the MiddleC key is pressed (assuming here that MiddleC is a MIDI Note input).

List of Operators This is a list of the operators supported by WATCHOUT, shown in their order of precedence.

Most operators work as expected. The Modulo operator yields the remainder of an integer division. All other numeric operators yield results with fractional digits. All relational operators (<, >, etcetera) yield 1 if the relation is true, 0 if it is false. Likewise, the logical operators yield 1 for true and 0 for false.

Operator Description

( ) Parenthesis. Used to group sub-expressions.

- Unary Minus.

* / % Multiplication, Division and Modulo. + - Addition and Subtraction.

< <= > >= = !=

Less Than, Less Than or Equal To, Greater Than, Greater Than or Equal To, Equal, Not Equal.

&& Logical And.

In document Version 4 SENSATION CREATION (Page 185-193)

Related documents