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.
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.
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.
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.
ChainError
Why a ProcessorChain refuses a processor.
ChannelLayout
Validated channel organization used at every host boundary.
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.
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_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_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_PEAKING_GAIN_DB
Largest peaking gain a filter renders, in decibels either way.
MAX_RATIO
Largest ratio a compressor 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.