pyFDN package#
Subpackages#
- pyFDN.auxiliary package
- Submodules
- pyFDN.auxiliary.acoustics module
- pyFDN.auxiliary.allpass module
- pyFDN.auxiliary.audio module
- pyFDN.auxiliary.coupled_rooms module
- pyFDN.auxiliary.delay module
- pyFDN.auxiliary.flamo module
- pyFDN.auxiliary.flamo_graph module
- pyFDN.auxiliary.marimo_utils module
- pyFDN.auxiliary.math module
- pyFDN.auxiliary.plot module
- pyFDN.auxiliary.poles module
- pyFDN.auxiliary.tiny_rotation_matrix module
- pyFDN.auxiliary.utils module
- Module contents
- pyFDN.eq package
- pyFDN.resources package
- pyFDN.td package
- pyFDN.train package
Submodules#
pyFDN.build module#
Baked feedback-delay-network builds and their JSON representation.
- class pyFDN.build.FDNBuild(A, B, C, D, delays, fs, post_delay=None, post_matrix=None, post_output=None)[source]#
Bases:
objectComplete, renderable parameters of a vanilla FDN.
Every field is a plain NumPy value consumed by
pyFDN.process_fdn()andpyFDN.build_to_impz(). A build does not remember how its numbers were designed; that optional information belongs topyFDN.FDNPreset.The three optional SOS banks correspond directly to pyFDN’s filter hooks:
post_delayhas shape(sections, 6, N)and sets the decay inside the loop after the delays.post_matrixhas shape(sections, 6, N)and filters the feedback path after the feedback matrix.post_outputhas shape(sections, 6, outputs)and filters the wet signal outside the recursion.
- pyFDN.build.fdn_build_from_dict(data, *, fs=None)[source]#
Construct an
FDNBuildfrom its JSON-compatible dictionary.fsis an optional override retained for loading standalone legacy build files. Preset loading always uses the sample rate stored in the build.- Return type:
- pyFDN.build.fdn_build_to_dict(build, *, metadata=None)[source]#
Convert an
FDNBuildto its JSON-compatible format.
pyFDN.preset module#
Readable preset documents for vanilla feedback delay networks.
A preset keeps the exact, renderable FDNBuild separate from optional
metadata and JSON-like design notes. The build is authoritative; design records
only preserve choices that cannot be inferred reliably from its numbers.
- class pyFDN.preset.FDNPreset(build, metadata, design=<factory>)[source]#
Bases:
objectA baked vanilla FDN plus metadata and optional design information.
metadatais an open JSON object intended for catalog and attribution information. When used,tagsshould be a list of strings so callers can filter presets consistently without restricting other metadata fields.designdeliberately uses the same nested dictionaries as the JSON document. Unknown choices are represented by leaving outtypeor the entire component:FDNPreset( build=build, metadata={"name": "small-room", "tags": ["room", "short"]}, design={ "delays": {"type": "uniform", "coprime": True}, "feedback_matrix": {"type": "orthogonal"}, }, )
- pyFDN.preset.available_fdn_presets()[source]#
Return the names accepted by
get_fdn_preset().
- pyFDN.preset.fdn_preset_from_dict(data)[source]#
Construct an
FDNPresetfrom a parsed JSON dictionary.- Return type:
- pyFDN.preset.fdn_preset_to_dict(preset)[source]#
Convert an
FDNPresetto a JSON-compatible dictionary.
- pyFDN.preset.get_fdn_preset(name)[source]#
Return a packaged
FDNPresetdocument.Older build-only resources are also accepted. Their metadata is lifted into a preset without guessing design choices that were not saved.
- Return type:
pyFDN.process module#
FDN processing functions.
- pyFDN.process.process_fdn(input_signal, delays, A, B, C, D, *, post_delay=None, post_matrix=None, post_output=None)[source]#
Simulate the feedback delay network using block processing.
Recursion per block: delay output -> optional post-delay filter -> output gains C, and in the feedback path: absorbed delay output -> feedback matrix A -> optional post-matrix filter -> + B input. The wet signal is processed with an optional post-output filter before being added to the direct signal.
- Parameters:
input_signal (
ArrayLike) – Input of shape (num_samples,) or (num_samples, num_inputs).delays (
ArrayLike) – Delay lengths in samples, shape (N,).A (
ArrayLike) – Feedback matrix: static (N, N) or FIR polynomial (N, N, order) in z^{-1} convention.B (
ArrayLike) – Static input, output, and direct gains.C (
ArrayLike) – Static input, output, and direct gains.D (
ArrayLike) – Static input, output, and direct gains.post_delay (
Any|None) – An optional filter applied to the delay output before feedback processing. Must implement a filter method that accepts and processes the delay output. Typically per-delay-line absorption, e.g.pyFDN.td.SOSBank.post_matrix (
Any|None) – An optional filter applied to the feedback signal after the feedback matrix multiplication. Must implement a filter method that accepts and processes the feedback signal (e.g.pyFDN.td.TimeVaryingMatrix).post_output (
Any|None) – An optional filter applied to the wet signal (output signal) before it is added to the direct signal. Must implement a filter method that accepts and processes the wet signal.
- Returns:
output – Shape (num_samples, num_outputs), squeezed.
- Return type:
pyFDN.references module#
Citation helpers backed by the bibliography distributed with pyFDN.
Module contents#
See API Reference for full documentation of all functions and classes.