Build with this node

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

Ask Studio

@maruaudio/dsp/delays/tap-pattern holds three wet stereo compositions over two caller-owned @maru/delays-fractional feedback rings, selected by mode:

  • Multitap (0): taps at 1 to 4 × the base time, weights decay^(tap−1) normalized by their sum; taps 2 and 4 crossfeed by the spread. The write is clamp(x + wet·feedback, −1, 1).
  • Haas (1): one side delayed and blended by the amount, the other direct.
  • Comb (2): w = x·(1 − |fb|) + fb·tone(delayed) over rate / frequency samples, with feedthrough; negative feedback makes notches. The damping is @maru/filters-tone.
const state = initTapPattern(48000)
configureTapPattern(state, TAP_PATTERN_COMB, 220, 0.6, 6000, 0)
tapPatternTick(state, ringL, ringR, left, right) // state.outLeft, state.outRight

Parameters

configureTapPattern(state, mode, first, second, third, fourth); a non-finite value takes the fallback in brackets, then clamps.

Modefirstsecondthirdfourth
MultitapBase time 1 to 250 ms [100]Feedback 0 to 0.75 [0]Tap decay 0 to 1 [0.5]Crossfeed 0 to 1 [0]
HaasTime 0.1 to 30 ms [10]Side: ≥ 0.5 right delayedAmount 0 to 1 [1]Output −12 to 0 dB [0]
CombFrequency 20 to 2000 Hz [220]Feedback −0.95 to 0.95 [0]Damping 500 Hz to min(16 kHz, 0.45 × rate) [16000]Output −24 to +6 dB [0]

Mode is rounded, 0 to 2. Init: multitap, 100 ms, feedback 0, decay 0.5, spread 0.

Lifecycle

initTapPattern(sampleRate) (8 to 192 kHz, NaN gives 48 kHz) → configure → tapPatternTick(state, lineLeft, lineRight, left, right) → resetTapPattern (comb filters and outputs). The caller prepares, resets and budget-clears the rings: at least 4 × base time + 2 samples for multitap, rate/20 + 2 for comb.

When to use it

Rhythmic multitap echoes, a Haas offset to widen a centred source, or a comb tuned to a pitch.

Limits

  • Wet only; the caller blends dry and fades around configuration changes, which apply at once. Input is bounded to ±16 (NaN 0).

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

Used by