Crate dsp [] [src]

A generic, fast, audio digital signal processing library.

There are two primary points of interest:

  1. The Graph type - a directed, acyclic audio DSP graph.

  2. The Node trait - to be implemented for types used within the Graph.

Reexports

pub extern crate daggy;
pub extern crate sample;

Modules

conv

Pure functions and traits for converting between i8, i16, I24, i32, I48, i64, u8, u16, U24, u32, U48, u64, f32 and f64.

rate

The rate module provides a Converter type, for converting and interpolating the rate of Signals. This can be useful for both sample rate conversion and playback rate multiplication.

signal

Use the Signal trait for working with Iterators that yield Frames. To complement the Iterator trait, Signal provides methods for adding, scaling, offsetting, multiplying, clipping and generating frame iterators and more.

slice

This module provides various helper functions for performing operations on slices of frames.

Structs

Connection

Describes a connection between two Nodes within the Graph: input -> connection -> output.

Graph

A directed, acyclic DSP graph.

Inputs

A walker object for walking over nodes that are inputs to some node.

Outputs

A walker object for walking over nodes that are outputs to some node.

VisitOrder

A walker type for walking over a Graph's nodes in the order in which they will visited when audio is requested from the Graph.

VisitOrderReverse

A walker type for walking over a Graph's nodes in the order in which they will visited when audio is requested from the Graph.

WouldCycle

The error returned when adding an edge that would create a cycle.

Traits

DuplexSample

Sample types which may be converted to and from some type S.

Frame

Represents one sample from each channel at a single discrete instance in time within a PCM signal.

FromSample

Similar to the std From trait, but specifically for converting between sample types.

Node

Types to be used as a Node within the DSP Graph.

Sample

A trait for working generically across different Sample format types.

Signal

A trait that allows us to treat Iterators that yield Frames as a multi-channel PCM signal.

ToSample

Similar to the std Into trait, but specifically for converting between sample types.

Walker

A trait providing a variety of useful methods for traversing some graph type G.

Type Definitions

Dag

An alias for the Dag used within our Graph.

EdgeIndex

An alias for our Graph's Edge Index.

NodeIndex

An alias for our Graph's Node Index.

NodesMut

An alias for the iterator yielding mutable access to all node weights.

Panning

The spacial positioning of the node. Currently only supports Stereo or Mono. -1.0 = Left. 0.0 = Center. 1.0 = Right.

PetGraph

An alias for the PetGraph used by our Graph's internal Dag.

RawEdges

Read only access to a Graph's internal edge array.

RawNodes

Read only access to a Graph's internal node array.

Volume

The amplitude multiplier.