Expand description
Wave Digital Filter (WDF) core and physical modeling — elements, adapters, analysis, and resonant models for analog circuit and acoustic simulation.
All types are generic over rill_core::Transcendental, supporting both f32
and f64. SIMD-accelerated batch processing is available via
process_incident_vector methods on Resistor, Capacitor,
Inductor, and Diode, plus the free function
[elements::process_batch_simd].
§Modules
macros— WDF eDSL macros for defining elements and filtersanalysis— frequency response and distortion analysisconstants— physical constants and toleranceswdf— WDF-based filter modelsstring— 1D waveguide string models with stiffness and dampingplate— 2D FDTD waveguide mesh for plates and membranesmodal— modal synthesis via parallel resonant filter bankscavity— Helmholtz cavity resonators and coupled cavity arrays
§Design
WDF elements are built around the WdfElement trait, which defines a
port resistance, wave processing, and state update cycle. Elements can be
combined via SeriesAdapter and ParallelAdapter to form arbitrary
linear circuits. Nonlinear elements like Diode use Newton-Raphson
iteration for implicit solution.
References:
- A. Fettweis, “Wave Digital Filters: Theory and Practice” (1986)
- K. J. Werner et al., “An Improved and Generalized Diode Clipper Model for Wave Digital Filters” (2015)
Re-exports§
pub use cavity::CavityArray;pub use cavity::HelmholtzCavity;pub use modal::ModalModel;pub use plate::PlateModel;pub use string::StringModel;
Modules§
- analysis
- Frequency response and distortion analysis
- cavity
- Helmholtz cavity resonators and coupled cavity arrays Cavity resonator models — Helmholtz single-cavity and coupled cavity arrays.
- constants
- Physical constants and tolerances Physical constants and numerical tolerances used throughout the crate.
- macros
- WDF eDSL macros for defining elements and filters
- modal
- Modal synthesis via parallel resonant filter banks Modal resonator — parallel bank of 2-pole filters.
- plate
- 2D FDTD waveguide mesh for plates and membranes 2D plate/membrane model — waveguide mesh with FDTD.
- string
- 1D waveguide string models with stiffness and damping Physical string model — digital waveguide with stiffness and damping.
- tape
- Analog tape recording and playback head models
- wdf
- WDF-based filter models WDF-based filters.
Macros§
- wdf_
cascade - Generate a cascaded WDF filter from identical sections.
- wdf_
compose - Compose two WDF elements into Series or Parallel.
- wdf_
element - Generate a single WDF element struct implementing
WdfElement.
Structs§
- Capacitor
- Capacitor WDF element (trapezoidal integration)
- Diode
- Diode WDF element (nonlinear, Newton-Raphson solution)
- Inductor
- Inductor WDF element (trapezoidal integration)
- OpAmp
- Operational amplifier model with slew-rate limiting, bandwidth roll-off, and voltage rail clamping.
- Parallel
Adapter - Parallel adapter — connects WDF elements in parallel
- Resistor
- Resistor WDF element
- Series
Adapter - Series adapter — connects WDF elements in series
- Wave
Variables - Wave variables: a (incident), b (reflected)
Traits§
- Transcendental
- Transcendental operations (sin, cos, sqrt, exp, ln).
- WdfElement
- Base WDF element trait.