Module prelude

Source
Expand description

Convenience re-exports for common bbx_dsp usage.

This module provides a single import for the most commonly used types when building DSP graphs.

§Example

use bbx_dsp::prelude::*;

let mut builder = GraphBuilder::<f32>::new(44100.0, 512, 2);
let osc = builder.add(OscillatorBlock::new(440.0, Waveform::Sine, None));
let gain = builder.add(GainBlock::new(-6.0, None));
builder.connect(osc, 0, gain, 0);
let graph = builder.build();

Structs§

AmbisonicDecoderBlock
Decodes ambisonics B-format to a speaker layout.
AudioBuffer
A buffer for storing audio sample data.
BinauralDecoderBlock
Decodes multi-channel audio to stereo for headphone listening.
BlockId
A unique identifier for a block within a DSP graph.
ChannelMergerBlock
Merges individual mono inputs into a multi-channel output.
ChannelRouterBlock
A channel router block for stereo signal manipulation.
ChannelSplitterBlock
Splits multi-channel input into individual mono outputs.
DcBlockerBlock
A DC blocking filter that removes DC offset from audio signals.
DspContext
Runtime context passed to blocks during audio processing.
EnvelopeBlock
ADSR envelope generator block for amplitude and parameter modulation.
FileInputBlock
Reads audio from a file into the DSP graph.
FileOutputBlock
Writes audio from the DSP graph to a file.
GainBlock
A gain control block that applies amplitude scaling.
Graph
A directed acyclic graph of connected DSP blocks.
GraphBuilder
Fluent builder for constructing DSP graphs.
LfoBlock
A low-frequency oscillator for modulating block parameters.
Linear
Marker type for linear smoothing.
LowPassFilterBlock
SVF-based low-pass filter for efficient, stable filtering.
MatrixMixerBlock
An NxM mixing matrix for flexible channel routing.
MixerBlock
A channel-wise audio mixer that sums multiple sources per output channel.
Multiplicative
Marker type for multiplicative (exponential) smoothing.
OscillatorBlock
A waveform oscillator for generating audio signals.
OutputBlock
The terminal output block for a DSP graph.
OverdriveBlock
An overdrive distortion effect with asymmetric soft clipping.
PannerBlock
A spatial panning block supporting stereo, surround, and ambisonic formats.
SmoothedValue
A value that smoothly transitions to a target over time.
VcaBlock
A voltage controlled amplifier that multiplies audio by a control signal.

Enums§

BinauralStrategy
Binaural decoding strategy.
BlockType
Type-erased container for all block implementations.
ChannelMode
Channel routing mode for stereo signals.
PannerMode
Panning mode determining the algorithm and output format.
Parameter
A block parameter that can be constant or modulated.
Waveform
Standard waveform shapes for oscillators and LFOs.

Constants§

DEFAULT_BUFFER_SIZE
Default buffer size for DSP graphs (512 samples).
DEFAULT_SAMPLE_RATE
Default sample rate for DSP graphs (44100 Hz).

Traits§

Block
The core trait for DSP processing units.
Sample
A floating-point type suitable for audio sample data.
SmoothingStrategy
Trait defining smoothing behavior for different interpolation strategies.

Type Aliases§

LinearSmoothedValue
Linear smoothed value - uses additive interpolation.
MultiplicativeSmoothedValue
Multiplicative smoothed value - uses exponential interpolation. Better for parameters like gain where equal ratios should feel equal.