pyFDN.assemble_fdn_core#

pyFDN.assemble_fdn_core(*, input_gain, feedback, delays, output_gain, direct=None, post_delay=None, post_matrix=None, post_output=None)[source]#

Wire pre-built FLAMO modules into an FDN core (no FFT/iFFT wrapping).

Single source of truth for the FDN signal flow, shared by the render path (pyFDN.dss_to_flamo()) and the training builder (pyFDN.train.trainable_from_build()). All arguments are already-built FLAMO dsp/system modules; this only composes them, so leaf names and topology stay identical across both callers (and match the names pyFDN.extract_build() requires).

Signal flow:

input_gain -> [recursion: fF = delay -> (post_delay)
                          fB = feedback -> (post_matrix)]
           -> output_gain -> (post_output)

with the direct path direct summed in parallel when provided.

The three optional filter slots are the hooks pyFDN.process_dss() takes and an FDNBuild stores: post_delay on the delay output (shaping both the output and the feedback), post_matrix on the feedback path only, post_output on the wet signal only.

Parameters:
  • input_gain (Any) – Input gain B (named input_gain) and output gain C (named output_gain).

  • output_gain (Any) – Input gain B (named input_gain) and output gain C (named output_gain).

  • feedback (Any) – Feedback matrix placed on the recursion feedback branch (fB); a plain Gain/Filter (render) or a parametrized Matrix (training).

  • delays (Any) – Delay module on the recursion forward branch (named delay).

  • direct (Any) – Direct path D. When None the core is the plain feedforward Series (no Parallel wrapper) – this keeps core.feedback_loop reachable for losses such as sparsity_loss. When provided the core is Parallel(brA=fdn_branch, brB=direct).

  • post_delay (Any) – In-loop filter after the delays (named post_delay). Any module of input/output size N: a AttenuationFilter or a plain sos_filter_module() for attenuation, or a whole nested core such as a Schroeder allpass. Only an SOS filter here is extractable into an FDNBuild.

  • post_matrix (Any) – Filter on the feedback path after the feedback matrix (named post_matrix); the position a time-varying mixing stage occupies. Adding it names the feedback branch mixing_matrix rather than leaving the matrix bare on fB, which is where pyFDN.extract_build() looks for it either way.

  • post_output (Any) – Per-output filter after the output gain (named post_output); typically an OutputEQ.

Returns:

core – The FDN core, ready for wrap_fdn_shell().

Return type:

Any