AUDIO
Source snapshot · 11 November 2026

MIDI sine CLAP reference

State and synchronization

Level is the sole persisted control. The deterministic record is exactly 16 bytes: RVETSIN1 magic/version, little-endian f32 level, four zero reserved bytes. Nonfinite/out-of-range, malformed, truncated and trailing records reject before publication. Save snapshots one atomic word. Successful load publishes level plus a 32-bit restore generation, rescans host parameter values and requests processing. Audio applies a new generation without advancing time and clears notes/controllers/history before processing the next callback. Notes, envelopes and negotiated MIDI performance settings are transient, rather than persisted product controls. Within a running instance the portable reset retains negotiated zone/ranges as described in the MIDI guide.

Audio reflection uses one compare/exchange against its original snapshot so an intervening restore wins. The 32-bit generation wraps after 2^32 restores; callers must not leave an audio owner unsynchronized across that many restores. Tests cover stale reflection, invalid-load preservation and active recall. Processing faults clear host outputs and publish a numeric diagnostic rather than returning an error that would make Clack log on the audio thread. State errors occur on the host's main thread and may be logged by Clack.

See decision 0040 and work status for current evidence and remaining export work.