Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@maruaudio/dsp/delays/cross-feed is a stereo delay of two fractional lines, each with its own time, whose feedback splits into a same-side and a cross-side gain. Each line writes seed + same·ownOut + cross·otherOut through an in-loop RBJ high-pass and low-pass (@maru/filters-biquad) and the saturator x / (1 + |x|) (unity slope at zero, |y| < 1). Reads interpolate linearly and swing with a quadrature sine pair. A time change crossfades the old read into the new one over 48 ms at equal power (sin/cos), without a pitch glide.

const state = initCrossFeedDelayNode(48000, 2) // capacity in seconds
setCrossFeedDelayLeftSeconds(state, 0.375)
setCrossFeedCross(state, 0.4)
crossFeedDelayNodeTick(state, left, right)
const wetL = crossFeedDelayLeft(state), wetR = crossFeedDelayRight(state)

Parameters

SetterRange the setter enforcesDefaultUnit
setCrossFeedDelayLeftSeconds / …RightSeconds0 to 30 s, then 1 sample to the capacity0.25 / 0.5s
setCrossFeedSame / setCrossFeedCross0 to 0.98 each0 / 0linear
setCrossFeedLowCut / setCrossFeedHighCutBiquad clamp, 10 Hz to 0.45 × rate220 / 6000Hz
setCrossFeedTone4812 or 48 dB/oct loop filters; call before rendering12 dB/octflag
setCrossFeedModRate / …ModDepthSeconds0 to 40 Hz / 0 to 0.05 s peak swing0 / 0Hz, s

Lifecycle

initCrossFeedDelayNode(sampleRate, maxSeconds) allocates both lines once (capacity 0.01 to 30 s plus 50 ms headroom; a bad rate gives 48 kHz) → setters → crossFeedDelayNodeTick(state, seedL, seedR) → read the two outputs. resetCrossFeedDelayNode clears all synchronously, outside realtime; in realtime, clearCrossFeedDelayNodeStep zeroes at most 256 samples per call up to crossFeedDelayClearStoreCount, then finalize…Clear resets fades, phase and filters. Controls and capacity are kept.

When to use it

Tempo-synced stereo echoes that bounce or stay on their side, filtered each pass, re-landing on the grid when the tempo or division changes.

Limits

  • Stereo, wet only. Same and cross clamp separately, so their sum can reach 1.96; the saturator bounds the loop. A retune mid-fade adopts the current target.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Cross feed delay left seconds crossFeedDelayLeftSeconds

Set the left line's delay, in seconds. Starts a dual-read crossfade when the value actually moves.

floatsetCrossFeedDelayLeftSeconds
Cross feed delay right seconds crossFeedDelayRightSecondsfloatsetCrossFeedDelayRightSeconds
Cross feed same crossFeedSame

Per-pass gain that re-enters the SAME line.

floatsetCrossFeedSame
Cross feed cross crossFeedCross

Per-pass gain that CROSSES into the other line.

floatsetCrossFeedCross
Enabled enabled

Select 12 or 48 dB/octave during preparation, before rendering audio. Fixed sections avoid allocations in setters/tick. Other delay consumers retain the original 12 dB/octave default.

boolsetCrossFeedTone48
Cross feed low cut crossFeedLowCut

In-loop high-pass cutoff, both lines.

floatsetCrossFeedLowCut
Cross feed high cut crossFeedHighCut

In-loop low-pass cutoff, both lines.

floatsetCrossFeedHighCut
Cross feed mod rate crossFeedModRate

Read-modulation rate, in Hz.

floatsetCrossFeedModRate
Cross feed mod depth seconds crossFeedModDepthSeconds

Peak read-modulation swing, in seconds.

floatsetCrossFeedModDepthSeconds

Dependencies

Dependents

Used by