Skip to main content

Crate alpha2_audio

Crate alpha2_audio 

Source
Expand description

Platform-independent, real-time-safe audio DSP primitives and graph.

Structs§

AudioGraph
Clip chain -> track bus -> master bus graph with deterministic latency aggregation.
AudioGraphState
Complete graph history captured between offline chunks.
AutomatedGain
Sample-accurate gain driven by an immutable automation curve.
AutomationCurve
Immutable piecewise-linear automation prepared off the realtime thread.
AutomationPoint
One sample-addressed automation point.
Biquad
Two-channel transposed-direct-form-II biquad.
ChainStateError
Where and why a ProcessorChain refused a saved state. The chain is unchanged.
Compressor
Linked-channel compressor with deterministic lookahead and soft attack/release.
CompressorSettings
What a Compressor is built from. Invalid values are replaced by conservative defaults and the rest clamped to what renders.
ControlLane
Where one node’s parameter values lie in a block’s Controls.
ControlSpan
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.
DelayLine
A fixed delay of whole samples on up to two channels that share one cursor: process each channel of a block, then call Self::advance once.
DetectorFilter
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.
EnvelopeFollower
Reusable peak envelope follower.
EqualPowerCrossfade
Equal-power crossfade between two planar input buses.
Expander
Linked-channel downward expander; with a high ratio, a gate.
ExpanderSettings
What an Expander is 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 Resampler at any real source position.
LinearFade
Sample-addressed linear fade independent of host block size.
LoudnessMeter
A streaming BS.1770-4 / EBU R128 loudness meter.
LoudnessNormalization
A static gain to a loudness target, bounded by a true-peak ceiling and any master limiter.
LoudnessReport
What a LoudnessMeter has measured.
Matrix
A two-by-two gain matrix over a stereo pair: left = ll * L + lr * R and right = rl * L + rr * R. Width, swap, mono, polarity and balance are settings of it.
PeakLimiter
Linked-channel peak limiter with instantaneous attack and exponential release.
ProcessCtx
Immutable information for one DSP invocation.
ProcessorChain
Ordered processor chain with all realtime scratch allocated by prepare.
ResampleError
Why a converter could not be made.
Resampler
A band-limited converter from one sample rate to another.
SchroederReverb
Allocation-free prepared Schroeder reverb with four combs and two allpasses.
StateBlob
Opaque processor state saved outside the real-time process path.
Stretch
WSOLA’s grid at one sample rate.
StretchReader
A Stretch that caches the last segments’ offsets, so sequential reads search each once.
StretchSignal
samples from index start; silent elsewhere and wherever a sample is not finite.
Waveform
A finished waveform summary: its levels, finest first.
WaveformBucket
The extremes and RMS of one run of samples of one channel.
WaveformLevel
One zoom level of a Waveform.
WaveformSummary
Builds a Waveform from planar samples streamed in blocks.

Enums§

BiquadKind
Common parametric equalizer shapes, by the Audio EQ Cookbook’s formulas. The gain belongs to the peaking and shelving shapes; the others ignore it.
ChainError
Why a ProcessorChain refuses a processor.
ChannelLayout
Validated channel organization used at every host boundary.
Detector
How a compressor measures the level it compresses by.
FadeDirection
Direction of a linear amplitude fade.
GraphStateError
Where and why an AudioGraph refused a saved state. The graph is unchanged.
LoudnessError
Why a meter cannot be configured or fed.
StateError
Why a processor, crate::ProcessorChain or crate::AudioGraph refuses a saved state. A refused state changes nothing.
TransportState
Current host transport state supplied without consulting a platform clock.
WaveformError
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 f32 gain rounding (about 2e-6 dB) a thousand times over.
MAX_DELAY_FEEDBACK
Most feedback a Delay renders.
MAX_DELAY_MS
Longest time a Delay renders, 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_SPEED source 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 Matrix gain.
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.