Build with this node

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

Ask Studio

@maruaudio/dsp/acoustics/rt-tail synthesises the late, diffuse part of a simulated room's response from the energy histograms of @maru/acoustics-ray-tracer, ported from pyroomacoustics' simulation/rt.py. It draws a seeded Poisson sequence of reflections at rate 4πc³t²/V (capped at 10,000 per second), weights it per band with the shared Antoni FIRs of @maru/acoustics-octave-bands and each band's histogram envelope, optionally applies air absorption, and writes one microphone's padded tail to caller storage; directional receivers draw arrival directions from the histogram.

Parameters

beginRtTail(state, rays, mic, fs, seed, air, useAir, capFrames) returns false and leaves no frames unless:

ArgumentAccepts
raysA finished ray tracer (ready) whose bins fit this state
micAn integer microphone index the ray tracer traced
fsAbove 0 and at most 96 kHz
air, useAirNine finite, non-negative air coefficients; applied when useAir
capFrames81 up to the state's frame capacity

Lifecycle

createRtTail(maxFrames, maxBins) allocates (81 to 524,288 frames, 1 to 2,500 bins) → beginRtTail → stepRtTail(rays, fir, budget, out) until rtTailReady; a bad buffer or unfinished FIR ends it with −1. Budget splits do not change the response.

When to use it

Completing a hybrid room simulation: image sources give the early reflections, this the dense tail.

Limits

  • The tail is cropped to the capacity minus 40 frames of padding without compressing its timeline; truncated reports a crop. Clearing is spread across steps.
  • A seeded xorshift32 replaces upstream's generator: deterministic, not upstream's.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

Used by