pyFDN.build_to_flamo#

pyFDN.build_to_flamo(build, nfft=65536, device=None, *, shell=True, dtype=None, post_delay=None, post_matrix=None, post_output=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. The build’s three filter hooks go straight through under the same names: post_delay for the in-loop absorption, post_matrix for the feedback path, and post_output for the per-output EQ.

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

  • 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. Use pyFDN.flamo_time_response() to obtain a NumPy impulse response. If False, return only the core.

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

  • post_delay (Any) – Extra modules for the three filter hooks, appended after whatever the build already carries in that position – so post_delay=schroeder_core on a build with absorption gives delay -> absorption -> schroeder. See pyFDN.hook_module().

  • post_matrix (Any) – Extra modules for the three filter hooks, appended after whatever the build already carries in that position – so post_delay=schroeder_core on a build with absorption gives delay -> absorption -> schroeder. See pyFDN.hook_module().

  • post_output (Any) – Extra modules for the three filter hooks, appended after whatever the build already carries in that position – so post_delay=schroeder_core on a build with absorption gives delay -> absorption -> schroeder. See pyFDN.hook_module().

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:

Any