Logic node
Hold Trigger
Catches a bool trigger and holds it TRUE for a set time in milliseconds — the timed companion to Do Once. One-frame pulses (Video Player Finished, beat triggers, Do Once Out) are easy to miss and too short to drive anything visible; Hold Trigger stretches the event into a state long enough to see, gate, or fade with. Retrigger restarts the clock on new triggers, Reset cancels the hold, and the Remaining output eases 1→0 across the hold for driving fades directly.
Inputs
| Port | Type | Default |
|---|---|---|
| TriggerThe bool to catch — a RISING edge (false→true) starts the hold. One-frame pulses (beat triggers, Video Player Finished, Do Once Out) become a state long enough to see. Already true on the very first frame counts as an edge. | bool | false |
| Hold TimeHow long Out stays true, in MILLISECONDS (default 500). Read live each frame — shortening it mid-hold ends the hold early, knobs behave like knobs. 0 = the bare one-frame pulse (pure edge pass-through). | float | 500 |
| RetriggerOn (default): a new Trigger edge DURING the hold restarts the timer — rapid beats keep Out lit. Off: edges while holding are ignored; the hold must run out before the next one can start. | bool | true |
| ResetRising edge cancels the hold immediately — Out drops to false this frame. Applied BEFORE Trigger, so Reset and Trigger in the same frame start a fresh hold. Held true at startup it is inert (a stuck Reset cable can't jam the node). | bool | false |
Outputs
| Port | Type |
|---|---|
| Out | bool |
| Remaining | float |
How It Works
Hold Trigger is a monostable: idle until a rising edge (false→true) arrives on Trigger, then Out goes true and stays true for Hold Time milliseconds of wall-clock time, then drops back to false. The hold carries the state — the input can return to false immediately without shortening it.
Frame-by-frame behavior:
- Expiry first. A hold whose time has run out is cleared before anything else — so a hold that ends this frame frees the slot for a same-frame trigger even with Retrigger off.
- Reset. A rising edge on Reset cancels the hold immediately. Reset applies before Trigger, so Reset+Trigger in one frame starts a fresh hold.
- Trigger. A rising edge starts (or, with Retrigger on, restarts) the hold clock.
- Output. Out is true while a hold is active; Remaining reports the unexpired fraction, easing linearly 1→0, and sits at 0 while idle.
Edge semantics (system-wide, shared with Do Once and Counter): a Trigger already true on the very first frame counts as an edge (events pass through app startup); a Reset already true on the first frame is ignored (a held-true Reset cable must not jam the node at start). A held-true Trigger is a level, not an event — it starts exactly one hold at its initial edge and never re-fires.
Timekeeping. The hold runs on the node's own wall clock, so frame drops cannot stretch it. Hold Time is read live every frame — shortening it mid-hold ends the hold early, lengthening it extends the current hold (knobs behave like knobs). The node keeps processing while its inputs are quiet, so the drop back to false always happens on schedule.
State lifecycle. The hold clock and edge memories are volatile — never saved. Loading a project starts the node idle.
Parameters in Depth
Trigger (bool, default false) — the event input. Starts the hold on a rising edge. Float cables count as true above 0.5, non-zero ints as true, so probability-style signals through Compare work directly.
Hold Time (float, default 500) — hold duration in milliseconds. At 0 the node degenerates into a pure edge detector: Out is a bare one-frame pulse per rising edge.
Retrigger (bool, default true) — on: a new rising edge during an active hold restarts the clock from zero (each beat extends the light). Off: edges while holding are swallowed — the hold must run out before the next trigger is accepted (a fixed-length, non-extendable window).
Reset (bool, default false) — cancels the active hold on a rising edge; Out drops to false the same frame.
Outputs: Out (bool) — the held state; Remaining (float) — 1 at the trigger, easing linearly to 0 at expiry, 0 while idle — multiply it into Opacity for a free fade-out per event.
Use Cases
- Visible beats: Audio Beat Detection (Kick) → Hold Trigger (120 ms) → a shape's Enable — a one-frame trigger becomes a flash the eye can actually register.
- End-of-clip cards: Video Player (Finished, Loop mode) → Hold Trigger (2000 ms) → Text as Image visibility — a caption appears for two seconds at every loop point.
- Fade per event: Remaining → generator Opacity — each trigger paints the layer in and lets it die away over the hold, no LFO needed.
- Cooldown gate: Retrigger off + Out → Logic NOT → gate a downstream Do Once Reset — at most one accepted event per hold window (a rate limiter with a visible state).
- Chained players with dwell: player A Finished → Hold Trigger → player B Play — B runs exactly while the hold lasts, giving A's last frame a deliberate dwell before the cut.
- Momentary UI states: Keyboard key → Hold Trigger (800 ms) → Switch choosing an “ARMED” overlay — tap once, the state shows briefly and tidies itself away.
Tips
- Hold Trigger holds time; Hold Value holds data. To freeze a number at the trigger moment AND show it briefly, use both: the same trigger into Hold Value (Update) and Hold Trigger (visibility).
- With Retrigger on, a trigger stream faster than the hold keeps Out permanently true — that is the classic “activity light”: true while events keep coming, dropping only after the stream has been quiet for Hold Time.
- Remaining is linear by design — shape it with a Math Expression (for example
pow(r, 3)) for snappier decays before driving opacity. - Hold Time 0 turns the node into a clean edge-to-pulse converter — useful in front of strictly pulse-driven consumers when a source only offers a level.
- Related nodes: Do Once (gate an event exactly once — stateful sibling), Counter (count events), Integrator (accumulate them), Smooth (soften continuous floats rather than stretch bools).
Open Hold Trigger in the interactive catalog →
Hold Trigger is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.