AUDIO
Source snapshot · 11 November 2026

RAVET architecture

CLAP translation

Activation preallocates scratch audio and event storage. Callbacks copy host inputs into scratch, run the gain processor in place, and copy results to host outputs, allowing separate, in-place, and mixed host channel pairs. This costs two sample copies per channel.

The bridge caps preparation at 65,536 frames and translation at 1,024 input events, including ignored event kinds. Only global core parameter-value events are translated. Validated block-start transport position/tempo/playback context is forwarded, with seek detection. Notes, modulation, output events, extra buses and f64 remain outside that gain bridge. Separate MainBusBridge/MultiBusBridge profiles provide explicit native precision, note/MIDI/scoped parameter input, generated events and auxiliary buses with their own opt-ins and bounds. See extended processing.

The main thread reads requested gain, boolean bypass and a 31-bit restore generation from one atomic 64-bit word. Complete state load and inactive host flush publish a new generation; audio synchronizes at callback boundaries and reflects values using bounded conditional publication. State load explicitly migrates legacy gain-only records. See state protocol. Foundation's word mailbox remains available for arbitrary complete multi-parameter publications with caller-owned encodings and contention policy.

The gain export has a separate editor control bridge: one main-thread producer queues up to 32 complete edits or live gesture commands, and the serialized CLAP consumer emits host begin/value/end while retaining output backpressure progress. Restores invalidate older edits; accepted editor changes precede host automation and are reflected independently of malformed host streams. A separate coherent meter mailbox receives successful audio blocks. Fault diagnostics remain atomic, without callback logging. A default optional macOS GUI uses this bridge through main-thread JSON; ravet-editor-smoke owns a native parent/main loop to exercise the built bundle.