AUDIO
Source snapshot · 11 November 2026

API reference / ravet_signal

Crate ravet_signal 

Expand description

Audio processing building blocks for RAVET.

LinearSmoother provides finite, sample-counted parameter transitions. It is independent of processors, plug-in formats, devices, and editors. DelayLine and DelayDiffuser provide prepared double-precision storage and feedback diffusion. HalfBand2x provides a fixed streaming oversampling path for effects; StereoOversampler runs it over whole stereo blocks. StereoFir is a prepared fixed-size stereo FIR. CombFilter provides fixed-delay feedforward and feedback comb filtering. PeakRmsMeter measures caller-selected sample peak/RMS windows. PhaseRotation advances caller-owned quadrature oscillator banks. Waveshaper applies custom transfer functions or explicit clipping curves.

Structs§

Adsr
Linear ADSR from the current level; retrigger does not reset to zero. The first processed sample advances the ramp; the last snaps to its target. Zero-duration stages transition immediately. Configuration replacement is explicit by constructing a new envelope. Sample/block/reset operations do not allocate. Voice lifetime and note-off/sustain policies belong to callers.
AdsrConfig
Validated durations in prepared samples; sustain is linear amplitude 0..=1.
BallisticsBank
Prepared independent channel histories in fixed storage. Channels 1..64 and maximum block 1..65536; no heap in construction/process/reset. Planar calls preflight EVERY channel/prefix before any history/output; caller suffixes untouched, no implicit per-block denormal snapping. Shared immutable timing does not link channels or their amplitude state.
BallisticsBank32
Prepared independent channel histories in fixed storage. Channels 1..64 and maximum block 1..65536; no heap in construction/process/reset. Planar calls preflight EVERY channel/prefix before any history/output; caller suffixes untouched, no implicit per-block denormal snapping. Shared immutable timing does not link channels or their amplitude state.
BallisticsConfig
Validated seconds-based timing, prepared on CONTROL without allocation. Finite rate 1..768000 Hz and times 0..60 seconds. Zero explicitly selects instantaneous response. Nonzero times whose alpha or actual complement rounds to an endpoint reject; RMS also checks its rounded zero-input release factor. Ideal time constants describe amplitude for Peak and energy for RMS. Actual native floating-point recurrence/rounding need not settle at ideal times.
BallisticsConfig32
Explicit native f32 coefficients, validated separately from their f64 origin. Time/rate metadata names the requested physical parameters, not a promise that every native rounding profile matches ideal continuous settling exactly.
BallisticsFilter
Fixed one-channel amplitude state, native Peak or scaled-energy RMS. Reset/config replacement is explicit; no window, linking or lookahead. NaN and infinity poison history until reset (NaN stays NaN; infinity stays positive infinity). No sanitization or block-boundary snapping. Native ratio-square/release underflow and rounding remain observable.
BallisticsFilter32
Fixed one-channel amplitude state, native Peak or scaled-energy RMS. Reset/config replacement is explicit; no window, linking or lookahead. NaN and infinity poison history until reset (NaN stays NaN; infinity stays positive infinity). No sanitization or block-boundary snapping. Native ratio-square/release underflow and rounding remain observable.
Biquad
One channel of transposed direct-form II f64 processing. State persists across blocks; process/reset allocate nothing. Nonfinite audio propagates. No denormal policy, coefficient smoothing or callback deadline is imposed.
BiquadCascade
Prepared one-channel f64 cascade; sample/block/reset/replacement use fixed storage. Coefficient replacement preserves every stage’s delay state without smoothing. No denormal/nonfinite/headroom/deadline policy is imposed.
BiquadCoefficients
Normalized coefficients for H(z)=(b0+b1z^-1+b2z^-2)/(1+a1z^-1+a2z^-2). Private fields keep finite/stable constructor invariants intact.
ButterworthDesign
Finite, strictly stable sections for low/high order 1..32 or even band order 2..32. Design is allocation-free CONTROL work. Extreme unrepresentable poles, gains, cutoffs or stability margins reject rather than being clamped.
ButterworthFilter
One-channel allocation-free processing using at most 16 fixed sections. Nonfinite audio propagates. There is no transition smoothing, anti-denormal, headroom or real-time deadline guarantee. Each channel needs its own owner.
CascadeCoefficients
Validated 1..16 second-order sections; immutable designs belong on control threads. Explicit arbitrary stages need not be Butterworth or unity gain.
ChannelLengthMismatch
Two channel buffers of different lengths were passed to StereoFir::process. Nothing was processed.
ChebyshevDesign
Fixed16-section f64 design, LP/HP order1..32 or band total even order2..32. CONTROL allocation-free design checks finite arithmetic/gains and strict Jury stability; there are no coefficient, frequency or ripple repairs. Extreme unrepresentable margins reject. Actual response inspection is CONTROL work.
ChebyshevFilter
One-channel fixed-state f64 processing. Sample/block/reset have no allocation, lock or I/O. Nonfinite audio propagates; headroom/denormals/transitions are consumer policy. No finite IIR tail, smoothing or native deadline guarantee.
ChorusControls
Live chorus controls, replaced together after validation. Delay modulation is center*(1 + depth*sin(phase)), clamped to at least one sample. This is a linear fractional-delay profile; delay/pitch modulation is not bandlimited.
CombFilter
Prepared one-channel f64 comb with a fixed whole-sample delay.
Complex
Double-precision complex value used by the FFT; no heap storage.
Complex32
Single-precision complex value used by the native f32 FFT; no heap storage.
Compressor
One-channel peak compressor with explicit sidechain. No lookahead/latency, channel linking, hard brickwall limit or automatic makeup. Processing uses per-sample log/pow and allocates nothing; nonfinite audio is not sanitized.
CompressorConfig
Validated soft-knee compressor configuration, prepared on control threads.
ConfiguredHalfBand2x
Independent prepared interpolation/decimation coefficient profiles and states. Low-rate allpasses return even/odd interpolation samples in time order, with unity DC sample gain (gain 2 relative to high-rate zero stuffing). Decimation retains even phase and previous odd branch. No hidden phase/tail trimming.
ConfiguredHalfBand2x32
Independent prepared interpolation/decimation coefficient profiles and states. Low-rate allpasses return even/odd interpolation samples in time order, with unity DC sample gain (gain 2 relative to high-rate zero stuffing). Decimation retains even phase and previous odd branch. No hidden phase/tail trimming.
ConfiguredOversampler
Configured 1/2/4/8 cascades; fixed 3 stages/stack 8 samples, exact closure call count/time order. CONTROL construction; heap/lock/I/O-free sample/block/reset. Caller closure obligations remain separate. FactorOne exact pass-through; no dry-phase alignment, integer host latency or modulation/crossfade implied.
ConfiguredOversampler32
Configured 1/2/4/8 cascades; fixed 3 stages/stack 8 samples, exact closure call count/time order. CONTROL construction; heap/lock/I/O-free sample/block/reset. Caller closure obligations remain separate. FactorOne exact pass-through; no dry-phase alignment, integer host latency or modulation/crossfade implied.
ConvolutionBank32
Independent diagonal1..64-channel bank with whole-call admission. No hidden stereo crossfeed, channel-linked normalization or clock policy.
ConvolutionBank64
Independent diagonal1..64-channel bank with whole-call admission. No hidden stereo crossfeed, channel-linked normalization or clock policy.
ConvolutionError
Invalid preparation rejects empty, over-limit or nonfinite impulse responses.
ConvolutionInfo
Immutable exact finite-response/storage/schedule observations. Numeric bytes include Vec capacities of samples/spectra/twiddles, excluding allocator overhead and fixed control metadata. Tail includes block latency.
ConvolutionStageInfo
Actual static stage coordinates, not a claim about ideal IR onset/CPU deadline.
ConvolutionStageWork
Bounded work observation. Saturation is explicit; these counters never wrap. Completed blocks each execute one forward and one inverse FFT. Reset clears counts; this is not an instruction-cost, clock or deadline receipt.
Convolver32
Complete native sample-precision convolution with immutable explicit schedule. CONTROL preparation/Drop owns storage; prepared process/reset never allocate or deallocate. Head and FFT arithmetic execute in the named sample precision. Nonfinite/overflow samples propagate; reset clears all history. No implicit EOF, denormal/normalization policy, live IR replacement or deadline promise.
Convolver64
Complete native sample-precision convolution with immutable explicit schedule. CONTROL preparation/Drop owns storage; prepared process/reset never allocate or deallocate. Head and FFT arithmetic execute in the named sample precision. Nonfinite/overflow samples propagate; reset clears all history. No implicit EOF, denormal/normalization policy, live IR replacement or deadline promise.
CrossoverLengthError
Input, low output and high output must have exactly equal lengths.
CrossoverOutputs
Low/high samples or linear response amplitudes of the two crossover branches.
DelayDiffuser
Feedback delay diffuser with a prepared integer delay.
DelayLine
A circular double-precision delay with linear fractional interpolation.
DryWetGains
Prepared direct wet coordinate0..1. The full seven curves and explicit normalization are shared with panning; a tiny wet value is not lost through an affine conversion to pan. Center normalization can boost weights up to2.
DryWetGains32
Actual rounded f32 mix weights; requested metadata remains explicit.
DryWetMixer
Single-owner native dry/wet consumer. CONTROL construction/reservation and disposal own storage; push/mix/validated edits/reset use no heap, locks or I/O. Reset visits full allocated history/queue, not O(1).
DryWetMixer32
Single-owner native dry/wet consumer. CONTROL construction/reservation and disposal own storage; push/mix/validated edits/reset use no heap, locks or I/O. Reset visits full allocated history/queue, not O(1).
DryWetMixerConfig
All preparation bounds are explicit; no default rate, time or interpolation. Queue frames1..65536, block1..65536, channels1..64, maximum latency0..4194300. Combined native queue/history and fixed recursive values must fit32MiB.
DynamicsError
EllipticDesign
Fixed16-section f64 design: LP/HP1..32, band total even2..32. Finite 0<ripple<attenuation<=300dB, ripple<=120dB. CONTROL design is allocation-free; bounded AGM, degree and inverse solves reject unrepresentable arithmetic, margins or residuals without parameter repairs. Not every otherwise valid extreme parameter combination is numerically representable in this profile.
EllipticFilter
One-channel fixed-state f64 processing. Sample/block/reset have no allocation, lock or I/O. Nonfinite audio propagates; headroom/denormals/transitions are consumer policy. No finite IIR tail, smoothing or native deadline guarantee.
EmptyDelay
Zero-length storage cannot represent a delay line.
EnvelopeError
EnvelopeFollower
Rectified one-pole peak envelope. Time constants are seconds (63.2% settling). NaN/infinite samples are not sanitized and may poison history until reset.
EquirippleExtremum
Actual supported weighted error, desired minus signed zero-phase amplitude.
EquirippleFirDesign
Immutable sampled exchange result. Odd3..511 TypeI/even2..512 TypeII;<=32768 observed grid points and4MiB aggregate scratch. CONTROL fallible allocation, bounded design/Drop; AUDIO belongs to separately prepared existing convolvers. Numeric allowance and actual grid/ripple observations are exposed. This is not a certified continuous minimax bound, automatic tap/spec sizing or deadline.
EquirippleOptions
Bounded exchange controls. Default density16,64 iterations, relative gap1e-8. Density8..64,iterations1..128 and finite relative gap1e-12..1e-3 reject otherwise.
FftPlan
Prepared complex radix-two FFT, 1..=1,048,576 points. Construction allocates twiddles; transforms allocate/deallocate nothing. Forward uses exp(-iw), inverse exp(+iw) normalized by 1/N. Nonfinite samples propagate; no real-only packing, windowing or SIMD policy.
FftPlan32
Prepared complex radix-two FFT, 1..=1,048,576 points. Fallible construction allocates native f32 twiddles after budget admission; phase/cos/sin use f64 on CONTROL followed by explicit f32 quantization. Transform butterflies, products, sums and inverse scaling execute in f32. Transforms allocate/deallocate nothing. Forward uses exp(-iw), inverse exp(+iw) normalized by 1/N. Nonfinite samples propagate; no real-only packing, windowing or SIMD policy.
FifoClockConfig
Prepared FIFO clock-correction configuration. Positive occupancy error asks the resampler to consume input faster per output sample. This proportional controller has a steady occupancy offset under constant drift, rather than an integral estimator. It cannot correct drift outside maximum_ppm.
FifoClockController
Fixed-state FIFO depth feedback controller, independent of devices/threads. Caller supplies complete queued+prefetched input occupancy and elapsed output clock time. No allocation, clock reads or automatic resampling. Constructor starts at target occupancy/zero correction; reset returns there. Clamp and slew bounds do not guarantee stability for arbitrary configurations, callback jitter, dropped input or hardware drift. No native deadline claim.
FifoClockError
FilterError
Invalid/nonfinite design, unrepresentable or unstable coefficients.
FirBand
One closed frequency band for weighted coefficient design. Desired gain is linear between finite endpoints -16..=16; weight is finite (0,1e6]. Sorted nonoverlapping positive-width bands may leave unconstrained gaps.
FirConvolver
Single-channel f64 FIR convolution with zero algorithmic block latency. Preparation copies 1..=65,536 finite taps and allocates a history ring. Processing/reset allocate nothing. Cost is O(taps) per sample; this is not partitioned FFT convolution or a callback-deadline guarantee. Nonfinite audio propagates. Replacing a response requires control-thread re-preparation.
FirDesign
Owned symmetric finite coefficients, at most65,536 f64 taps (512KiB). CONTROL fallible allocation/design/Drop; processing belongs to existing convolver owners. Symmetry gives delay(N-1)/2, possibly a half sample. Factories state their numerical profile; no minimum-phase, continuous transition-bound certificate or callback-deadline guarantee.
FirstOrderTptBank
Independent 1..64 signed channel states, shared immutable coefficient profile and maximum block 1..65536. Fixed storage and no allocation in construct/process/reset; planar whole-prefix preflight before any edit. Caller suffixes untouched; empty no-op. No automatic denormal snapping.
FirstOrderTptBank32
Independent 1..64 signed channel states, shared immutable coefficient profile and maximum block 1..65536. Fixed storage and no allocation in construct/process/reset; planar whole-prefix preflight before any edit. Caller suffixes untouched; empty no-op. No automatic denormal snapping.
FirstOrderTptDesign
Immutable CONTROL design: finite rate 1..768000 Hz, strictly positive cutoff below actual Nyquist and representable normalized ratio, gain/complement/pole. No endpoint nudges or coefficient repairs; transcendental design is explicit. Actual coefficient spectrum can differ from the requested cutoff after rounding.
FirstOrderTptDesign32
FirstOrderTptFilter
Fixed signed capacitor state, native one-pole trapezoidal LP/HP/allpass. Prepared design replacement may preserve state or explicitly reset it. No smoothing, universal modulation stability/inaudibility, sanitization, aligned dry path or integer latency. Nonfinite/large finite overflow propagates and may poison history until reset; infinite ideal tail.
FirstOrderTptFilter32
Fixed signed capacitor state, native one-pole trapezoidal LP/HP/allpass. Prepared design replacement may preserve state or explicitly reset it. No smoothing, universal modulation stability/inaudibility, sanitization, aligned dry path or integer latency. Nonfinite/large finite overflow propagates and may poison history until reset; infinite ideal tail.
FirstOrderTptOutputs
Simultaneous responses from one capacitor update. LP+HP is input in ideal arithmetic; allpass has frequency-dependent phase, not dry delay.
FirstOrderTptOutputs32
Simultaneous responses from one capacitor update. LP+HP is input in ideal arithmetic; allpass has frequency-dependent phase, not dry delay.
FractionalDelay
One-channel f64 causal fractional delay, initially zero, with immutable policy.
HalfBand2x
One channel of 2× interpolation and decimation with fixed half-band IIR coefficients. State persists across samples and blocks; reset allocates nothing. Upsample once, process both samples at twice the host sample rate, and downsample once. This introduces frequency-dependent wet-path delay; it does not align the dry path or provide host latency compensation.
HalfBandIirDesign
Immutable f64 elliptic allpass halfband profile. Odd order 1..63 and finite full HIGH-rate transition width in (0, 0.5); fixed 31 coefficient storage, no allocation. CONTROL bounded AGM/Jacobi/degree solve and 4097-point measurement. Unresolved edges/moduli/stability or derived nominal attenuation above 300 dB reject, no repairs. Low-rate A_b(q)=product((a+q^-1)/(1+aq^-1)); full-rate Hlow(z)=0.5(A0(z²)+z^-1*A1(z²)), Hhigh uses minus. Allpass phase gives frequency-dependent delay; nominal ripple is not a continuous bound after rounding.
HalfBandIirDesign32
Explicit f32 rounded coefficients with separately measured spectrum. Prototype nominal metadata describes the originating f64 design. Fixed storage only.
HalfBandIirFilter
Full-rate complementary LP/HP from validated immutable allpass coefficients. Fixed histories, one update/input; replacement resets, unsmoothed. LP+HP is the direct allpass, not dry input. Infinite recursive tail and frequency- dependent phase remain explicit. Nonfinite audio/headroom/denormals propagate.
HalfBandIirFilter32
Full-rate complementary LP/HP from validated immutable allpass coefficients. Fixed histories, one update/input; replacement resets, unsmoothed. LP+HP is the direct allpass, not dry input. Infinite recursive tail and frequency- dependent phase remain explicit. Nonfinite audio/headroom/denormals propagate.
HalfBandStopPeak
Actual rounded-coefficient stopband observation on 4097 uniform closed points. Frequency is normalized HIGH-rate cycles/sample. This is a sampled observation, distinct from the sizing stop-edge criterion and continuous certification.
ImpulseResponsePlan
Exact pre-allocation coordinates computed by ImpulseResponseRequest::plan.
ImpulseResponseReport
Recorded offsets, gains and levels of one successful preparation.
ImpulseResponseRequest
Complete explicit preparation request. There are no defaults.
IntegerResamplingPosition
Immutable next-output coordinates for an explicitly integer-scheduled stream. This is a mathematical schedule, not evidence that a reader decoded its prefix. Padded input coordinates can exceed u64; absolute products use u128.
KWeightingDesign
Immutable CONTROL calibration. Native f32 audio deliberately widens into f64.
KaiserFirDesign
Transparent empirical Kaiser sizing, not verified pass/stop enforcement. Inspect actual coefficients/response for the consumer’s requirements.
LadderBank
Fixed 1..64 channel independently evolving ladder histories with shared immutable coefficient copies and maximum block 1..65536. All shape/prefix/frame validation completes before output/history. Empty calls do not advance; suffixes remain untouched. Per-channel scalar access returns all modes once.
LadderBank32
Fixed 1..64 channel independently evolving ladder histories with shared immutable coefficient copies and maximum block 1..65536. All shape/prefix/frame validation completes before output/history. Empty calls do not advance; suffixes remain untouched. Per-channel scalar access returns all modes once.
LadderDesign
Immutable requested physical controls and actual f64 coefficients. Finite rate 8000..768000, cutoff/rate 1e-5..0.45 (both original Hz and divided ratio), resonance 0..1 maps k=4*r, drive 1..32 multiplies input before saturation. No hidden gain compensation, smoothing, oversampling or distributed-stage transistor/OTA model. k = 4 is the marginal small-signal endpoint, not strict decay.
LadderDesign32
Explicit native32 coefficient rounding; original requested controls remain available through prototype(). Actual gain/complement/pole and nonzero k representability qualify before construction, without nudge or clamp.
LadderFilter
Native single-channel nonlinear feedback ladder. Saturator model: u=tanh(dx-ky4), four RC stages prewarped/trapezoidal. Selected modal taps share history; no implicit output normalization or sample interpolation.
LadderFilter32
Native single-channel nonlinear feedback ladder. Saturator model: u=tanh(dx-ky4), four RC stages prewarped/trapezoidal. Selected modal taps share history; no implicit output normalization or sample interpolation.
LadderOutputs
Simultaneous six modal outputs from one capacitor update. Under explicit bypass every named output is dry source and history/last solve remain frozen.
LadderOutputs32
Simultaneous six modal outputs from one capacitor update. Under explicit bypass every named output is dry source and history/last solve remain frozen.
LadderSolveInfo
Native observations of the immediately preceding non-bypassed sample. Scalar residual uses rounded affine A/B; staged residual uses actual four trapezoidal outputs. They need not agree bitwise. No coherence/clock claim.
LadderSolveInfo32
Native observations of the immediately preceding non-bypassed sample. Scalar residual uses rounded affine A/B; staged residual uses actual four trapezoidal outputs. They need not agree bitwise. No coherence/clock claim.
LinearSmoother
A linear transition lasting exactly the configured number of samples.
LinkwitzRileyCoefficients
Prepared LR4 low/high branches, each two identical second-order Butterworth sections. Both branches have amplitude 0.5 at cutoff. Their sum has unity magnitude with all-pass phase; it does not reproduce the input waveform.
LinkwitzRileyCrossover
One channel of f64 LR4 processing with four fixed-storage biquads. Consumers own channel instances, headroom, denormals and callback deadlines. Nonfinite audio propagates and may poison history until reset. This electrical profile supplies no loudspeaker alignment, automatic routing or crossover modulation.
LoudnessFault
First actual filter fault; coordinate is a zero-based source-plus-tail index.
LoudnessLiveReading64
Latest complete-grid windows, without implicit post-window smoothing.
LoudnessProgrammeReport64
Exclusive CONTROL analysis of all retained programme records.
LoudnessRecordCapacities
Independently bounded complete I/LRA records, each 1..1000000. Prepared LRA report scratch follows the LRA limit. The aggregate 32 MiB check is a defensive guard: current per-array caps imply at most 24,000,000 array bytes plus the owner, so these requests cannot reach the pre-reserve refusal, and the check on actual allocated capacity covers allocators that return more than requested.
MeterReading
Finite meter results; nonfinite samples are counted as silence and flagged.
MeterReading64
Snapshot of native f64 audio levels; nonfinite samples count as silence.
MultiplicativeSmoother
Positive f32 endpoints transition geometrically over an exact sample count. First output advances one of N multiplicative steps; the Nth snaps exactly to target. Zero duration is immediate. Identical targets retain an active ramp; changed targets restart from the current effective f32 value. Zero/negative endpoints reject without mutation (use a linear smoother for silence/crossing). Ratio design uses f64 logs/exp on retarget; sample processing uses one f64 multiply and bounded endpoint clipping. Rounding can repeat output values, especially for very long ramps; no hard real-time deadline claim is inferred. Construction, retarget, sample processing and reset allocate nothing.
NoiseGate
One-channel finite-floor noise gate using an explicit rectified sidechain. Attack/release smooth the detector, rather than a separate gain envelope. No lookahead, hold, hysteresis, channel linking or hard mute. Processing/reset allocate nothing; per-sample log/pow and nonfinite audio are not sanitized.
NoiseGateConfig
Prepared downward-expansion gate configuration with a finite attenuation floor. The ratio multiplies input dB below threshold; one leaves the signal unchanged.
Oscillator
One-channel f64 oscillator. Sine uses per-sample trig; saw/square use polyBLEP edge correction. Triangle is a naive phase waveform and can alias. There is no claim of alias-free synthesis or a hard callback deadline.
OscillatorError
Oversampler
One-channel configurable 1x/2x/4x/8x streaming f32 oversampling. Three fixed half-band stages and stack scratch require no preparation heap. Changing factor requires a new instance/reset; no live crossfade, dry-path alignment or constant integer latency is supplied. Closure DSP must be prepared at host sample rate times factor and obey callback obligations.
PanningGains
Immutable CONTROL-prepared actual f64 coefficients. Pan is -1..1. The seven curves are linear, balanced, sine, sine^1.5, sine², square-root and power^.75. UnityCenter scales by the rounded reciprocal of the ideal center gain, making both center channels unity and boosting endpoints up to 2. No clipping, input scan or limiter. Endpoints/center are explicit; mirrored pans swap identical actual gains. Trigonometry and powers occur here, never in per-frame processing.
PanningGains32
Explicitly rounded f32 coefficients with original requested curve metadata.
PartitionedConvolutionError
Invalid finite impulse response or partition size, rejected before preparation.
PartitionedConvolver
Prepared single-channel f64 uniform partitioned convolution.
PeakLimiter
Prepared one-channel sample-peak limiter, with instantaneous attack and a rectified peak detector’s exponential release. No lookahead or true-peak/ intersample guarantee; independent channels are not linked. Per-sample/reset paths allocate nothing. Nonfinite audio is not validated: NaN propagates; infinity passes the final clamp, and either can poison detector history until reset. Hard ceiling clipping protects final rounding.
PeakRmsMeter
Caller-selected measurement window; reset starts a new window. No smoothing, decay, true-peak oversampling, or loudness weighting.
PeakRmsMeter64
Prepared fixed storage, without heap/locks/I/O. RMS uses scaled sum-of-squares; finite f64 maxima do not overflow and subnormal levels remain representable. A full u64 sample window ignores further samples. No audio sanitization.
PhaseRotation
A precomputed rotation through a finite fraction of one cycle.
Phaser
Fixed six native TPT allpasses per independent channel, shared f64 base LFO phase with explicit offsets, one-sample signed wet feedback. Whole admissible sweep near normalized1e-6..0.49 is CONTROL validated. F64 sine/exp2/tan/phase are explicit per frame/channel; coefficient and recurrence/audio arithmetic are native. No deadline/cheap-LFO claim. Construction/control/process/reset use fixed storage, no heap/lock/I/O.
Phaser32
Fixed six native TPT allpasses per independent channel, shared f64 base LFO phase with explicit offsets, one-sample signed wet feedback. Whole admissible sweep near normalized1e-6..0.49 is CONTROL validated. F64 sine/exp2/tan/phase are explicit per frame/channel; coefficient and recurrence/audio arithmetic are native. No deadline/cheap-LFO claim. Construction/control/process/reset use fixed storage, no heap/lock/I/O.
PhaserConfig
Finite sample rate8000..768000, channels1..64, block1..65536.
PhaserControls
Own independent modulation policy. Depth is a four-octave maximum half-span, fc=center2^(4depthsin(2pi*phase)). Adjacent channel offsets are in cycles; channels never crossfeed. No implicit control smoothing/default values.
PreparedImpulseResponse
Owned prepared planar f64 response at the target engine rate plus its report. Building engines or banks from it copies the samples into the engine’s own storage on CONTROL; this value can then be dropped. Builder scratch (slice tables and the f32 narrow copy) is reserved fallibly and reported as ConvolutionPreparationError::Allocation; it is not counted in the engine numeric budget.
PreparedLoudnessMeter64
Prepared one-programme M/S/I/LRA owner, with independent weighted channels.
RealFftPlan
Prepared real f64 transform with N/2+1 positive-frequency complex bins, DC first and Nyquist last (N=1 has only DC). N is power-of-two 1..=1048576. Internally uses the full complex FFT and N complex scratch values: this is a convenient half-spectrum API, not an optimized real-only algorithm. Construction allocates; forward/inverse reuse storage without heap work. No windowing, SIMD, nonfinite sanitization or native deadline is implicit.
ResamplingError
ResamplingProgress
Exact prefix progress. Retry with unconsumed input and fresh output capacity.
ResponseTrim
Explicit leading/trailing trim. None keeps that end unchanged. Trimming is linked across channels so inter-channel timing is preserved, and the removed frame counts are reported.
ReverbConfig
Fixed one-channel Schroeder-style network preparation. The four comb delays are 31/37/41/43 ms and two canonical allpass delays 5/1.3 ms, multiplied by room_scale and rounded to samples. This is a synthetic effect, not a physical room model. Decay specifies each comb’s nominal DC -60 dB feedback decay; damping and mixing change the complete network’s measured decay.
SchroederReverb
Prepared mono f64 reverb: four parallel lowpass-feedback combs averaged into two serial canonical unity-magnitude allpasses. Processing/reset allocate nothing; construction owns six bounded delay allocations. Instantiate independently for channels; no stereo decorrelation/crossfeed is supplied. No modulation, freeze, physical-room fidelity, headroom/denormal policy or native callback-deadline guarantee. Nonfinite audio can poison histories; extreme finite audio may overflow. Reset retains prepared configuration.
SincResampler
One-channel f64 arbitrary-ratio streaming converter, rate ratio 1/16..16. Preparation allocates a 1025-phase Blackman-windowed sinc table and history. Processing interpolates table phases and allocates nothing. Filter delay is (taps-1)/2 input samples; initial history is zero. This is a fixed quality profile, not a spectral rejection or callback deadline guarantee. Fixed rates use Self::new; Self::new_integer_rates selects an exact integer schedule; Self::new_variable prepares bounded live ppm adjustments with a conservative fixed cutoff and retained stream phase.
StateVariableCoefficients
Prepared linear trapezoidal state-variable coefficients for one channel. Rate must be finite/positive, cutoff/rate in 1e-6..=0.499999 and Q in 0.1..=100. Design performs transcendental work on the control thread. These deliberately bounded ratios avoid numerically degenerate endpoints.
StateVariableFilter
One-channel f64 trapezoidal state-variable filter. Processing and reset allocate nothing. Coefficient replacement preserves integrator histories; callers supply any desired control smoothing. No nonlinear saturation, self-oscillation, denormal policy, arbitrary modulation stability, nonfinite audio sanitization or callback deadline guarantee is imposed.
StateVariableOutputs
Simultaneous outputs from the same state update. Band-pass is the raw integrator output: its gain at cutoff equals Q, rather than unity.
StereoChorus
Prepared two-channel f64 chorus with independent feedback histories and a shared sine LFO plus right phase offset. Construction owns two delay buffers of ceil(rate*0.2)+1 samples each, at most 76802 f64 values total. Processing, live control replacement and reset do not allocate/release heap storage. Controls change immediately without smoothing/crossfades. Nonfinite audio may poison histories until reset; consumers own headroom, denormals and deadlines. No automatic latency/tail reporting, stereo crossfeed or true-peak policy.
StereoFir
A prepared stereo direct-form FIR with a fixed tap count.
StereoOversampler
Prepared stereo 1×/2×/4×/8× oversampling over whole blocks.
StereoPanner
Prepared mono-to-stereo or stereo balance, without crossfeed. Controls contain two immutable actual gains; one frame advances their ramps once. Both precisions interpolate gain endpoints in f64; coefficient/sample multiplication uses the named native precision. No allocation/lock/I/O.
StereoPanner32
Prepared mono-to-stereo or stereo balance, without crossfeed. Controls contain two immutable actual gains; one frame advances their ramps once. Both precisions interpolate gain endpoints in f64; coefficient/sample multiplication uses the named native precision. No allocation/lock/I/O.
StereoReverbConfig
Prepared synthetic stereo network configuration. The original mono network receives (left + right)/2 in both branches; the right branch adds a fixed sample-rounded spread to each delay. Dry audio preserves its original channel.
StereoSchroederReverb
Two independently damped prepared f64 Schroeder networks with common mono excitation and bounded stereo spread. Owns twelve delay allocations totaling at most 133094 f64 samples. Processing/reset/mix changes allocate nothing. No physical room, guaranteed decorrelation, freeze/modulation, input sanitation, smoothing, denormal/headroom or native callback deadline policy is inferred. Nonfinite/extreme finite audio may poison/overflow histories until reset.
StreamInterpolator
One-channel f64 reconstruction with five stack-backed history samples.
TruePeakBank64
Prepared 1..64-channel f64 measurement bank; f32 observation widens exactly.
TruePeakDesign
Own immutable coefficients prepared on CONTROL. Clone allocates on CONTROL.
TruePeakMeter64
Single-channel convenience owner. All counters and finalization match the bank.
TruePeakReading64
Wide measurement of one channel. Audio is never edited by observation.
Waveshaper
A caller-owned transfer function, stored inline without boxing or conversion.
WaveshaperLengthError
Input and output buffers must have exactly equal lengths.
WavetableOscillator
Prepared one-channel f64 periodic wavetable oscillator. Owns 2..=65536 finite table samples at uniformly spaced phases i/N, without duplicating the endpoint. Linear interpolation wraps from the final sample to sample zero. Table content owns waveform/DC/level policy; interpolation is not bandlimited or alias-free. Frequency changes preserve phase, with no smoothing. No callback deadline, denormal, headroom or nonfinite output policy is inferred. Large finite table amplitudes may overflow interpolation; prepare/clone/drop are control work.
WindowPlan
Owned f64 window coefficients for 1..=1048576 samples. Construction evaluates cosines/allocates on a control thread; application allocates nothing. N=1 is unity for every family/convention. Tiny negative rounded taps are retained. Coherent gain and energy are computed from actual coefficients; zero-sum windows return no equivalent noise bandwidth. No automatic gain correction, overlap/add policy, nonfinite sanitization or native deadline guarantee.

Enums§

BallisticsMode
Peak smooths rectified amplitude; RMS smooths energy and returns amplitude. Both are exponential attack/release followers, not finite-window statistics.
ButterworthKind
Passband used by an even-order Butterworth cascade.
ButterworthResponse
Cutoff frequencies in Hz. Band order is the resulting digital order.
ChebyshevKind
Prototype family with finite positive ripple/attenuation. Type I supports ripple<=120dB; Type II attenuation<=300dB. Unrepresentable extremes reject.
ChebyshevResponse
Hz edge(s), strictly inside Nyquist. Type I edges bound its ripple passband; Type II edges bound its ripple stopband. Neither is a -3dB cutoff. Band order means the resulting digital order, twice the prototype degree.
ChebyshevType
Family selection for automatic pass/stop specification methods.
ChorusError
CombError
Invalid comb preparation or coefficient replacement.
CombKind
Selects the signal retained in a comb’s delay history.
ConvolutionPartitioning
Immutable partition schedule. Sizes are powers of two; no hidden latency repair.
ConvolutionPreparationError
CONTROL preparation refusal. Borrowed responses remain untouched.
ConvolutionProcessError
Whole-prefix rejection before any sample/history is consumed or edited.
DelayInterpolation
Immutable reconstruction profile; all policies include a zero-delay bypass.
DryWetError
EllipticResponse
Hz ripple pass edges strictly inside Nyquist. Band order is the resulting digital order, twice the prototype degree; edges are not -3dB cutoffs.
EnvelopePhase
EquirippleError
Preparation returns no partial design on numerical failure or stalled exchange.
EquirippleFirResponse
Flat amplitude bands and explicit unconstrained Hz transitions.
FftError
Preparation/transform failures reject before modifying the input buffer.
FftPreparationError
Fallible plan preparation failures; distinct from unchanged transform errors.
FilterKind
Second-order filter designs; bandpass has unity gain at its center.
FirDesignError
Preparation failures; no partially prepared response is returned.
FirResponse
Ideal window-method cutoff/edge frequencies in Hz (not IIR -3dB points).
FirWindow
Symmetric window selection without changing existing WindowKind.
FirstOrderTptResponse
FractionalDelayError
Failed capacity/allocation, delay edit or whole-block length preflight.
ImpulseResponseError
Whole-call refusal. No partial response is returned; borrowed input is unchanged.
InterpolationError
Preparation or additive-gain validation failure; no stream/output edits.
InterpolationKind
Immutable reconstruction kernel and explicitly different input-sample delay.
LadderError
LadderMode
Six modal combinations of one shared four-stage history. Lower-order modes retain four-stage feedback poles. Bandpass12/24 name total modal order, not per-side slopes or normalized peaks.
LoudnessChannelRole
Explicit roles, without inferred channel ordering or advanced spatial metadata.
LoudnessError
Whole-call refusal, preparation failure or invalid programme result.
LoudnessTailPolicy
Optional artificial analysis after stopped ownership, never original source. The zero tail is this crate’s own padding policy, not a standards requirement; prefer None when only the original duration is analysed.
OversamplerError
Invalid StereoOversampler preparation or block.
OversamplingFactor
Supported powers of two; higher factors cascade the fixed 2x filter profile.
PanningError
Configuration/preflight failure. Blocks reject before any gain progress or output change. Nonfinite audio itself is multiplied without sanitization.
PanningLaw
Curve before normalization. Exponents describe the mathematical law rather than a rounded nominal decibel label. All curves have unity endpoints.
PanningNormalization
Explicit level policy. UnityCenter boosts endpoint levels for every law except Balanced; it is not arbitrary-correlation loudness compensation.
PhaserError
RealFftError
Real-transform validation errors occur before caller storage is modified.
ResponseChannelMap
Explicit output-channel mapping from source channels.
ResponseDelay
Treatment of the sinc converter’s (taps - 1) / 2 source-sample delay.
ResponseNormalization
Explicit linked normalization; one gain is applied to every channel.
ResponseRateConversion
Explicit sample-rate conversion policy.
ResponseRateGain
What a rate change preserves. Resampling an impulse response changes the number of samples that represent the same continuous response.
ShelfKind
Shelf endpoint selected by BiquadCoefficients::design_shelf.
SmoothingError
Invalid smoothing input. Failed updates preserve the previous state.
TrimThreshold
One explicit trim threshold. A frame is kept when any channel’s absolute sample is strictly greater than the resolved threshold.
TruePeakError
Invalid profile, whole-call refusal or failed control allocation.
TruePeakFactor
Explicit sampling grid; more phases do not certify a continuous maximum.
Waveform
WindowConvention
Symmetric uses N-1 for filter design; periodic uses N for analysis.
WindowError
WindowKind
Prepared cosine-window families. No post-sampling peak normalization: an even symmetric window may have maximum below one.

