weirdnet-dsp 0.2.1

Weirdnet DSP building blocks: RBJ biquad filters, level helpers (dB, peak, RMS) and fades. Pure functions over slices, no I/O, no allocation per block.
Documentation
//! Weirdnet DSP building blocks. Pure functions and small state machines over `f32` slices: no I/O, no allocation in the
//! per-block paths ([`Biquad::process`], [`MultiBiquad::process_interleaved`], the fades and the level helpers).
//!
//! * [`level`]: dB and linear conversion, peak and RMS.
//! * [`fade`]: fade curves and in-place fades on interleaved audio.
//! * `stretch` (feature `stretch`): time stretch and pitch shift over Signalsmith Stretch.
//! * [`biquad`]: RBJ-cookbook biquad filters (low-pass, high-pass, band-pass, peaking) with a frequency-response check.
//!
//! ```
//! use weirdnet_dsp::{BiquadCoeffs, FilterKind, MultiBiquad};
//!
//! let coeffs = BiquadCoeffs::design(FilterKind::LowPass, 48_000, 1_000.0, std::f64::consts::FRAC_1_SQRT_2, 0.0)?;
//! let mut filter = MultiBiquad::new(2, coeffs); // stereo, interleaved
//! let mut block = vec![0.0f32; 512];
//! filter.process_interleaved(&mut block);
//! # Ok::<(), weirdnet_dsp::DspError>(())
//! ```

pub mod biquad;
pub mod fade;
pub mod level;
#[cfg(feature = "stretch")]
pub mod stretch;

pub use biquad::{Biquad, BiquadCoeffs, DspError, FilterKind, MultiBiquad};
pub use fade::{FadeCurve, fade_in, fade_out};
pub use level::{db_to_linear, linear_to_db, peak, rms};