pyFDN.build_to_flamo#

pyFDN.build_to_flamo(build, nfft=65536, device=None, *, shell=True, dtype=None, post_delay_module=None)[source]#

Build a FLAMO model from a complete FDNBuild config.

Thin wrapper over dss_to_flamo() that unpacks an FDNBuild (as returned by pyFDN.fdn_build_gallery()) into its state-space arguments, mapping the in-loop absorption build.filters to sos_filter and the per-output build.post_eq to output_filter.

Parameters:
  • build (FDNBuild) – Complete FDN parameters (A, B, C, D, delays, fs, optional filters and post_eq), e.g. from pyFDN.fdn_build_gallery().

  • nfft (int) – FFT size for FLAMO (default 2**16).

  • device (torch device or None) – Device; default is cuda if available else cpu.

  • shell (bool) – If True (default), wrap the core in a Shell with FFT/iFFT. Use pyFDN.flamo_time_response() to obtain a NumPy impulse response. If False, return only the core.

  • dtype (torch.dtype or None) – Optional dtype for FLAMO delay/gain/filter modules (e.g., torch.float64). If None, wrapper defaults are used.

  • post_delay_module (FLAMO module or None) – Optional module to append after the delay in the recursion (e.g. a Schroeder allpass core). Must have input/output size N. Loop becomes: delay -> post_delay_module -> A.

Returns:

model – If shell=True, a FLAMO Shell. Use pyFDN.flamo_time_response() for a NumPy impulse response. If shell=False, the core module.

Return type:

flamo.processor.system.Shell or core