Expand description
rawdio is an audio engine that is inspired by the Web Audio API
You can use it to:
- Create a context
- Create DSP nodes
- Connect the nodes together
- Accurately schedule ‘events’
- Process the graph with an input and an output
§Example
use rawdio::{connect_nodes, create_engine, AudioProcess, Context, Oscillator, OwnedAudioBuffer};
let (mut context, mut process) = create_engine();
let frequency = 1_000.0;
let channel_count = 2;
let oscillator = Oscillator::sine(context.as_ref(), frequency, channel_count);
connect_nodes!(oscillator => "output");
context.start();
// Call `process.process(...)`, passing in the input samples, and using the output
// If you wish to use with your sound card, you could use something like cpal (see the examples)
Modules§
- prelude
- Module to re-export commonly used types
Macros§
- connect_
nodes - Connect a graph
Structs§
- Adsr
- An ADSR node that will create an envelope to modulate the amplitude of its input
- Audio
Parameter - An parameter that generates a value for every audio sample
- Biquad
- A biquad filter
- Borrowed
Audio Buffer - An AudioBuffer that borrows audio from a different audio buffer
- Compressor
- A basic dynamics compressor
- Convolution
- A convolution node to convolve the input signal with an impulse response
- Engine
Options - Options to control the engine
- Envelope
- A node that tracks the input signal and outputs the envelope
- Gain
- A node that applies gain to the input
- Graph
Node - A node the connects into the audio graph
- Level
- A level that can be used to convert from linear to decibel representation
- Mixer
- A node that mixes between its input and output channels
- Mutable
Borrowed Audio Buffer - A mutable buffer that refers to a portion of another buffer
- Oscillator
- An oscillator node
- Owned
Audio Buffer - An audio buffer that owns its audio data
- Pan
- A node that will pan the input signal between two output channels
- Process
Context - The context that is passed to every [DspProcessor]
- Recorder
- A node that records its input
- Sample
Location - Specify the location in an audio buffer using the frame and channel index
- Sampler
- A node that can play or loop a sample
- Timestamp
- A fixed-point representation of a timestamp
- Waveshaper
- A node that will distort the input signal using a specified function
Enums§
- Biquad
Filter Type - The type of the biquad filter
Traits§
- Audio
Buffer - An
AudioBuffer
represents floating point audio data for a number of channels - Audio
Process - An audio process that can be processed with input and output audio samples
- Context
- The root audio context
Functions§
- create_
engine - Create an engine with the default options
- create_
engine_ with_ options - Create an audio engine with custom options