Constants§

IMPULSE_RESPONSE_MAX_CHANNELS
Maximum source and prepared channels.
IMPULSE_RESPONSE_MAX_SOURCE_FRAMES
Maximum source frames per channel (sixteen times the engine tap limit).
IMPULSE_RESPONSE_MAX_TAPS
Maximum prepared taps per channel; equals the convolution engine limit.
IMPULSE_RESPONSE_MAX_WORKING_BYTES
Upper bound for ImpulseResponseRequest::maximum_working_bytes.
MAXIMUM_OVERSAMPLER_FRAMES
Maximum prepared host-rate block length of StereoOversampler.
MAXIMUM_STEREO_FIR_FRAMES
Maximum prepared block length of StereoFir.
MAXIMUM_STEREO_FIR_TAPS
Maximum taps accepted by StereoFir. Direct convolution costs O(taps) per sample; use crate::PartitionedConvolver for longer responses.

Traits§

FirSample
Sample types accepted by StereoFir: f32 and f64.

Functions§

prepare_impulse_response
Prepare a response from planar f64 source channels at source_rate for the request’s target engine rate. Every policy, bound and the declared byte budget is checked (see ImpulseResponseRequest::plan) and the whole source is checked for equal lengths and finiteness before any allocation. Stages run in the fixed order map, convert, trim, normalize; a refusal at any stage returns no partial result.
smoothing_samples
Convert milliseconds to the nearest sample, with ties rounded upward. Zero duration is immediate. Reject overflow instead of silently saturating.