pyFDN.schroeder_reverberator#

pyFDN.schroeder_reverberator(allpass_gain, comb_gain, b, c, d)[source]#

Create combs and allpass filters as a single FDN.

Combines parallel comb filters with a series allpass section into one feedback delay network. See Schlecht (2017), Feedback delay networks in artificial reverberation and reverberation enhancement.

Parameters:
  • allpass_gain (array-like, shape (Na,)) – Feedforward/back gains for the series allpass stages.

  • comb_gain (array-like, shape (Nc,)) – Feedback gains for the parallel comb filters.

  • b (array-like, shape (Nc,) or (Nc, 1)) – Input gains of the comb filters.

  • c (array-like, shape (Nc,) or (1, Nc)) – Output gains of the comb filters.

  • d (float) – Direct gain.

Return type:

tuple[ndarray, ndarray, ndarray, ndarray]

Returns:

  • A (ndarray, shape (Na+Nc, Na+Nc)) – FDN feedback matrix.

  • B (ndarray, shape (Na+Nc, 1)) – FDN input gains.

  • C (ndarray, shape (1, Na+Nc)) – FDN output gains.

  • D (ndarray, shape (1, 1)) – FDN direct gain.

Example

>>> import numpy as np
>>> g_ap = np.array([0.5, 0.4, 0.3])
>>> g_c  = np.array([0.7, 0.6, 0.5])
>>> A, B, C, D = schroeder_reverberator(g_ap, g_c, np.ones(3)/3, np.ones(3)/3, 0.0)
>>> A.shape
(6, 6)