pyFDN.estimate_rt_bands#

pyFDN.estimate_rt_bands(ir, fs, fc=1000.0, start=-4.0, n=8, filter_order=8, decay_db=30.0)[source]#

Estimate RT in octave bands via Butterworth bandpass filtering.

Filters the impulse response into octave bands (octave_bands(), octave_band_filterbank()), then fits a line to the Schroeder decay curve of each band: the fit starts at -5 dB and spans decay_db, and its slope is extrapolated to a 60 dB decay.

Assumes a single-slope decay per band. For multi-exponential decays (coupled rooms) estimate the slopes with a dedicated multi-slope estimator and convert its amplitudes with slope_amplitude_to_level().

Default bands: 63, 125, 250, 500, 1000, 2000, 4000, 8000 Hz (start=-4, n=8). Bands whose upper edge reaches fs/2 are dropped.

Parameters:
  • ir (ArrayLike) – Impulse response.

  • fs (float) – Sampling rate in Hz.

  • fc (float) – Octave-band reference centre frequency in Hz (default 1000).

  • start (float) – Octave offset of the lowest band relative to fc (default -4 → 62.5 Hz).

  • n (int) – Number of octave bands (default 8).

  • filter_order (int) – Butterworth filter order (default 8).

  • decay_db (float) – Decay range in dB used for the linear fit. The default 30 dB fit is extrapolated to a 60 dB reverberation time.

Return type:

tuple[ndarray, ndarray]

Returns:

  • rt ((n_bands,) ndarray) – Estimated RT in seconds per band.

  • f_centre ((n_bands,) ndarray) – Centre frequencies in Hz corresponding to each RT value.