pyFDN package#
Subpackages#
- pyFDN.auxiliary package
- Submodules
- pyFDN.auxiliary.acoustics module
- pyFDN.auxiliary.allpass module
- pyFDN.auxiliary.audio 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.utils module
- Module contents
- pyFDN.eq package
- pyFDN.resources package
- pyFDN.td package
- Submodules
- pyFDN.td.connectors module
- pyFDN.td.operators module
- Module contents
- pyFDN.train package
- Subpackages
- pyFDN.train.features package
- pyFDN.train.losses package
- Submodules
- pyFDN.train.losses.base module
- pyFDN.train.losses.distances module
- pyFDN.train.losses.features module
- pyFDN.train.losses.match module
- pyFDN.train.losses.parameter module
- pyFDN.train.losses.reductions module
- pyFDN.train.losses.spectral module
- pyFDN.train.losses.temporal module
- Module contents
- Submodules
- pyFDN.train.build module
- pyFDN.train.engine module
- pyFDN.train.filters module
- pyFDN.train.params module
- pyFDN.train.response module
- Module contents
- Subpackages
Submodules#
pyFDN.build module#
Baked feedback-delay-network builds and their JSON representation.
An FDNBuild is a delay state-space (DSS) system – A, B, C,
D, and delays – plus the sample rate and three optional baked filter
hooks. A build is designed around a DSS system, not the other way around: use
the raw DSS arrays (and dss_to_* functions) for pure state-space math, and
an FDNBuild (and build_to_* functions) once fs or the filter
hooks matter, e.g. for rendering.
- 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.
A,B,C,D, anddelaysare a delay state-space (DSS) system;fsand the three optional filter hooks turn that system into a complete, renderable build. Every field is a plain NumPy value consumed bypyFDN.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#
Compact DSS processing and convenience rendering of complete FDN builds.
- pyFDN.process.process_dss(input_signal, delays, A, B, C, D, *, post_delay=None, post_matrix=None, post_output=None)[source]#
Process a delay state-space system using block processing.
One-shot form of
dss_to_td(...).process_signal(input_signal): a freshpyFDN.tdgraph is built for every call. The three optional hooks are runtime objects that implementprocess_block(block)(or SOS banks). To process anpyFDN.FDNBuild, usepyFDN.process_fdn().The recursion is
delay -> post_delay -> Con the wet path anddelay -> post_delay -> A -> post_matrix -> + B inputin the loop.post_outputprocesses the wet signal before the directDpath is added.- Parameters:
input_signal (
ArrayLike) – Input of shape(num_samples,)or(num_samples, num_inputs).delays (
ArrayLike) – Positive delay lengths in samples, shape(N,).A (
ArrayLike) – Static feedback matrix(N, N)or FIR polynomial matrix(N, N, order)in thez^-1convention.B (
ArrayLike) – Static input, output, and direct gain matrices.C (
ArrayLike) – Static input, output, and direct gain matrices.D (
ArrayLike) – Static input, output, and direct gain matrices.post_delay (
Any|None) – Optional hooks, seepyFDN.dss_to_td().post_matrix (
Any|None) – Optional hooks, seepyFDN.dss_to_td().post_output (
Any|None) – Optional hooks, seepyFDN.dss_to_td().
- Returns:
Processed signal with singleton dimensions removed.
- Return type:
- pyFDN.process.process_fdn(input_signal, build)[source]#
Process a signal through a fresh time-domain graph built from
build.This is the one-shot convenience form of
build_to_td(build).process_signal(input_signal). A fresh graph is built for every call, so delay and filter state cannot leak between independent renders. UsepyFDN.build_to_td()directly to process a stream over multiple calls topyFDN.td.TimeOperator.process_block()or to reset and reuse the graph.
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.