pyFDN.build_fdn#
- pyFDN.build_fdn(*, delays=None, N=None, rt=2.0, matrix='orthogonal', feedback=None, input_gain=None, output_gain=None, direct=0.0, trainable=None, train_rt=False, fs=48000.0, nfft=16384, alias_decay_db=None, device=None, dtype=None, rng=None)[source]#
Build a trainable flamo
Shellfrom a config.- Parameters:
delays (
ndarray|None) – Explicit integer delay lengths in samples. If omitted,Ncoprime delays are sampled (pyFDN.sample_delay_lengths()).N (
int|None) – Number of delay lines whendelaysis omitted.rt (
float|tuple[float,float] |None) – Reverberation time in seconds, realized as anAttenuationFilterwithdesign="first_order_shelf".Nonebuilds a lossless FDN. For any other design, build the module yourself and pass it totrainable_from_build()aspost_delay=.matrix (
Literal['orthogonal','random']) – Feedback-matrix parametrization.feedback (
ndarray|None) – Initial(N, N)feedback matrix; defaults to a random SO(N) matrix.input_gain (
ndarray|None) –B((N, n_in)) andC((n_out, N)); default ones / sqrt(N).output_gain (
ndarray|None) –B((N, n_in)) andC((n_out, N)); default ones / sqrt(N).direct (
float|ndarray) – Direct pathD; a scalar fills(n_out, n_in).trainable (
Trainable|None) – Which gain groups are trained (defaultTrainable).train_rt (
bool) – Whetherrtis a parameter rather than a design. Off by default, since the decay is usually designed from a measured reverberation time. What trains is the reverberation time itself, which keeps the loop contractive for every value it can take – unlike raw filter coefficients, which nothing holds inside the unit circle.alias_decay_db (
float|None) – Anti-time-aliasing decay, seetrainable_from_build().None(default) picks it fromrt:LOSSLESS_ALIAS_DECAY_DBwhenrt is None, else 0. A lossless FDN has every pole exactly on the unit circle, where the FFT-domain evaluation breaks down entirely; a decaying FDN damps itself withinnfftsamples and needs no nudge. Pass0.0to opt out.fs (
float)nfft (
int)device (
Any)dtype (
Any)rng (
Generator|int|None) – Seed for the sampled delays / default feedback matrix.
- Return type: