Service both VST3 parameter channels, and promote pitch key-track and Trigger length so all 44 ids issue

The SDK's own single-component sample drains inputParameterChanges in
process() and implements setParamNormalized; automation was reading the
GUI channel alone. The audio thread now patches a block it solely owns.
This commit is contained in:
2026-08-02 16:22:17 -04:00
parent bfaa0f2614
commit de5654fb6f
44 changed files with 1205 additions and 302 deletions
+29
View File
@@ -0,0 +1,29 @@
// param_live.h — the AUDIO-THREAD half of a host parameter write: one exposed control patched
// into the live block, in place, with no allocation and no lock. It exists because the model
// layer cannot run on the audio thread (PlaySeconds carries velocity curves and spline contours,
// so resolvePlay allocates), while `IParameterChanges` is delivered there.
#pragma once
#include "core/instrument/engine/live_params.h"
#include "core/instrument/ui/deck_groups.h" // DeckParam
namespace reasampler::instrument::param {
using ui::DeckParam;
// Writes `normalized` for `deck` into `block`. RT-SAFE: no allocation, no lock, no transcendental
// beyond the taper's own. Returns false for a control this block does not carry — master gain,
// which reaches the audio as the processor's own atomic, and anything unexposed.
//
// The value laws are NOT restated here: `ui::storedFromNorm` is the same norm -> stored map
// `setDeckParam` writes with, and `map::secondsToFrames` the same fold `resolvePlay` uses. What
// IS new is the routing — which member of the block a control names — and that is pinned by an
// exhaustive equivalence test against the model path over every exposed control, rather than by
// two tables that happen to agree.
//
// `sampleRate` is the rate the loaded capture was BUILT at (the processor's builtSampleRate_),
// so a patched stage time lands on exactly the frames the build would have resolved.
bool applyLiveParam(engine::LiveValues& block, DeckParam deck, double normalized, int sampleRate);
} // namespace reasampler::instrument::param