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:
+145
@@ -2271,3 +2271,148 @@ shrink below the floor. Final tuning deferred to T-SHELL.
|
||||
|
||||
- [x] Default `ViewRect` bumped to 840×560.
|
||||
- [x] `checkSizeConstraint` minimum floor enforced.
|
||||
|
||||
---
|
||||
|
||||
# Phase S — editor view-model redesign (three views: Sample / Browse / Zone)
|
||||
|
||||
> **Additive Phase S sub-phase (S-VIEW; Daniel, 2026-07-27, r9).** Merged to dev (Wave 1
|
||||
> 2026-07-27, Wave 2 2026-07-27 — `Merge pS-w2-t1-shell` + `Merge pS-w2-t2-velcurve`).
|
||||
> Integrated suite 52/52 green. S-VIEW-10 (velocity-curve editor UI) remains open in `PLAN.md`.
|
||||
|
||||
## S-VIEW-1 — three-view navigation model
|
||||
**Goal:** 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). Fork
|
||||
S-VIEW-F3 SETTLED — full-window overlay: Browse renders as a full-window modal over Sample
|
||||
(not a centered sheet). See CONTEXT.md §S-VIEW navigation contract.
|
||||
|
||||
- [x] Flat Browser|Zones toggle retired; three-view model: Sample home, Browse full-window modal
|
||||
over Sample, Zone dedicated surface with its own button.
|
||||
- [x] Empty state surfaces Browse as the dominant call-to-action; fresh instance is silent
|
||||
(S10 reversal preserved).
|
||||
- [x] S-VIEW-F3 settled and implemented: Browse is a full-window modal overlay over Sample.
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-2 — Sample view (the new main face)
|
||||
**Goal:** 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).
|
||||
|
||||
- [x] Hero waveform with S11 markers (start/loop start/loop end) moved to Sample face.
|
||||
- [x] Fenced root affordance on the Sample face.
|
||||
- [x] Mono/Stereo toggle moved from Browse to Sample.
|
||||
- [x] "Modes-and-down" control strip (Mode / Pitch engine / AHDSR|Trigger / AD pitch env) moved
|
||||
from Zone's param panel to the Sample face (single-capture one-zone storage per S15-F2).
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-3 — envelope overlay + draggable nodes
|
||||
**Goal:** Draw the amp envelope (AHDSR for Gate, fade/%-length for Trigger) as a curve over the
|
||||
Sample waveform at accurate wall-clock time. Pure `envelope_overlay` module (params + frame-length
|
||||
→ polyline; unit-tested); shell traces it in an accent hue. Breakpoints are draggable handles
|
||||
(S-VIEW-F2 SETTLED): X → segment time, Y → level on level-breakpoint nodes (sustain drags both
|
||||
axes), monotonic-in-time + range-clamped. Pure `envelope_edit` module (node hit-test +
|
||||
pixel-delta→clamped-param inverse map; mirror of `card_drag`; unit-tested). Both surfaces
|
||||
read/write the same `PerformanceZone` envelope fields. Wave 1 landed the pure modules;
|
||||
Wave 2 wired them in `reasampler_editor.cpp`. The Trigger frames↔fraction conversion was
|
||||
extracted to a new pure unit-tested `trigger_seam` module (startFrame threaded correctly).
|
||||
|
||||
- [x] **Wave 1:** `envelope_overlay` + `envelope_edit` pure modules landed and unit-tested.
|
||||
- [x] **Wave 2:** `reasampler_editor.cpp` traces the overlay and wires draggable node handles.
|
||||
- [x] **Wave 2:** `trigger_seam` pure module — Trigger frames↔fraction converter (pack and unpack
|
||||
directions, unit-tested); `startFrame` threaded correctly through the seam.
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-4 — preview-trigger + velocity knob
|
||||
**Goal:** 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): `previewVelocity` on `ComponentState` via
|
||||
an envelope bump to v6 (`src/vst/sample_map.h`), round-tripped through `getState`/`setState`
|
||||
over `IBStream`. Zones payload untouched; older blobs lift to a mid default. Wave 1 landed the
|
||||
field; Wave 2 landed the preview button + velocity knob UI.
|
||||
|
||||
- [x] **Wave 1:** `previewVelocity` field on `ComponentState`, envelope v5→v6 bump, processor
|
||||
`getState`/`setState` round-trip, clamped 1..127.
|
||||
- [x] **Wave 2:** preview button + velocity knob UI in `reasampler_editor.cpp`; RT-safe
|
||||
off-thread preview-note mailbox on the processor.
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-5 — Browse reduced to choosing (modal over Sample)
|
||||
**Goal:** 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 (S-VIEW-F3 SETTLED — implemented here and in S-VIEW-1).
|
||||
|
||||
- [x] Search + bank tabs + captures grid + scroll + selection retained.
|
||||
- [x] Confirm/cancel affordance added; double-click loads.
|
||||
- [x] Large waveform preview, Mono/Stereo toggle, root keyboard-strip, loop-point labels, and
|
||||
track-root message removed from Browse.
|
||||
- [x] Browse renders as a full-window modal overlay over Sample (S-VIEW-F3 settled and shipped).
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-6 — key-tracking parameter
|
||||
**Goal:** 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 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 landed the field/math/apply; Wave 2 landed the UI control.
|
||||
|
||||
- [x] **Wave 1:** per-`PerformanceZone` `keyTrack` field (zones payload v6, default 100%
|
||||
bit-identical), pure ratio math, applied in both Varispeed and Preserve engines.
|
||||
- [x] **Wave 2:** UI control on the Zone param panel + Sample control strip.
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-7 — piano-key pattern on the keyboard strip
|
||||
**Goal:** 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 landed `isNaturalKey`; Wave 2 drew the overlay.
|
||||
|
||||
- [x] **Wave 1:** pure `isNaturalKey` predicate on `keyboard_strip`, unit-tested.
|
||||
- [x] **Wave 2:** `reasampler_editor.cpp` draws the two-tone overlay over the spectral fill.
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-8 — Zone view retained + wired
|
||||
**Goal:** 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.
|
||||
|
||||
- [x] +Add Zone / Delete retained.
|
||||
- [x] Per-zone keyboard strip with piano-key pattern.
|
||||
- [x] Low/High/Root numeric-entry legend retained.
|
||||
- [x] Per-zone param panel retained.
|
||||
- [x] Key-tracking control added to Zone view.
|
||||
|
||||
---
|
||||
|
||||
## S-VIEW-9 — velocity→amp transfer curve (pure core + engine application)
|
||||
**Goal:** New pure `velocity_curve` module — eval (monotone cubic Hermite spline,
|
||||
Fritsch–Carlson slope limiting) + control-point editing (add/move/delete x-ordered +
|
||||
box-clamped) + hit-test + pixel-delta→clamped-point inverse map; unit-tested at eval +
|
||||
clamp/order boundaries. Additive `velocityCurve` field on `PerformanceZone` (instrument-owned,
|
||||
D-B), zones-payload version axis bumped to **v7**; default = **flat y=1** (R10-F1 SETTLED —
|
||||
Option A, Daniel 2026-07-27: "any velocity plays at full level"); older ≤v6 blobs lift to flat
|
||||
y=1. Applied at `Voice::start()` — replaces `velocityGain_ = velocity / 127.0` with
|
||||
`velocityGain_ = curve.eval(velocity)`, off the per-frame path (no new RT work).
|
||||
**Default is a deliberate non-back-compat behavior change:** the prior engine used linear
|
||||
`velocity/127`; existing zones' soft hits will play at full level after upgrade. Flagged and
|
||||
accepted by Daniel.
|
||||
|
||||
- [x] Pure `velocity_curve` module: `eval(velocity 0–127)→amp 0–1` via Fritsch–Carlson monotone
|
||||
cubic Hermite spline (no overshoot outside [0,1]; collinear points reduce to exact linear ramp).
|
||||
- [x] Control-point editing: `addPoint`, `movePoint` (x-clamped between neighbours, endpoints
|
||||
x-pinned), `deletePoint` (endpoints not deletable); `fromPoints` repair-on-deserialize.
|
||||
- [x] Hit-test + inverse map: `pointAtPixel`, `resolvePointDrag` (pure; mirror of `envelope_edit`).
|
||||
- [x] Additive `velocityCurve` on `PerformanceZone`, zones-payload v7; pre-v7 blobs lift to
|
||||
flat y=1; `velocity_curve_tests` CTest target.
|
||||
- [x] Applied at `Voice::start()` — `velocityGain_` now set from `curve.eval(velocity)`.
|
||||
- [x] Default flat y=1 — back-compat caveat documented and accepted.
|
||||
|
||||
Reference in New Issue
Block a user