Trigger
Turns a changing signal into events. Fires on the frame a value crosses a threshold, rather than staying on for as long as it is above one.
Category: Math Menu path: Math > Trigger
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
in | scalar | input | The signal to watch — an Audio Source's Amplitude, an Oscillate, a Time, anything that produces a number |
out | scalar | output | output on a firing frame, 0 on every other frame |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
mode (UI: "Fire On") | enum | Rising | Rising — the frame the signal crosses up through the threshold. Falling — the frame it crosses down. Either — both. Above / Below — sustained, on for every frame on that side of the threshold. |
threshold | scalar, keyframeable | 0.5 | The level to compare against. Exactly at the threshold counts as above. |
output | scalar, keyframeable | 1 | What a firing frame emits. Set it to the particle count you want and wire straight into Point Emitter's Burst — no Math node in between. |
How It Works
Math with a Step already answers "is this signal above x", but that is a gate: it stays at 1 for as long as the signal is high, so a kick drum makes an emitter fire on every frame of its decay. An event is a crossing, and a crossing is only visible by comparing this frame with the last one.
Trigger looks at its input at the current frame and one frame earlier. Rising fires only on the frame where the previous value was below the threshold and this one is at or above it. On the frames that follow, while the signal is still high, it outputs 0.
Above and Below are the sustained gate, kept here so one node answers the whole question instead of sending you to two.
The layer's first frame never fires an edge. There is no previous frame to compare with, and inventing one would put a spurious event at the start of every layer that uses a trigger. The sustained modes are unaffected.
No hysteresis, deliberately. Trigger holds no state — it is a pure function of the input at two frames — which is what lets it scrub, export and replay like everything else with no cache. The cost is that a signal dithering across the threshold fires on every crossing. Smooth it upstream, or raise the threshold above the noise.
Usage Examples
A burst of particles on every beat
Audio Source.amplitude → Trigger (Rising, threshold to taste, output 200) → Point Emitter.burst_in, with the emitter's Rate at 0. Each time the track crosses the threshold, two hundred particles are born on that one frame and nothing in between. Raise spread to 360 for an omnidirectional pop.
A shot at a steady interval
Point Emitter's Burst On: Every Nth does this without a Trigger at all, so reach for that first. Use Oscillate (Sine) → Trigger (Rising, threshold 0) when the tempo has to come from a signal rather than a fixed frame count.
Emit only while something is happening
Audio Source.amplitude → Trigger (Above) → Math (Multiply) → Point Emitter.rate_in. Here you want the gate rather than the edge: particles stream for as long as the signal is loud.
Tips
- Trigger's
outputis a number, not a flag, so it doubles as the amount. Into Burst it is a particle count; intorate_init is a rate. - Wire it into Burst, not Rate, for bursts. Rate is integrated over the frame, so a burst of two hundred through Rate means typing six thousand.
- Any scalar works as the signal. Comp Details, Time and Math chains all trigger just as well as audio.
Related Nodes
- Point Emitter —
burst_infor bursts,rate_infor gates - Audio Source —
amplitudeis the usual signal - Oscillate — a steady signal to trigger from
- Math —
Stepis the sustained gate without the edge detection