pyFDN.echo_density#

pyFDN.echo_density(ir, fs, *, window=1024, pre_delay=0, mixing_threshold=1.0, hop=500)[source]#

Echo density and mixing time (Abel & Huang 2006).

Computes the transition time between early reflections and stochastic reverberation assuming sound pressure in a reverberant field is Gaussian distributed.

Reference: Abel & Huang (2006), “A simple, robust measure of reverberation echo density”, Proc. 121st AES Convention, San Francisco.

Parameters:
  • ir (ArrayLike) – Impulse response (1 channel only). Converted to 1D.

  • fs (float) – Sampling rate in Hz.

  • window (int) – Window length in samples (must be even). Default 1024.

  • pre_delay (int) – Onset delay in samples for mixing time. Default 0.

  • mixing_threshold (float) – Normalized echo density threshold for mixing time (Abel & Huang use 1). Default 1.0.

  • hop (int) – Hop size in samples for sparse analysis. Default 500.

Return type:

tuple[float, ndarray]

Returns:

  • mixing_time (float) – Mixing time in seconds (time at which echo density first exceeds mixing_threshold, relative to pre_delay). 0 if not found.

  • echo_dens (np.ndarray) – Echo density vector (length = len(ir)), normalized; interpolated from sparse analysis.