Parameters, processing and state¶
VST3 IDs 1/2 are gain and bypass. Gain uses physical amplitude 0..4 and normalized
0..1; unity is 0.25 normalized. Bypass is stepped and advertises the host bypass
flag. Separate processor/controller classes follow the SDK architecture. The
host may provide a generic parameter editor; an optional macOS Cocoa IPlugView
is implemented below.
Prepare accepts matched mono/stereo, native f32/f64 and 1..65,536 maximum frames. At most 1,024 total queued points are inspected, including unknown IDs. All queue counts, payloads, normalized values, offsets and audio pointers are validated before DSP or pending restore mutation. Unknown parameter IDs are ignored only after validation. Stable bounded insertion merges queues in frame order, retaining queue traversal order at equal offsets. Cost is O(events squared); this is not a worst-case callback deadline claim. No sort allocation is performed.
Raw global parameter queues now use the reusable native SDK walker, which copies each point once and validates all unknown-ID payloads before any prepared visitor effect. Both sample precisions use control-created immutable native range/role caches for mapping, with no schema-provider calls on audio. Finite bit checks retain validation under fast-math; normal/fast-math SDK-linked contracts exercise malformed prefixes, unknown values, capacities, timing and cached C++ heap counts. This delivers explicit parameter points; continuous host curve interpolation and other SDK event kinds remain separate work. See prepared native parameter input.
Input scratch copying completes before host output writes, supporting separate, in-place and mixed input/output aliases. Output channel ranges must not overlap. Zero-frame calls permit parameter flush without audio buses. Gain smoothing and sample-timed bypass follow the portable processor. Reset preserves requested state. Invalid blocks silence active host outputs, retaining backing tails; unwinding DSP panic disables processing until control-thread setup is repeated. Nonfinite audio is not sanitized. Instruments, auxiliary buses, note/event ports and emitted events remain pending. The explicit block-start transport profile below forwards representable fields; further context metadata remains unmapped.
State is the shared 32-byte complete gain/bypass record; 20-byte legacy gain
records migrate with bypass off. IBStream I/O is bounded and handles short
reads/writes. Decode completes before publication. Processor state uses one
lock-free 64-bit atomic word and a 31-bit restore generation. Audio applies a
new restore only after host block validation; conditional reflection preserves
concurrent restores. Fewer than 2^31 restores may occur across pending callbacks.
The controller receives the complete component state separately, updating both
normalized controls. Controller state also stores complete current controls:
REAPER may suspend processing when host bypass is enabled, leaving subsequent
controller edits undelivered to processor queues. Restoring controller state
publishes the validated complete record through the SDK connection point;
restores before connection remain pending until connection. These UI/control
messages allocate outside processing; ordinary sample automation retains its
parameter-queue timing. No stream I/O or message allocation occurs in process.
The AU SDK identifies itself with IVst3ToAUWrapper and owns a separate normalized
parameter snapshot. Its controller can lag AU calls until UI timers run; the
embedded adapter retains component-based preset recall there instead of letting
a stale controller record override DSP state. AU recall still preserves current
host bypass, as its actual-bundle regression verifies.