pyFDN.allpass_in_fdn#

pyFDN.allpass_in_fdn(g, A, b, c, d)[source]#

Create an allpass structure embedded in an FDN of size [2N, 2N].

See Schlecht, S. (2017). Feedback delay networks in artificial reverberation and reverberation enhancement.

Parameters:
  • g (array-like, shape (N,)) – Per-channel feedforward/back allpass gains.

  • A (array-like, shape (N, N)) – Inner FDN feedback matrix.

  • b (array-like, shape (N,) or (N, 1)) – Input gains of the inner FDN.

  • c (array-like, shape (N,) or (1, N)) – Output gains of the inner FDN.

  • d (float) – Direct gain.

Return type:

tuple[ndarray, ndarray, ndarray, ndarray]

Returns:

  • A_out (ndarray, shape (2N, 2N)) – FDN feedback matrix.

  • B_out (ndarray, shape (2N, 1)) – FDN input gains.

  • C_out (ndarray, shape (1, 2N)) – FDN output gains.

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

Example

>>> import numpy as np
>>> from pyFDN.generate.random_orthogonal import random_orthogonal
>>> g = np.random.randn(3)
>>> A, B, C, D = allpass_in_fdn(g, random_orthogonal(3),
...                              np.ones((3, 1)), np.ones((1, 3)), 0.0)
>>> A.shape
(6, 6)