Build with this node

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

Ask Studio

@maruaudio/dsp/acoustics/rir-analysis inspects a committed room impulse response a budget at a time, for display and measurement. It copies the response once, reduces it to 256 signed peak bins and a 256-point normalised Schroeder decay curve in dB (floored at −120 dB), measures the broadband T30 with @maru/acoustics-rt60, then filters the response through each band of @maru/acoustics-octave-bands' FIRs and measures each band's T30. Display arrays (rir, edc, bands) are owned by the state for the caller to read.

Lifecycle

createRirAnalysis(maxFrames) allocates (frames clamped to 1 to 524,288) → beginRirAnalysis(frames, offset, fs) latches the response's position in the caller's bank → stepRirAnalysis(source, fir, budget) until it reaches its final stage → read broadband, bands, rir and edc. Costs are relative units; one FIR transform pair is the largest indivisible unit, so a step runs one even when its budget is smaller, provided nothing else ran first.

When to use it

Showing a room's response and decay to a player and reporting its measured reverberation time, overall and per octave, without blocking audio while a long response is analysed.

Limits

  • Fits a 30 dB decay with the energy threshold at 1, extrapolated to 60 dB. A measurement that is not finite and positive below 1e6 s reads as 0.
  • Band count follows the FIR state's layout, at most 9.
  • The FIR bank must already be designed; the analysis does not design it.
  • A frame count of 0 finishes at once.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

No other node imports this one.

Used by