pyFDN.dss_to_flamo#
- pyFDN.dss_to_flamo(delays, A, B, C, D, fs, *, nfft=65536, alias_decay_db=0.0, device=None, dtype=None, post_delay=None, post_matrix=None, post_output=None)[source]#
Build a FLAMO model from a delay state-space (DSS) system (delays, A, B, C, D).
Signal flow: input -> B -> [recursion: delay -> (post_delay); fB = A -> (post_matrix)] -> C -> (post_output) -> output, with direct path D summed in parallel.
- Parameters:
delays (
ArrayLike) – Delay lengths in samples (one per delay line).A (
ArrayLike) – Feedback matrix. A filter (FIR) feedback matrix goes on the feedback path instead:A=np.eye(N), post_matrix=pyFDN.fir_matrix_module(fir, nfft).B (
ArrayLike) – Input gain.C (
ArrayLike) – Output gain.D (
ArrayLike) – Direct gain.fs (
float) – Sampling rate in Hz.nfft (
int) – FFT size for FLAMO (default 2**16).alias_decay_db (
float) – Anti-time-aliasing decay, the accuracy of the rendered response in dB; seepyFDN.trainable_from_dss(). Leave at 0 for a decaying FDN; a lossless one needs it, e.g.pyFDN.LOSSLESS_ALIAS_DECAY_DB. A module passed into a hook must have been built with the same value.device (
Any) – Device; default is cuda if available else cpu.dtype (
Any) – Optional dtype for FLAMO delay/gain/filter modules (e.g., torch.float64). If None, wrapper defaults are used.post_delay (
Any) – In-loop filter applied to the delay output, inside the recursion – the same hookpyFDN.dss_to_td()callspost_delay. An(n_sections, 6, N)SOS bank, a FLAMO module of input/output size N (e.g. an allpass FDN’sdss_to_flamo(...).get_core()), or a sequence of both applied in order. SeepyFDN.auxiliary.flamo.hook_module.post_matrix (
Any) – Filter applied to the feedback path afterA.post_output (
Any) – Per-output filter applied to the wet signal afterC; an(n_sections, 6, num_out)SOS bank, or a module.
- Returns:
Use
pyFDN.flamo_to_impz()for a NumPy impulse response, and.get_core()for the FDN without its FFT layers, e.g. to nest it in another FDN’s hook.- Return type: