Logic node
Delay
A tape-style delay line for data: the node continuously records its input and plays it back Delay seconds later, exact in real time regardless of frame rate. Beyond the classic single delayed output, the Taps output publishes a whole array of progressively delayed copies of the signal — the key ingredient for cascading "snake" and trail choreography when combined with Replicator or Loop.
Inputs
| Port | Type | Default |
|---|---|---|
| ValueThe live signal to record and play back later. Any value works; anything not a real number is stored as 0. | float | 0 |
| DelayHow far back in time to read, in seconds — and with several taps, the gap between neighbouring copies. Clamped to 0…30 s. | float | 0.05 |
| TapsHow many trailing copies the Taps array carries, each one Delay further behind the last. Clamped to 1…256; 1 makes it a plain delay. | int | 1 |
Outputs
| Port | Type |
|---|---|
| ValueThe live signal to record and play back later. Any value works; anything not a real number is stored as 0. | float |
| TapsHow many trailing copies the Taps array carries, each one Delay further behind the last. Clamped to 1…256; 1 makes it a plain delay. | structure |
How It Works
Recording. Every frame, the node appends the current input value together with a timestamp from its own wall clock to a per-instance history buffer. Using honest wall-clock time (not frame counts) means the delay is measured in true seconds — frame drops, editor stalls, or variable refresh rates never stretch or compress it. Duplicate pulls within the same frame (closer than 0.5 ms) are skipped, and non-finite input values are recorded as 0.
Playback. The delayed value is looked up by binary search over the timestamped history, with linear interpolation between the two nearest samples. Interpolation is always on: at display rates the difference versus stepped readback is sub-frame, and its real job is gliding smoothly across recording gaps caused by dropped frames.
Warm-up. While the recorded history is still younger than the requested delay (right after the node is created or the app starts), the output holds the first recorded value instead of jumping from zero — a cascade "grows in" naturally.
Multi-tap. The Taps output is an array of Taps copies of the signal where Delay is the spacing between elements:
Tap index i | Value |
|---|---|
| 0 | live input, x(t) |
| 1 | x(t − Delay) |
| 2 | x(t − 2·Delay) |
| … | … |
| N−1 | x(t − (N−1)·Delay) |
Tap 0 is always live; each next element trails the previous by another Delay. One knob therefore controls the whole cascade: turning Delay stretches or compresses the wave speed travelling through the tap array.
Memory management. The history is pruned every frame to the window that can actually be requested — Delay × (Taps − 1) plus a one-second margin — with a hard maximum window of 30 seconds. Pruning is amortized O(1) per frame.
State lifecycle. History is volatile: it is never saved with the project and is discarded when the node is deleted. There is deliberately no Run/Reset input — after a load or a parameter change, the buffer simply refills on its own within one delay window. Changing Delay while running produces momentary tape-speed artifacts (skips), which is the expected character of a tape delay.
Parameters in Depth
Value (float, default 0) — the signal to record. Any float stream works: LFO waves, audio levels, mouse position, sensor data. NaN/Inf inputs are sanitized to 0 before entering the history.
Delay (float, default 0.05) — the delay time in seconds, clamped to 0 … 30. With a single tap this is the classic delay time; with multiple taps it is the spacing between consecutive taps. At 0 the output equals the input. Because history capacity follows the total window Delay × (Taps − 1) (capped at 30 s), very long delays combined with many taps will truncate the oldest taps to the 30-second horizon.
Taps (int, default 1) — how many delayed copies to publish in the Taps array, clamped to 1 … 256 (matching the Replicator clone cap). 1 makes the node a plain single delay; larger values build the cascade. Tap 0 in the array is always the live value, so an N-tap array spans 0 … (N−1)·Delay seconds of the past.
The outputs: Value (float) is the single delayed signal x(t − Delay); Taps (structure array) is the full multi-tap cascade described above.
Use Cases
- Cascading clone animation: LFO → Delay (Taps = clone count) → Replicator, where inside the Replicator an Iteration (Index) → Array Get picks each clone's own tap — every copy of a Circle 2D repeats the motion slightly later, producing a snake following one live signal.
- Mouse trail: Mouse (X and Y through two Delay nodes) → Circle 2D → Canvas positions an echo cursor that follows the pointer with a fixed lag; several taps via Replicator turn it into a comet tail.
- Audio-reactive ripple: Audio Analysis (level) → Delay (Taps = 32, Delay = 0.06) → Loop reading Array Get per iteration → bar heights on Rectangle clones — the audio envelope visibly travels outward through the bars.
- Echoed beat flash: Audio Beat Detection (Kick Prob) → Delay → Remap → Circle 2D (Alpha) creates a delayed after-flash behind the immediate beat response, since bools arriving over a cable are carried as 0/1 floats.
- Comparing now vs. then: Time-varying data → Delay (Delay = 1) alongside the live value into Math (Subtract) measures how much a signal changed over the last second — a frame-rate-independent slope estimate.
- Choreographed L-System growth: one LFO drives the Growth of an L-System while Delay taps of the same LFO drive Position or Rotation of additional canvases, so layered copies evolve in staggered time.
Tips
- The Delay node must live outside a Loop or Replicator container: it is stateful (it owns the history), while container bodies re-run per iteration. Publish the Taps array in and index it with Iteration → Array Get.
- Delay is exact in seconds, not frames. For a "one frame ago" value for difference detection, the Delta node is the better tool; Delay shines for perceptible, tunable time offsets.
- Riding the Delay input with a fast modulator causes deliberate tape-skip artifacts — usable as an effect, but keep Delay static for clean cascades.
- Startup is graceful by design: until the buffer is old enough, taps hold the first recorded value rather than snapping from zero, so cascades fade in without pops.
- History is volatile — reopening a project starts with an empty buffer that refills within one delay window; nothing needs resetting manually.
- Related nodes: Smooth (continuous lag/filtering rather than discrete delay), Delta (per-frame change), Integrator (accumulate over time instead of remembering the past), Point Trail (positional trails at the points level).
Open Delay in the interactive catalog →
Delay 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.