Normalized and identified performance voices¶
PerformanceVoices<N> is an independent 1..128-slot receiver for one already
routed endpoint. It consumes normalized On/Off, identified On/Off, scoped Off,
choke and seven standard expressions. Optional note IDs retain all u32 bits;
f32 velocities stay unquantized, and zero On remains held. MIDI/UMP, parameters
and incoming completion notifications require separate routes and reject here.
Every present channel/key/ID target field must match. Unidentified duplicates
stack; Off releases all held matches. Repeated Off neither restarts release nor
replaces its velocity. The DSP calls finish when ownership ends, receiving the
original concrete target once. Choke removes every match immediately and reports
those original targets; stealing reports the replaced target. These are completion
notifications, distinct from release. Reset discards ownership explicitly under
the consumer's lifecycle protocol.
A duplicate concrete ID retriggers the same address in its existing slot, resetting expressions and reporting no old completion. Another address rejects atomically until the old ID completes/resets. Allocation prefers idle, oldest released, then oldest held. Bounded rank ages preserve chronology without sequence rollover.
All seven f64 expression values retain their bits, including signed zero and subnormals. Defaults are volume/expression/brightness 1, pan 0.5 and tuning/vibrato/ pressure 0. Expressions replace values on held and released matches; they do not stage values for future notes. Zero volume mutes without completing. Application, smoothing, oscillator/envelopes and output delivery remain consumer decisions.
Call preflight(events, frames) before changing consumer DSP/state. It simulates
the whole ordered stream on fixed copied storage, rejects late malformed/unsupported/
conflicting events, and counts immediate input-driven completions. It permits
1024 events/65536 frames, with offset0 for zero-frame blocks and preserved ties.
The consumer maintains exclusive ownership, replays events at sample boundaries,
budgets later DSP completions separately, and stages publication as needed. No
output space is reserved or event published by this check. Allocation-instrumented
fixtures cover repeated maximum-bank ownership and full-list preflight; no DAW,
device or deadline follows. See
decision0163.