InfiniteDSP Core
A modular, high-performance audio DSP library for Rust, designed for real-time synthesis and effects processing.
It is no_std compatible (requires alloc), making it suitable for embedded audio applications as well as desktop software.
Features
no_stdCompatible: Built for portability usinglibmandalloc.- Modular Architecture: Build complex audio chains using
DspChainandMixer. - AudioParam System: All parameters can be static, linked to thread-safe controls (atomics), or modulated by other audio signals (e.g., LFOs, Envelopes) at sample rate.
- Signal Math: Combine signals easily with
AddandMultiplyprocessors. - SIMD Optimization: Uses
widefor SIMD-accelerated processing where applicable. - Spectral Processing: Includes a robust Overlap-Add (OLA) engine for FFT-based effects.
- Comprehensive Effect Suite:
- Time: Delay, Tape Delay (with saturation & flutter), Reverb (Schroeder).
- Filter: Biquad (LowPass, HighPass, BandPass, Notch), Ladder Filter (Moog-style), State Variable Filter (TPT/ZDF).
- Dynamics: Compressor, Limiter, Distortion (Soft/Hard Clip, BitCrush, Foldback).
- Modulation: Phaser, Tremolo, Ring Modulator, Chorus, Flanger.
- Spectral: FFT Pitch Shift, Granular Pitch Shift, Spectral Filter.
- Utility: Gain, Offset, Stereo Panner.
- Synthesis:
- Oscillators: Sine, Triangle, Saw, Square (PolyBLEP anti-aliased), Noise.
- Physical Modeling: Karplus-Strong (String), Brass Model.
- Control: LFO, ADSR Envelope (with retrigger support).
Demos
Listen to some of the examples generated with this library:
Project Structure
src/core: Core traits and infrastructure (FrameProcessor,AudioParam,DspChain,Ola).src/effects: Audio effects implementations.src/synthesis: Sound generators and control signals.examples_app: A separate workspace member containing runnable examples usingcpal.
Usage
Add infinitedsp-core to your dependencies.
use DspChain;
use AudioParam;
use ;
use Delay;
// Create an oscillator
let osc = new;
// Create a delay effect
let delay = new;
// Chain them together
let mut chain = new.and;
// Process a buffer
let mut buffer = ;
chain.process;
Running Examples
The project includes several runnable examples in the examples_app folder that demonstrate different capabilities using cpal for real-time audio output.
Run an example using:
Available Examples:
filter_sweep: A subtractive synth patch with an LFO modulating a Ladder Filter cutoff.fm_brass: FM synthesis demonstration with envelopes controlling modulation index.trance_synth: A massive stereo supersaw trance pluck with delay, reverb, and a sequencer.karplus_demo: Physical modeling of a guitar string (Karplus-Strong algorithm).svf_demo: State Variable Filter demonstration (BandPass sweep).spectral_demo: FFT-based Pitch Shifting using the Overlap-Add (OLA) engine.granular_demo: Time-domain Granular Pitch Shifting.
Documentation
To generate and view the API documentation:
License
This project is licensed under the MIT License - see the LICENSE file for details.