Expand description
DSP primitives: load, effects, write.
Structs§
- Audio
Buffer - Mono or stereo audio buffer at a known sample rate.
- Biquad
State - Persistent biquad filter state — must survive across audio blocks.
Functions§
- bandpass
- Bandpass filter (lowpass + highpass).
- biquad
- Biquad filter with persistent state (for real-time block-by-block processing).
- bitcrush
- Bitcrush: reduce bit depth and sample rate.
- compute_
waveform_ bands - Compute 3-band waveform energy at
resolution-sample windows. Returns Vec<[low, mid, high]> with each value normalized 0.0–1.0. Bands: low <200Hz, mid 200–4000Hz, high >4000Hz. - delay
- eq_
3band - 3-band EQ using biquad shelving/peaking filters (no phase-splitting). Low shelf at 200 Hz, mid peak at 1 kHz (Q=0.7), high shelf at 3 kHz. Audio EQ Cookbook coefficients (Robert Bristow-Johnson).
- eq_
3band_ offline - Offline 3-band EQ (stateless — for non-realtime use like file processing).
- granular
- highpass
- lfo_
modulate - LFO amplitude modulation.
- load_
audio - Universal audio loader using symphonia. Supports MP3, FLAC, OGG, WAV, and AIFF.
- load_
wav - lowpass
- notch_
filter - Notch (band-reject) filter.
- phase_
vocoder - Phase vocoder time stretch (simplified overlap-add with windowed segments).
- pitch_
shift - resample
- Resample an AudioBuffer to the target sample rate using linear interpolation. Good enough for playback normalization — sinc resampler comes later.
- reverb
- reverse
- reverse_
preswell - Reverse preswell: slice tail, reverse, prepend.
- time_
stretch - write_
game_ audio - Write game-ready audio: 16-bit WAV. For OGG Vorbis export, use external tools (ffmpeg) or wait for a pure-Rust Vorbis encoder.
- write_
wav