S5 Tier-1: zoned keymap editor + performance-map playback/persistence

Zone editor in the IPlugView LICE surface, zoned resolution built off-thread into the
LoadedInstrument keymap with Tier-0 fallback, performance map in VST3 component state
with v1 back-compat. Pure resolve/build/serialize + geometry with CTest coverage.
This commit is contained in:
2026-07-26 17:28:15 -04:00
parent 6ae843345c
commit 2356958930
10 changed files with 1063 additions and 63 deletions
+17 -4
View File
@@ -54,7 +54,8 @@ private:
#ifdef _WIN32
// Draw the current surface into the child window's DC via a LICE bitmap.
void paint(HDC hdc);
// Route a client-space click: select the sample row under (x, y), if any.
// Route a client-space click: bank-sample pick (left list), zone edit (right panel),
// or the "Add Zone" button.
void onClick(int x, int y);
static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -62,16 +63,28 @@ private:
HWND childHwnd_ = nullptr;
#endif
// Re-read the bank's sample list from the live bridge into `samples_`. Main/UI
// thread only (reads ext-state); called on attach and after a selection reload.
// Re-read the bank's sample list from the live bridge into `samples_`, and snapshot the
// instrument's performance map. Main/UI thread only (reads ext-state); called on attach
// and after any edit that reloads the instrument.
void refreshSampleList();
// Push the edited performance map to the processor and rebuild the instrument OFF the
// audio thread. UI thread only. Centralizes the "commit an edit" path so every zone
// mutation reloads identically.
void commitMapAndReload();
ReaSamplerProcessor* processor_ = nullptr;
// The bank's samples, snapshotted for the current paint. Refreshed off the audio
// thread; the paint just draws it.
std::vector<SampleChoice> samples_;
// The currently-selected sample id, mirrored for the paint's highlight.
// The currently-selected sample id (Tier-0 fallback + the "sample to add" for a new
// zone), mirrored for the paint's highlight.
std::string selectedId_;
// The instrument's performance map, snapshotted for edit + paint. Edits mutate this
// copy then commit it to the processor via commitMapAndReload.
PerformanceMap map_;
// The zone row currently highlighted (for the paint); -1 = none.
int selectedZone_ = -1;
};
} // namespace reasampler::vst