AUDIO
Source snapshot · 12 October 2026

Prepared signal processing

ADSR envelopes

AdsrConfig validates finite positive sample rate, nonnegative durations in seconds, sustain amplitude 0..=1 and rounded sample counts up to u32::MAX. Adsr uses linear attack/decay/release from its current level, with exact final sample targets. Retrigger preserves the current level. Zero-duration stages transition immediately; note-off begins release from the current level. A final attack sample retains its peak even when decay duration is zero; the next sample is sustain. Reset returns to idle/zero. Configuration replacement requires a new instance; consumer voices own note timing and sustain-pedal policy. Tests check ramps, interruptions, retrigger, zero durations, partitioning and count bounds.

A shared allocation-counter fixture runs 1,000 prepared FFT/filter/convolution/ 8x-oversampling/envelope workloads, including resets, with zero counted Rust allocation or deallocation. Native host behavior and callback deadlines are outside that evidence. Additional dynamics/synthesis profiles remain pending. See decision 0019.