Delays and reverbs

Build echoes, parallel alignment, modulation-ready delay lines and reverberation.

A delay stores earlier samples; feedback writes part of the delayed signal back into the line. Reverb combines delays, filters and diffusion into a tail. The toolkit offers small line primitives and complete stereo structures so you can choose the amount of composition your product needs.

Choose the time structure

NeedStart withWhy
Exact parallel alignmentdelays/alignmentWhole frames, no interpolation, clipping or feedback.
Short movable read timedelays/fractionalFractional reads for modulation; prepare capacity first.
Repeating echodelays/feedback, delays/saturated-feedbackExplicit regeneration, with optional coloured feedback.
Alternating stereo repeatsdelays/ping-pong, delays/cross-feedChoose strict alternating repeats or flexible cross-feed.
Rhythmic taps or reverse windowsdelays/tap-pattern, delays/reverse-delayPrepared rings plus the selected tap/window policy.
Algorithmic spacereverbs/stereo-room-fdn, reverbs/stereo-dattorro, reverbs/stereo-schroederStereo adapters with defined decay, predelay and control behavior.
Convolution roomacoustics/room-convolverPlay a prepared IR; see room acoustics.

Storage and live changes

Prepare the maximum delay storage outside rendering. Read delay in samples or milliseconds according to the setter; convert tempo divisions with control/musical-clock. A nominal “delay” control is not a universal unit. The basic fractional-delay leaf caps its non-feedback line at 50 ms and its fractional-feedback line at 1000 ms; select another owner for a larger capacity.

Changing a read position immediately can click or change pitch. Use the leaf’s slew, dual-read crossfade or staged transition where appropriate. Clearing a large ring during a callback creates a work spike: use the staged-clear API for live transitions, with a bounded shared budget.

Leaves named borrowed-* and several tap/pitch algorithms use caller-owned rings. Their scalar reset and storage clear must happen together. A hall needs at least sampleRate + two frames per borrowed ring; other leaves have their own requirements. Do not assume that all delay/reverb APIs allocate their own storage or mix in dry audio. True ping-pong and the stereo reverb adapters listed as wet-only need an explicit product mix.

Check tails and parallel paths

Decide whether bypass preserves a tail, fades it or clears it. Test feedback, maximum decay and repeated changes for finite output and adequate headroom. Use exact alignment for delayed parallel dry/wet paths, and check Haas widening in mono. A decay parameter describes the algorithm’s law; it does not establish that the result reproduces a measured room or spring tank.

Toolkit reference

Import paths below are suffixes of maruaudio/dsp/. Use the exported types and setters in your installed version for complete signatures and defaults.

Delays

Import suffixPurposeSelected API
delays/cross-feedStereo delay with same-side/cross-side feedback, tone filtering, modulation, read-time crossfades and feedback saturation.initCrossFeedDelayNode, crossFeedDelayNodeTick
delays/fractionalFractional delay and feedback delay with linear interpolation and prepared ring storage.initFractionalFeedbackDelayNode, fractionalFeedbackDelayNodeTick
delays/saturated-feedbackTape-style feedback delay with damping, soft clipping and dry/wet mixing.initSaturatedFeedbackDelayNode, saturatedFeedbackDelayNodeTick
delays/ping-pongTrue ping-pong delay: two cross-feeding fixed lines producing structurally alternating L/R repeats, 100% wet.initPingPongDelayNode, setPingPongFeedback
delays/primitivesMilliseconds-to-frames, dry/wet and bounded feedback-write helpers.delayFrameCount, delayDryWetMix
delays/feedbackFixed feedback delay over a prepared line with a bounded active length.initFeedbackDelayNode, feedbackDelayNodeTick
delays/boundedNon-regenerating fixed delay: the feedback delay's sibling, writing through the same bounded store with the regeneration term exactly zero so all three delay behaviors share one implementation.initBoundedDelayNode, boundedDelayNodeTick
delays/alignmentExact whole-frame alignment without clipping, interpolation or feedback; preserves over-unity dry carriers for parallel effects.initAlignmentDelay, alignmentDelayTick
delays/pcm16-interpolatedFirmware-derived stereo delay with PCM16 storage and interpolated reads.initPcm16InterpolatedDelay, pcm16InterpolatedDelayTickWritePointer
delays/pcm16-ping-pongFirmware-derived PCM16 ping-pong delay with glided time/feedback and its variant-specific dry/wet law.initPcm16PingPongNode, pcm16PingPongNodeTick
delays/clocked-glitchClocked stereo delay with seeded retrigger/reverse/pitch/pan changes, crossfades and a frozen-loop buffer.initClockedGlitchDelay, clockedGlitchDelayTick
delays/tap-patternFour-tap, Haas and damped feedback-comb compositions over caller-owned stereo rings.initTapPattern, tapPatternTick
delays/reverse-delayWindowed reverse delay over caller-owned stereo rings with edge fades.initReverseDelay, reverseDelayTick

Reverbs

Import suffixPurposeSelected API
reverbs/schroederFour-comb/two-allpass Schroeder/Freeverb network with damping and full-tail reset.initReverbNode, reverbNodeTick
reverbs/dattorroTrue-stereo Dattorro diffusion/tank reverb.initDattorroNode, dattorroNodeTick
reverbs/stereo-room-fdnWet-only stereo four-line FDN with physical decay time, live room-size slew and bounded staged clearing.initStereoRoomFdnNode, stereoRoomFdnNodeTick
reverbs/stereo-dattorroWet-only Dattorro adapter with bounded live predelay and normalized decay/damping controls.initStereoDattorroNode, stereoDattorroNodeTick
reverbs/stereo-schroederWet-only dual-core Schroeder adapter with explicit right-channel decorrelation and bounded live predelay.initStereoSchroederNode, stereoSchroederNodeTick
reverbs/griesingerFirmware-derived Griesinger figure-eight reverb with input diffusion, selectable storage precision and a freeze variant.initGriesingerReverb, griesingerReverbTick
reverbs/borrowed-springDispersive spring-style waveguide with coupled caller-owned delay loops.initBorrowedSpring, borrowedSpringTick
reverbs/borrowed-hall-fdnHall feedback-delay network over caller-owned delay storage.initBorrowedHallFdn, borrowedHallFdnTick

Return to DSP fundamentals for I/O, lifecycle, units and the category map.