pyFDN.dss_to_flamo#
- pyFDN.dss_to_flamo(delays, A, B, C, D, fs, nfft=65536, device=None, *, shell=True, 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 3-D array is a polynomial (FIR) matrix in z^{-1} convention (e.g. paraunitary) and is placed as a FLAMO Filter module.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).device (
Any) – Device; default is cuda if available else cpu.shell (
bool) – If True (default), wrap the core in a Shell with FFT/iFFT. UsepyFDN.flamo_time_response()to obtain a NumPy impulse response. If False, return only the core (e.g. for use as post_delay in another dss_to_flamo).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.process_dss()callspost_delay. An(n_sections, 6, N)SOS bank, a FLAMO module of input/output size N (e.g. a Schroeder allpass core fromshell=False), or a sequence of both applied in order. SeepyFDN.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:
model – If shell=True, FLAMO Shell. Use
pyFDN.flamo_time_response()for a NumPy impulse response. If shell=False, the core module (same I/O as B.shape[1] / C.shape[0]).- Return type: