AUDIO
Source snapshot · 11 November 2026

VST3 exports

Generic product adapter (0.1.0 prototype)

crates/ravet-plugin/adapters/vst3 implements a C++ component and separate edit controller against RavetPlugin.h. Product IDs, names, category, layouts and parameters come from that table; products need no VST3-specific C++. The adapter uses an external Steinberg SDK; none is committed or downloaded by the build. Fetch it with

python3 scripts/fetch-vst3-sdk.py "$HOME/Library/Application Support/ravet/sdks/vst3sdk"

which downloads Steinberg's official vst-sdk_3.8.1_build-84_2026-08-11.zip, checks a SHA-256 pin before opening it, and extracts only what RAVET builds from (the CMake project, base, cmake, pluginterfaces, public.sdk and the MIT LICENSE.txt; no VSTGUI, documentation or binaries). Point [sdks] vst3 in a ravet-sdks.toml at the result. The unified bundle-plugin.py then needs no flag; bundle-vst3.py still takes --sdk.

python3 scripts/bundle-vst3.py --plugin delay --sdk /path/to/vst3sdk
python3 scripts/bundle-vst3.py --plugin gain --sdk /path/to/vst3sdk
# Independent C++ table fixture, usable before the Rust table is available:
python3 scripts/bundle-vst3.py --mock --sdk /path/to/vst3sdk
# A separate consumer workspace/package:
python3 scripts/bundle-vst3.py --plugin myeffect --package myeffect-plugin --manifest-path /path/to/consumer/Cargo.toml --sdk /path/to/vst3sdk

The product must enable ravet-plugin's native feature and export ravet_plugin_v1() from one Cargo cdylib target. The Gain and Delay examples already enable it. The script builds only that package, copies its dynamic library beside the adapter module, adds notices, ad hoc signs nested images and the bundle on macOS, and runs the SDK validator. The independent mock also runs CTest. Artifacts stay under target/vst3/generic/<product>/{debug,release} (or the consumer's Cargo target directory). Nothing is installed or published. Product Rust dependencies and the external SDK remain responsible for their own runtime requirements. A missing entry point makes the factory fail to load; a CLAP-only library cannot stand in for the native table.

--mock builds and validates two mock modules: ravet_mock_vst3 and ravet_mock_vst3_auxiliary (CMake option RAVET_VST3_MOCK_AUXILIARY), which adds a stereo "Sidechain" and a stereo "Aux Out" kAux bus. The SDK validator's bus scan prints "Default Active" for every bus; that is an SDK display bug, and the contracts test checks the real flags.

The component accepts only declared layouts. Mono/stereo use standard speaker arrangements; counts above two use the low N speaker bits because the table has no named speaker map. One main bus per nonempty direction is exposed, followed by the product's auxiliary buses as kAux buses (inactive until the host activates them, one fixed arrangement each; setBusArrangements accepts a complete bus list or the main bus only, which leaves auxiliary buses at their arrangement; inactive or missing buses get silence or discarded scratch, prepared outside the audio thread). f32 only, 1..65,536 frames and at most 1,024 combined parameter/note input records and 1,024 output records are supported. Expanded note tuning counts toward capacity. Queues merge stably by sample offset, with parameters before notes at ties. Unknown parameter IDs are ignored after validating their points. Malformed or oversized inputs reject before DSP and silence supported output prefixes. The table supplies denormal handling; the adapter adds no denormal guard.

Parameter IDs and physical mappings remain the product's IDs and callbacks. VST3 IDs must be at most 0x7fffffff; larger explicit product IDs reject rather than changing session identity. Bypass, step counts, hidden and read-only flags are registered from metadata. Controller changes call set_value immediately and use main-thread SDK messages to update the component cache, including while processing is suspended. Automation points become physical native parameter events at their original offsets. Component state is the table's envelope, unchanged, with a 16 MiB adapter stream limit. Controller setComponentState loads the same envelope. Controller state and pre-connection edits synchronize through messages; no instance pointer is sent between component and controller.

One 16-channel event bus per declared note direction carries native notes and short MIDI output. IMidiMapping maps all 128 CCs, channel aftertouch and pitch bend on every input channel to 2,080 hidden parameters. Their deterministic free ID range avoids product IDs. Values quantize to 7-bit CC/pressure or 14-bit pitch bend and become native MIDI events at their sample offsets. Note IDs, velocities and supported tuning/pressure use the existing native event helpers. SysEx and UMP have no mapping. Unsupported output records reject before host event delivery. Host refusal keeps its accepted output prefix and rendered DSP; the suffix is discarded without replay.

