instrument: deliver continuous playback params live to sounding voices via a seqlock block, holding normalized stage position across time edits

This commit is contained in:
2026-07-30 21:03:05 -04:00
parent 7bd911d58b
commit 1dade0bfcf
25 changed files with 1352 additions and 66 deletions
+17
View File
@@ -136,6 +136,23 @@ void ReaSamplerEditor::commitAndReload() {
#endif
}
void ReaSamplerEditor::commitLive() {
// UI thread only. See the declaration for why this still writes the parameter set.
if (!processor_) return;
processor_->setInstrumentParams(params_);
processor_->publishLiveParams();
}
bool ReaSamplerEditor::dragCommitsLive(DragKind kind, int paramId) const {
if (kind == DragKind::kDeckKnob) {
// Negative ids are the processor-side sentinels (preview velocity), not parameter-set
// controls, so they never reach the enum.
return paramId >= 0 &&
instrument::ui::isLiveDeckParam(static_cast<ParamControl>(paramId));
}
return kind == DragKind::kEnvNode && params_.play.playMode == PlayMode::Gate;
}
void ReaSamplerEditor::loadSelection(const std::string& id) {
// A load REPLACES the loaded sound. The shaping parameters (play mode, envelopes, pitch
// engine, key-track, velocity curve) are NOT reset — the one set governs whatever is