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 same three hooks, in the same three positions and under the same three names, that pyFDN.process_fdn() takes in numpy – post_delay on the shared delay output (so it shapes both what leaves the network and what is fed back), post_matrix on the feedback path only, post_output on the wet signal only. An FDNBuild has a field of each name, holding the SOS bank a hook bakes down to; a hook holding something that does not bake – a nested core, a time-varying matrix – simply has no build field to go in.

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