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:
o2p:- Object-to-path animations (faders, sliders)audio:- Audio analysis signals (when available)osc:- External OSC inputrotate:,scale:- Animation state values
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
- Condition not met: Cue is skipped entirely
- Re-triggering: If the playhead crosses the cue again later and the condition is now met, the cue will fire
- Works with all cues: Animation, audio, navigation, OSC - any cue type accepts
if:
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
- Conditions are evaluated against the ParamBus signal store
- Signal must exist and have a numeric value for comparison to succeed
- Unknown signals or
undefinedvalues cause condition to fail (cue skipped) - Floating point comparisons use a small epsilon (0.0001) for
==and!=
Tip: use ← → or ↑ ↓ to navigate the docs