Skip to main content

Module room_acoustics

Module room_acoustics 

Expand description

Room Acoustics: Sabine / Eyring-Norris / Millington-Sette $T_{60}$ & Schroeder RIR Integration.

Implements:

  • Sabine ($T_{60} = \frac{55.25 V}{c ( \sum S_i \alpha_i + 4mV )}$), Eyring-Norris ($T_{60} = \frac{55.25 V}{c ( -S\ln(1 - \bar{\alpha}) + 4mV )}$), and Millington-Sette ($T_{60} = \frac{55.25 V}{c ( -\sum S_i\ln(1 - \alpha_i) + 4mV )}$) reverberation time calculators with strict domain validation (rejecting $\alpha_i \ge 1$ in Eyring/Millington and zero total absorption).
  • Schroeder backward energy integration $E(t) = \int_t^\infty h^2(\tau),d\tau$ in dB, Early Decay Time ($\text{EDT}$), $T_{20}$, $T_{30}$, Clarity $C_{50}$ / $C_{80}$, Definition $D_{50}$, and Centre Time $T_s$ (ISO 3382-1).

Structs§

RirAcousticsReport
Complete ISO 3382-1 room impulse response (RIR) decay and clarity analysis.
RoomGeometry
Room geometry and acoustic boundary model for $T_{60}$ calculations.
SurfacePatch
Surface patch with area $S_i$ ($\text{m}^2$) and random-incidence absorption coefficient $\alpha_i$.

Constants§

RT60_NUMERATOR_55_25
Canonical numerator constant $55.25 = \frac{60 \times 4}{\ln(10)^{-1}} \approx 24\ln(10)$ used in the Sabine/Eyring/Millington formulas.
RT60_NUMERATOR_EXACT_24LN10
Exact theoretical numerator $24\ln(10) \approx 55.2620422318571$.

Functions§

analyze_room_impulse_response
Perform full ISO 3382-1 analysis on a discrete room impulse response $h[n]$ sampled at sample_rate_hz.
fit_decay_rt60_s
Fit linear least-squares decay slope on edc_db between start_db (e.g. -5.0) and end_db (e.g. -35.0) and return the extrapolated $-60\text{ dB}$ decay time $T_{60}$ in seconds.
schroeder_backward_integration_db
Compute the normalized Schroeder backward energy integration curve in dB: $$E(k) = \sum_{n=k}^{N-1} h[n]^2, \qquad L_{\text{EDC}}(k) = 10\log_{10}!\left(\frac{E(k)}{E(0)}\right)$$ Rejects empty, non-finite, or all-zero silent impulse responses (C02-C01 / AQ-04).