Coder Social home page Coder Social logo

dsp-chain's Introduction

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 = "*"

dsp-chain's People

Contributors

ahihi avatar ales-tsurko avatar bvssvni avatar denommus avatar est31 avatar fwcd avatar indiv0 avatar jeremyletang avatar leonkunert avatar mitchmindtree avatar rrx avatar steveklabnik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.