Expand description
Platform-independent, real-time-safe audio DSP primitives and graph.
Structs§
- Audio
Graph - Clip chain -> track bus -> master bus graph with deterministic latency aggregation.
- Audio
Graph State - Complete graph history captured between offline chunks.
- Automated
Gain - Sample-accurate gain driven by an immutable automation curve.
- Automation
Curve - Immutable piecewise-linear automation prepared off the realtime thread.
- Automation
Point - One sample-addressed automation point.
- Biquad
- Two-channel transposed-direct-form-II biquad.
- Chain
State Error - Where and why a
ProcessorChainrefused a saved state. The chain is unchanged. - Compressor
- Linked-channel compressor with deterministic lookahead and soft attack/release.
- Compressor
Settings - What a
Compressoris built from. Invalid values are replaced by conservative defaults and the rest clamped to what renders. - Control
Lane - Where one node’s parameter values lie in a block’s
Controls. - Control
Span - The settings a retuned processor moves between over one control interval.
- Controls
- Parameter values at the control points one block touches, for the chain nodes it retunes.
- Delay
- A feedback delay line on up to two channels.
- Delay
Line - A fixed delay of whole samples on up to two channels that share one cursor: process each
channel of a block, then call
Self::advanceonce. - Detector
Filter - One static filter a compressor or expander puts before its level detector, so that only a band of the detected signal drives the gain.
- Ducker
- Sidechain ducker. Inputs are program channels followed by matching sidechain channels.
- Envelope
Follower - Reusable peak envelope follower.
- Equal
Power Crossfade - Equal-power crossfade between two planar input buses.
- Expander
- Linked-channel downward expander; with a high ratio, a gate.
- Expander
Settings - What an
Expanderis built from. Invalid values are replaced by conservative defaults and the rest clamped to what renders. - Gain
- Stateless linear amplitude multiplier.
- Interpolator
- Band-limited interpolation for clips at non-unity speed, using the same kernel as
Resamplerat any real source position. - Linear
Fade - Sample-addressed linear fade independent of host block size.
- Loudness
Meter - A streaming BS.1770-4 / EBU R128 loudness meter.
- Loudness
Normalization - A static gain to a loudness target, bounded by a true-peak ceiling and any master limiter.
- Loudness
Report - What a
LoudnessMeterhas measured. - Matrix
- A two-by-two gain matrix over a stereo pair:
left = ll * L + lr * Randright = rl * L + rr * R. Width, swap, mono, polarity and balance are settings of it. - Peak
Limiter - Linked-channel peak limiter with instantaneous attack and exponential release.
- Process
Ctx - Immutable information for one DSP invocation.
- Processor
Chain - Ordered processor chain with all realtime scratch allocated by
prepare. - Resample
Error - Why a converter could not be made.
- Resampler
- A band-limited converter from one sample rate to another.
- Schroeder
Reverb - Allocation-free prepared Schroeder reverb with four combs and two allpasses.
- State
Blob - Opaque processor state saved outside the real-time process path.
- Stretch
- WSOLA’s grid at one sample rate.
- Stretch
Reader - A
Stretchthat caches the last segments’ offsets, so sequential reads search each once. - Stretch
Signal samplesfrom indexstart; silent elsewhere and wherever a sample is not finite.- Waveform
- A finished waveform summary: its levels, finest first.
- Waveform
Bucket - The extremes and RMS of one run of samples of one channel.
- Waveform
Level - One zoom level of a
Waveform. - Waveform
Summary - Builds a
Waveformfrom planar samples streamed in blocks.
Enums§
- Biquad
Kind - Common parametric equalizer shapes, by the Audio EQ Cookbook’s formulas. The gain belongs to the peaking and shelving shapes; the others ignore it.
- Chain
Error - Why a
ProcessorChainrefuses a processor. - Channel
Layout - Validated channel organization used at every host boundary.
- Detector
- How a compressor measures the level it compresses by.
- Fade
Direction - Direction of a linear amplitude fade.
- Graph
State Error - Where and why an
AudioGraphrefused a saved state. The graph is unchanged. - Loudness
Error - Why a meter cannot be configured or fed.
- State
Error - Why a processor,
crate::ProcessorChainorcrate::AudioGraphrefuses a saved state. A refused state changes nothing. - Transport
State - Current host transport state supplied without consulting a platform clock.
- Waveform
Error - Why a waveform summary cannot be configured or fed.
Constants§
- ABSOLUTE_
GATE_ LUFS - The level below which a block never counts, in LUFS.
- CONTROL_
INTERVAL - Project samples between the points where a retuned processor is given parameter values.
- LIMITER_
MARGIN_ DB - Headroom in dB below a master limiter’s threshold for a normalized mix’s sample peak, so the
limiter never acts. It covers
f32gain rounding (about 2e-6 dB) a thousand times over. - MAX_
DELAY_ FEEDBACK - Most feedback a
Delayrenders. - MAX_
DELAY_ MS - Longest time a
Delayrenders, in milliseconds; the shortest is one. - MAX_
DOWNSAMPLE_ FACTOR - The largest source-to-target rate ratio. Downsampling widens the filter by 16 taps a side per factor, and beyond this it would not fit the table (768 kHz converts down to 94 Hz).
- MAX_
EXPANDER_ RANGE_ DB - Deepest attenuation an expander renders, in decibels.
- MAX_
FILTERED_ SPEED - The fastest speed whose filter narrows with it. Faster clips keep this filter, bounding an
output sample to
2 * HALF_TAPS * MAX_FILTERED_SPEEDsource samples. - MAX_
FREQUENCY_ FRACTION - Highest frequency a filter renders, as a fraction of the sample rate.
- MAX_
HOLD_ MS - Longest hold an expander renders, in milliseconds.
- MAX_
KNEE_ DB - Widest knee a compressor renders, in decibels.
- MAX_
MAKEUP_ DB - Largest makeup gain a compressor renders, in decibels either way.
- MAX_
MATRIX_ GAIN - Largest magnitude of a
Matrixgain. - MAX_
PEAKING_ GAIN_ DB - Largest gain a peaking or shelving filter renders, in decibels either way.
- MAX_
RATIO - Largest ratio a compressor or expander renders.
- MAX_
RESAMPLE_ RATE - The highest rate either side may have.
- MAX_
WAVEFORM_ LEVELS - Most zoom levels; a 1-sample base reaches 4^15 samples, over six hours at 48 kHz.
- MIN_
FREQUENCY_ HZ - Lowest frequency a filter renders, in hertz.
- Q_RANGE
- The resonances a filter renders.
- STRETCH_
SEGMENT_ GRAINS - Grains whose offsets one chain decides.
- STRETCH_
WARMUP_ GRAINS - Grains a segment’s chain runs before its first, from offset zero.
Traits§
- Processor
- Stateful DSP unit whose process method performs no allocation or locking.