docs(phase-s): reconcile PLAN/COMPLETED/CLAUDE for S-VIEW Wave 2

Move S-VIEW-1..9 to COMPLETED (three-view editor + velocity spline curve v7); F3 settled (full-window Browse modal); S-VIEW-10 (curve editor UI) remains the lone open Phase S item. Add trigger_seam + velocity_curve to the module inventory.
This commit is contained in:
2026-07-27 15:07:57 -04:00
parent 21c3656bf7
commit c92d82df3a
3 changed files with 163 additions and 91 deletions
+13 -90
View File
@@ -207,92 +207,16 @@ fenced root + preview-trigger + control strip) with no scroll; Browse opens as a
Sample, select+confirm loads a new capture; Zone opens on its own button, key-tracking + the
piano-key pattern work; drop-a-capture-onto-FX instantiates a playing instance.
- [ ] **S-VIEW-1 three-view navigation model.** Retire the flat Browser|Zones toggle; introduce
Sample (home/default), Browse (modal overlay over Sample, select+confirm), Zone (dedicated
surface, own button). Empty state surfaces Browse as the dominant call-to-action. Fresh instance
stays silent (S10 reversal). See CONTEXT.md §S-VIEW navigation contract.
- [ ] **S-VIEW-2 — Sample view (the new main face).** Compose the home face: enlarged **hero
waveform** with the S11 markers (moved from Browse), a **fenced root affordance**, the
**Mono/Stereo toggle** (moved from Browse), and the **"Modes-and-down" control strip** (Mode /
Pitch engine / AHDSR|Trigger / AD pitch env — moved from Zone's param panel, single-capture
one-zone storage per S15-F2). Reference grammar: Simpler / Phase Plant (labelled value-strip
under a hero waveform).
- [ ] **S-VIEW-3 — envelope overlay + DRAGGABLE NODES on the hero waveform (new visual + edit
surface).** Draw the amp envelope (AHDSR for Gate, fade/%-length for Trigger) as a curve over the
Sample waveform at accurate wall-clock time. New pure `envelope_overlay` module (params + frame-
length → polyline; unit-tested); shell traces it in an accent hue. **The breakpoints are draggable
handles** (S-VIEW-F2 SETTLED — in scope, not deferred): X → segment time, Y → level on level-
breakpoint nodes (sustain drags both axes), monotonic-in-time + range-clamped so a drag can never
produce a param the slider couldn't. New pure `envelope_edit` module (node hit-test + pixel-delta→
clamped-param inverse map; mirror of `card_drag`; unit-tested at the clamp/monotonic boundaries).
Sliders stay the precise numeric surface; **both surfaces read/write the same `PerformanceZone`
envelope fields** — one source of truth, kept in sync by re-reading params each paint (no listener
chain). Node-drag commits via the same off-audio-thread path a slider edit uses (no new RT
surface).
> **Wave 1 (S-VIEW cores) ✓:** `envelope_overlay` + `envelope_edit` pure modules landed
> and unit-tested. **Wave 2 shell PENDING:** `reasampler_editor.cpp` must trace the overlay
> and wire draggable node handles; a Trigger frames↔fraction converter is owed at the module
> seam (documented there).
- [ ] **S-VIEW-4 — preview-trigger + velocity knob (new, Sample view).** A button firing the
sampler at the loaded capture's root note through the live voice engine (off the audio-thread
commit path — no MIDI controller needed) + an adjacent velocity knob. **Preview velocity PERSISTS**
(S-VIEW-F1 SETTLED): it lands as a new top-level `previewVelocity` field on `ComponentState` via an
**envelope bump to v6** (`src/vst/sample_map.h`), round-tripped through the processor's existing
`getState`/`setState` over `IBStream`**not** the extension's project-scoped `persist` ext-state
(wrong owner + wrong scope; see CONTEXT.md §S-VIEW). Zones payload untouched (independent version
axes); older blobs lift to a mid default. RT discipline: no `process`-thread work.
> **Wave 1 (S-VIEW cores) ✓:** `previewVelocity` field on `ComponentState`, envelope v5→v6
> bump, processor `getState`/`setState` round-trip, clamped 1..127 — all landed. **Wave 2
> shell PENDING:** the preview button + velocity knob UI in `reasampler_editor.cpp`.
- [ ] **S-VIEW-5 — Browse reduced to *choosing* (modal over Sample).** Keep search + bank tabs +
captures grid + scroll + selection; add **confirm/cancel** (double-click loads). **Remove** the
large waveform preview, Mono/Stereo toggle, root keyboard-strip (all moved to Sample), and the
loop-point labels + track-root message (cut). Render as a full-window modal overlay (fork
S-VIEW-F3).
- [ ] **S-VIEW-6 — key-tracking parameter (Zone + Sample, 0%200%, default 100%).** A per-
`PerformanceZone` scalar on keyboard pitch tracking around the root (100% = 12-tone-ET, 0% = no
tracking, 200% = double). Additive/version-bumped, defaults 100% (bit-identical). **Key-track
math lives in the pure sampler core** (unit-tested note/root/keyTrack → ratio), applied in both
Varispeed and Preserve repitch. Surfaces as a control on the Zone param panel + Sample control
strip.
> **Wave 1 (S-VIEW cores) ✓:** per-`PerformanceZone` `keyTrack` field (zones payload v6,
> default 100% bit-identical), pure ratio math, applied in both Varispeed and Preserve
> engines — landed. **Wave 2 shell PENDING:** the UI control in the Zone param panel +
> Sample control strip.
- [ ] **S-VIEW-7 — real piano-key pattern on the keyboard strip (new visual).** Overlay the actual
alternating white/black (bright/dark per palette) key pattern over the pastel spectral fill so
the strip reads as a keyboard. Pure `keyboard_strip` gains a natural/accidental predicate (12-
tone, unit-tested); shell draws the two-tone overlay. Shared by the Zone strip + Sample root
affordance.
> **Wave 1 (S-VIEW cores) ✓:** pure `isNaturalKey` predicate on `keyboard_strip`, unit-tested
> — landed. **Wave 2 shell PENDING:** `reasampler_editor.cpp` must draw the two-tone overlay
> over the spectral fill.
- [ ] **S-VIEW-8 — Zone view retained + wired.** Keep +Add Zone / Delete, the per-zone keyboard
strip (now with the piano pattern), the Low/High/Root numeric-entry legend, and the per-zone
param panel; add the key-tracking control. Nothing from today's Zones view dropped.
- [ ] **S-VIEW-9 — velocity → amp transfer-curve: pure core + engine application (foundation, r10).**
New pure `velocity_curve` module (bezier `eval(velocity 0127)→amp 01`, monotonic-in-x, clamped
to the 0127×01 box; control-point add/move/delete x-ordered + box-clamped; hit-test + pixel-
delta→clamped-point inverse map; mirror of `envelope_edit`; unit-tested at eval + clamp/order
boundaries). Additive `velocityCurve` field on `PerformanceZone` (instrument-owned, D-B), on the
**zones-payload version axis**, default = **flat y=1** (R10-F1 SETTLED — Option A, Daniel
2026-07-27: "any velocity plays at full level"); older blobs lift to that default. **Back-compat
caveat: this is a deliberate non-back-compat behavior change** — the current engine does linear
`velocity/127`, so existing zones' soft hits will be louder after upgrade. Flagged and accepted.
Apply at **`Voice::start()`** — replace `velocityGain_ = velocity / 127.0` (`sampler_core.cpp:261`)
with `velocityGain_ = curve.eval(velocity)`, off the per-frame path (no new RT work). **BLOCKED BY
Wave 1 T-KEYTRK** (`PerformanceZone` schema + payload bump) — this is a LATER additive payload bump
sequencing AFTER T-KEYTRK merges (the two never collide on one payload version). NOT blocked by
T-STATE (that owns the per-instance `ComponentState` v6 axis for preview velocity). See CONTEXT.md
§S-VIEW velocity-curve sub-section.
- [x] **S-VIEW-1 through S-VIEW-9** — all landed (Wave 1 core + Wave 2 shell). See `COMPLETED.md`
§S-VIEW for the full entry set.
- [ ] **S-VIEW-10 — velocity-curve editor UI (shell, Sample + Zone views, r10).** A compact transfer-
curve editor band on the **Sample view** adjacent to the envelope overlay (X = velocity 0127, Y =
amp 01; bezier traced in an accent hue; draggable node markers per control point; add on empty-
space click, delete on modifier-click/drag-off), drawn through the **L1 kit**; the same editor in
the Zone per-zone param panel (one curve per zone). Shell (`reasampler_editor.cpp`) does the LICE
draw + mouse routing; **all geometry/hit-test/clamp math in the pure `velocity_curve` module**.
**Wave 2 shell-integration item** — gated on S-VIEW-9 (foundation) + composes with S-VIEW-2 (Sample
face) / S-VIEW-3 (envelope overlay).
amp 01; spline curve traced in an accent hue; draggable node markers per control point; add on
empty-space click, delete on modifier-click/drag-off), drawn through the **L1 kit**; the same
editor in the Zone per-zone param panel (one curve per zone). Shell (`reasampler_editor.cpp`) does
the LICE draw + mouse routing; **all geometry/hit-test/clamp math in the pure `velocity_curve`
module**. Foundation (S-VIEW-9) is landed — unblocked on the module; needs the Sample-view
curve-editor UI.
### Phase S editor prerequisites — routed to staff-engineer (bug + default; NOT design forks)
@@ -301,12 +225,11 @@ piano-key pattern work; drop-a-capture-onto-FX instantiates a playing instance.
> **S-VIEW-BUG-1 and S-VIEW-SIZE-1 have both landed (Wave 1) — see `COMPLETED.md`.**
### Phase S editor redesign — forks (Daniel's to call)
*(S-VIEW-F1 and S-VIEW-F2 SETTLED 2026-07-27 — folded into S-VIEW-4 / S-VIEW-3 above. F1: preview
velocity persists via envelope-v6 `ComponentState`. F2: envelope nodes are draggable via the pure
`envelope_edit` module. R10-F1 SETTLED 2026-07-27 — Option A flat y=1, folded into S-VIEW-9 above.
Only F3 remains open.)*
- **S-VIEW-F3 — Browse modal presentation:** full-window overlay (**lean**) vs. a centered sheet
over a dimmed Sample. Presentation detail.
*(All forks settled: S-VIEW-F1 and S-VIEW-F2 SETTLED 2026-07-27 — folded into S-VIEW-4 / S-VIEW-3.
F1: preview velocity persists via envelope-v6 `ComponentState`. F2: envelope nodes are draggable
via the pure `envelope_edit` module. R10-F1 SETTLED 2026-07-27 — Option A flat y=1, folded into
S-VIEW-9. S-VIEW-F3 SETTLED — full-window overlay, implemented as Browse renders as a full-window
modal over Sample (landed in S-VIEW-1/S-VIEW-5). No open forks remain.)*
---