Identified native-precision sine reference¶
PerformanceSine<N> is an independent mono/stereo no-input reference implementing
both Processor<f32> and Processor<f64>. Select precision through the trait,
for example <PerformanceSine<16> as Processor<f64>>::prepare(&mut synth, config).
It retains normalized/identified receiver policy without seven-bit quantization.
Level uses the existing INSTRUMENT_LEVEL_ID schema, defaults to0.2 and scales
mix by level/N. Explicit set_level accepts finite 0..1 while sample-timed edits
clamp. ADSR is 5 ms attack,10 ms decay,0.8 sustain and50 ms release.
Volume/expression multiply exact stored velocity. Tuning adds semitones; vibrato is a 6 Hz sine of 0..1 semitone depth with its rate capped at 49% of sample rate. The oscillator frequency also caps at 49% of sample rate. Live expressions retain phase, while new/retriggered/stolen notes reset oscillator/envelope. Stereo balance uses 2(1-pan),2pan, giving duplicate mono at center and twice one channel at an endpoint; mono ignores pan. Pressure/brightness remain exact readable snapshots without shaping this reference's timbre. Zero volume mutes while history advances.
Preparation accepts 65536 frames/1024 input and output events, mono/stereo instrument layouts and no auxiliary buses. It allocates private f64 stereo/sample and bounded completion scratch. Processing first validates the generic complete block, then renders into scratch with a fixed copied DSP/voice state. Only whole success commits samples, completion events and live state. Late identity conflict or completion overflow silences active output while preserving live level, voices, phase and envelopes. Actual in-block envelope completion permits a later new address for that ID. Process/reset perform no heap actions, locks or I/O.
Positive output capacity enables original-target NoteEnd on steal/choke/envelope
completion, in input/sample/slot order. Capacity0 suppresses notifications while
internal lifetime still ends. Completion offsets order delivery and do not claim
an exact termination timestamp. Zero-frame callbacks apply events without advancing
phase/envelopes. Reset/reprepare retain level while clearing history; deactivate
becomes inactive. Other parameters, MIDI/UMP, incoming completion and transport
are ignored after validation. No pedals, MIDI conversion, programs/codec/editor,
native facade/export, physical device/DAW or deadline follows. Both precision tests
cover analytic audio, partitioning, rejection/history, lifecycle and maximum voice
completion workloads. See
decision0164.