Skip to content
A library for chaining together multiple audio dsp processors/generators, written in Rust!
Rust
Branch: master
Clone or download
Latest commit 2568bff Aug 22, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples ran rustfmt with default args Aug 7, 2017
src ran rustfmt with default args Aug 7, 2017
.gitignore Update for latest Rust and Cargo Aug 20, 2014
.travis.yml Only build travis on nightly (until next stable version is released) Dec 28, 2015
Cargo.toml
LICENSE Initial commit Jun 20, 2014
README.md Update docs to sound_stream removal Dec 28, 2015

README.md

dsp-chain Build Status Crates.io Crates.io

A library for chaining together multiple audio dsp processors/generators, written in Rust!

Use cases for dsp-chain include:

  • Designing effects.
  • Creating an audio mixer.
  • Making a sampler.
  • Writing a dsp backend for a DAW.
  • Any kind of modular audio synthesis/processing.

Documenation

API documentation here!

Usage

Here's what it looks like:

// Construct our dsp graph.
let mut graph = Graph::new();

// Construct our fancy Synth and add it to the graph!
let synth = graph.add_node(DspNode::Synth);

// Add a few oscillators as inputs to the synth.
graph.add_input(DspNode::Oscillator(0.0, A5_HZ, 0.2), synth);
graph.add_input(DspNode::Oscillator(0.0, D5_HZ, 0.1), synth);
graph.add_input(DspNode::Oscillator(0.0, F5_HZ, 0.15), synth);

// Set the synth as the master node for the graph.
// This can be inferred by the graph so calling this is optional, but it's nice to be explicit.
graph.set_master(Some(synth));

// Request audio from our Graph.
graph.audio_requested(&mut buffer, settings);

Here are two working examples of using dsp-chain to create a very basic synth and an oscillating volume.

Add dsp-chain to your Cargo.toml dependencies like so:

[dependencies]
dsp-chain = "*"
You can’t perform that action at this time.