Conditional Cue Triggering

The if: parameter allows any cue to be conditionally triggered based on the current value of a control signal. This enables scores that respond dynamically to performer input, external OSC data, or other real-time signal sources.


Syntax

cue(..., if:signal>threshold)
cue(..., if:signal)              // truthy check (value > 0)

Examples

audio(src:hit.wav, if:fader1.t>0.7)
scale(dur:2, if:slider.y>=0.5)
nav(target:B, if:o2p:knob.t>0.8)
rotate(dur:3, speed:90, if:mic.onset)

Signal Path Formats

Signals can be referenced in two formats:

Format Example Description
source.channel fader1.t Short form - source ID and channel
type:source.channel o2p:slider.t Full form with signal type prefix

Common signal types:


Comparison Operators

Operator Meaning
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
== Equal (with small tolerance for floats)
!= Not equal

If no operator is provided, the condition performs a truthy check (signal value > 0).


Behaviour


Use Cases

Amplitude-gated audio

audio(src:accent.wav, if:mic.amp>0.8)

Only plays when input amplitude exceeds threshold.

Performer-controlled branching

nav(target:sectionA, if:fader1.t>0.5)
nav(target:sectionB, if:fader1.t<=0.5)

Score navigation depends on fader position.

Animation triggered by external control

scale(dur:2, values:[1,2,1], if:osc:/trigger>0)

Animation only starts when OSC message received.

Conditional visual feedback

fade(target:highlight, to:1, dur:0.2, if:slider.y>=0.9)

Element fades in when slider reaches top position.


Technical Notes

Tip: use ← → or ↑ ↓ to navigate the docs