View on GitHub

InfiniteDSP

InfiniteDSP Logo

InfiniteDSP Core

Rust Benchmark License Crates.io Documentation

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

Benchmarks

Performance is tracked over time to ensure no regressions. View Benchmark Charts

Documentation

View Documentation

Demos

Listen to some of the examples generated with this library:

Filter Sweep Demo

Trance Synth Demo

Speech Synth Demo

Showcase

Check out these projects built with infinitedsp-core:

Project Structure

Usage

Add infinitedsp-core to your dependencies.

use infinitedsp_core::core::dsp_chain::DspChain;
use infinitedsp_core::core::audio_param::AudioParam;
use infinitedsp_core::core::channels::Mono;
use infinitedsp_core::synthesis::oscillator::{Oscillator, Waveform};
use infinitedsp_core::effects::time::delay::Delay;

// Create an oscillator (Mono source)
let osc = Oscillator::new(AudioParam::hz(440.0), Waveform::Saw);

// Create a delay effect (Mono effect)
let delay = Delay::new(
    1.0, // Max delay time in seconds
    AudioParam::ms(350.0),   // Delay time
    AudioParam::linear(0.5), // Feedback
    AudioParam::linear(0.3)  // Mix
);

// Chain them together. The chain is typed as DspChain<Mono>.
let mut chain = DspChain::new(osc, 44100.0).and(delay);

// Print the signal chain (requires 'debug_visualize' feature)
println!("{}", chain.get_graph());

// Process a buffer
let mut buffer = [0.0; 512];
chain.process(&mut buffer, 0);

Feature Flags

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:

cargo run --release -p infinitedsp-examples --bin <example_name>

Available Examples:

Documentation

To generate and view the API documentation:

cargo doc --open

AI Contribution Policy

This project allows and encourages experimentation with AI agents for code generation and optimization. However, all AI-generated contributions must be strictly verified by a human maintainer. This verification includes:

  1. Code Review: Ensuring the code is idiomatic, safe, and follows project standards.
  2. Audio Verification: Listening to the output to ensure correctness and high audio quality (no artifacts, correct DSP behavior).

License

This project is licensed under the MIT License - see the LICENSE file for details.