S12: store wall-clock ADSR/pitch-env as seconds, resolve to frames at live rate

Kill kTier0Nominal*, adsrNeedsRateResolve, tier0Adsr, gateAdsr. Zones payload v5 carries
seconds; v3 legacy reads convert at the frozen authoring rate; v4 (branch-only) dropped.
Editor sliders now seconds. Engine takes frames resolved at keymap build.
This commit is contained in:
2026-07-27 02:51:46 -04:00
parent 1d338318e7
commit a54af277e4
10 changed files with 539 additions and 433 deletions
+9 -7
View File
@@ -178,22 +178,24 @@ private:
// --- S12/S15/S16 parameter surface (Zones panel, keyed to selectedZone_) ------
//
// The control panel edits the SELECTED zone's ZonePlayParams (S15 play mode + AHDSR; S16
// pitch engine + AD pitch envelope). Instrument-owned (D-B), never a bank fact.
// The control panel edits the SELECTED zone's ZonePlaySeconds (S15 play mode + AHDSR; S16
// pitch engine + AD pitch envelope). Wall-clock times are SECONDS (rate-free); the keymap
// build resolves them to frames at the live rate. Instrument-owned (D-B), never a bank fact.
// The control descriptors the panel shows for `play`'s CURRENT play mode: the two toggles +
// the mode-relevant sliders (AHDSR for Gate, %-length/fades for Trigger) + the pitch-envelope
// controls. The pure param_slider lays these out; this only picks the set. Static (a free
// choice of set from the mode) — kept a member for the ParamControl enum access.
std::vector<ControlDesc> controlDescs(const ZonePlayParams& play) const;
std::vector<ControlDesc> controlDescs(const ZonePlaySeconds& play) const;
// The normalized [0,1] display value for control `id` given `play` (the shell's domain
// mapping: frames->0..1 over a fixed max, sustain 0..1 as-is, semitone depth centered at 0.5).
double controlValue(int id, const ZonePlayParams& play) const;
// mapping: seconds->0..1 over a fixed seconds ceiling, sustain 0..1 as-is, %-length/fade
// frames->0..1, semitone depth centered at 0.5).
double controlValue(int id, const ZonePlaySeconds& play) const;
// Apply a committed control interaction to `play`: a slider's normalized `value` (mapped back
// into the control's engine domain) or a toggle's `segment` (0/1). Mutates `play` in place.
void applyControl(int id, ZonePlayParams& play, double value, int segment) const;
// into the control's stored domain) or a toggle's `segment` (0/1). Mutates `play` in place.
void applyControl(int id, ZonePlaySeconds& play, double value, int segment) const;
ReaSamplerProcessor* processor_ = nullptr;