v1.6.0 — The Host Contract
The Host Contract — the plugin layer now covers everything a host can offer an effect or an instrument. Each capability is one declarative member on your plugin struct, and each one is proven functionally in CI: measured, not just compiled.
Instruments & MIDI
handleMidiEvent(MidiEvent)adds a note input to every format: VST3 event bus plusIMidiMapping(pitch bend, mod wheel, sustain, channel pressure), CLAP note ports speaking both the CLAP and raw-MIDI dialects, AU MusicDevice selectors behind a lock-free queue.Category::Instrumentbuilds a true generator: no audio inputs in any format, anaumuAudio Unit, cleared output buffers that voices add into.- New reference instrument
examples/plugin_synth/: 8 voices ofOscillator+ADSREnvelope, voice stealing, pitch bend, factory presets, sample-accurate note starts —auval-validated, and CI measures a 440 Hz note and its release decay from the audio output.
Host transport
setTransport(TransportInfo)delivers tempo, musical position, bar start, time signature, loop points and play/record state once per block — from the VST3 ProcessContext (requirements declared for you), the CLAP transport event and the AU host callbacks.samplesPerBeat()is the one-liner for tempo-synced delays, LFOs and gates.
Buses
- Mono everywhere: every plugin negotiates 1-in/1-out and 2-in/2-out by default (
ChannelSupport::StereoOnlyrestricts it for inherently stereo DSP). The sidechain always mirrors the main width.
Sample-accurate automation
- On by default: parameter, bypass and note events ride one time-ordered stream and processing splits at 32-frame quantum boundaries, so fast curves land where the host drew them. Declarative opt-out (
sampleAccurateAutomation = false) for plugins with a high fixed cost per call.
The professional details
- Runtime latency changes notify the host natively (VST3
restartComponent,clap_host_latency, the AU property listeners) — switchable lookahead now re-compensates projects correctly. setOfflineRendering(bool)exposes the render mode (VST3kOffline, the CLAP render extension, AUOfflineRender) for higher-quality bounces.factoryPresetspublishes to every host's preset browser: a VST3 program list with a program-change parameter, CLAP preset-load + preset-discovery (the plugin binary is the preset container), AU factory presets with a fullPresentPresetround-trip.- Host bypass and the active program persist in the shared state container (two real-world bugs caught by pluginval and clap-validator in CI — the bypass one latent since v1.3.0).
process()/render()run under DSPark's denormal guard in all three backends.
Proven by instrumentation
- New
tools/plugin_probe.cppencodes what the wrapper delivers into its audio output, so the smoke hosts measure every capability end to end on all five CI targets: transport DC, the offline sign flip, an automation step landing on its exact sample, note pitch by zero crossings, pitch bend through both routes, the latency-changed notification, mono processing and the preset paths. - pluginval (strictness 8) and clap-validator now also gate the synth and the probe; macOS CI runs four
auvalvalidations including the newaumu.
Docs
docs/plugins.md: full contract table for the new capabilities, new "Instruments & MIDI" and "Host transport" sections, a from-a-blank-folder project guide, and the examples indexed in learning order (also in the newexamples/README.md).