Setup negotiates rates/resource limits by preparing then deactivating the product on the stopped main thread; activation prepares the accepted setup again. A rejected setup retains the last accepted VST3 setup. Timing is read after prepare and after processing on its owning thread. Latency/tail queries read cached atomics. A latency change is delivered on the main loop as restartComponent(kLatencyChanged). Finite tails saturate below VST3's infinite sentinel. The editor opens the product through Cocoa, HWND or X11 IPlugView, constrains resizable views to one through four times the product's default size (at most 16,384 pixels per dimension), resizes and idles it at about 30 Hz, and reports queued begin/value/end gestures through host edit callbacks. Views keep weak lifetime tokens and reject calls after controller termination. macOS/Windows use the SDK main-loop timer; Linux uses the host's IRunLoop from the factory/context or view frame. Linux editor idling and latency notifications require that host interface. There is no worker-thread fallback.

Local macOS arm64 evidence: the C++ mock, real Delay and real Gain bundles each pass the SDK validator with 47 passed, 0 failed. The mock focused CTest reports 1 passed, 0 failed. The fixture covers gain, bypass, stepped/hidden/read-only metadata, a MIDI-ID collision, mono/stereo negotiation, timed DSP/automation, note/CC/bend/aftertouch delivery, unchanged state bytes and rejection, zero-frame flush, delayed latency restart, editor resize/gestures and retained-view teardown. Editor tests use the mock callbacks, not a real web view. The real table is merged from plugin/native-table; actual product web editors, DAWs remain separate requirements; Linux x86_64 and Windows x64 validator runs are recorded below. The Rust table accepts HWND views on Windows and X11EmbedWindowID views on Linux (the parent need not be an XEmbed socket); Linux editors are pumped from the host IRunLoop timer through editor_idle. See work status.

Windows and Linux commands

Install Rust, Python 3, CMake 3.25+ and a complete external VST3 SDK. The adapter turns off the SDK's hosting examples, so Linux builds do not need GTK or gtkmm; the SDK's validator is built regardless.

# Linux (GCC, or set CC=clang CXX=clang++ before first configure):
python3 scripts/bundle-vst3.py --plugin delay --sdk /opt/vst3sdk
python3 scripts/bundle-vst3.py --mock --sdk /opt/vst3sdk
# Bundle: target/vst3/generic/delay/release/VST3/Release/ravet_delay_vst3.vst3
# (Contents/x86_64-linux/ holds the adapter and libravet_delay_plugin.so).
# Standalone C++ mock, without Cargo:
cmake -S crates/ravet-plugin/adapters/vst3 -B target/vst3-mock -DCMAKE_BUILD_TYPE=Release -DRAVET_VST3_SDK=/opt/vst3sdk -DRAVET_VST3_MOCK=ON
cmake --build target/vst3-mock --config Release --target ravet_plugin_vst3 ravet_generic_vst3_contracts validator --parallel 2
ctest --test-dir target/vst3-mock -C Release --output-on-failure
target/vst3-mock/bin/Release/validator target/vst3-mock/VST3/Release/ravet_plugin_vst3.vst3

Windows bundles can be cross-compiled from Linux (see Windows cross-builds):

python3 scripts/bundle-vst3.py --plugin delay --sdk /opt/vst3sdk --target windows
# Bundle: target/vst3/generic/delay/windows-release/VST3/Release/ravet_delay_vst3.vst3
# Windows tools: target/vst3/generic/delay/windows-release/bin/{validator,moduleinfotool}.exe

The cross-build links the C runtime statically (SMTG_USE_STATIC_CRT=ON) and does not run the validator; copy the bundle and validator.exe to Windows and run validator.exe ravet_delay_vst3.vst3 there. --mock --target windows runs the contract test under Wine when it is installed.

Natively on Windows, run from an x64 Native Tools Command Prompt with MSVC:

py -3 scripts/bundle-vst3.py --plugin delay --sdk C:/SDKs/vst3sdk
py -3 scripts/bundle-vst3.py --mock --sdk C:/SDKs/vst3sdk

Native MSVC builds use the DLL C runtime (/MD), so the bundle and validator need the Visual C++ Redistributable on the machine that loads them; configure with -DSMTG_USE_STATIC_CRT=ON (and build the product with -C target-feature=+crt-static) to avoid that. The native Windows path has not been run; the cross-build has. Evidence (Linux x86_64 and Windows 11 x64: Delay and mock 47 passed, 0 failed) is in work status. Subsequent REAPER 7.82 Delay runs on both platforms and Live 12 on macOS are scoped in the support matrix. The Delay's editor opened, followed host edits and closed/reopened in REAPER 7.82 on both platforms (see work status); other hosts are not established.