docs: archive tail follow-ons; add tail_setting key to persist doc

Record the Manual scroll fine-adjust + per-project tail persistence in
COMPLETED.md; name all three reasampler ext-state keys in CLAUDE.md.
This commit is contained in:
2026-07-23 19:23:44 -04:00
parent 0114559bdb
commit 54d3ce3958
2 changed files with 40 additions and 6 deletions
+39 -5
View File
@@ -473,11 +473,10 @@ path.
- **`kNormalizeDisableAll = (4 << 16) = 262144`.** Used for None and Manual — the
same disable-all value the pre-tail exact-bounds capture used.
- **`tail_control` pure module** (`src/tail_control.{h,cpp}`): REAPER-free logic for
the panel toggle. `kDefaultManualTailMs = 2000.0` (2 s). Fine-adjust UI (±
click zones / scroll) is a noted follow-on; this pass ships a fixed default.
- **Follow-ons noted, not done:** Manual fine-adjust UI; per-project persistence of
the toggle (currently extension-session lifetime, resets to None on unload); T2
realtime tail.
the panel toggle. `kDefaultManualTailMs = 2000.0` (2 s). Fine-adjust UI (scroll-wheel
in 250 ms steps) and per-project persistence landed as T1-followons (see below).
- **Follow-ons resolved:** Manual fine-adjust UI and per-project persistence of the
toggle landed as T1-followons. T2 realtime tail landed separately.
---
@@ -513,3 +512,38 @@ then trims at the -72 dB decay point (± inherent realtime tolerance); realtime
exact-bounds capture.
- **Realtime tail is non-deterministic by design** (inherent to the realtime backend).
Bit-identical repeats are not asserted for the realtime path; this is documented, not a defect.
---
## T1-followons — Manual fine-adjust UI + per-project tail persistence
**Goal:** Close the two follow-ons deferred at T1 landing: (1) scroll-wheel fine-adjust
of the Manual tail length in the panel footer; (2) the tail setting (mode + Manual length)
persists per-project inside the `.rpp` rather than resetting on extension unload.
**Verify (in DAW):** Scroll-wheel over the footer adjusts Manual length in 250 ms steps,
clamped 08 s; the label reads "Tail: Manual X.Xs" (one decimal) in Manual mode; footer
click still cycles Off → Auto → Manual. The tail setting survives Save / close+reopen;
projects with no stored key fall back to Off / 2 s.
**Depends on:** T1.
- [x] `adjustManualMs(current, notches, stepMs)` pure helper in `tail_control` (per-notch
±`kManualStepMs` = 250 ms, clamped [0, `kMaxTailMs`]); unit-tested.
- [x] `tailToggleLabel` updated: Manual mode appends the clamped length in seconds to one
decimal, e.g. `"Tail: Manual 2.0s"`; unit-tested at boundary lengths.
- [x] Panel footer scroll-wheel handler calls `adjustManualMs` and repaints; click handler
unchanged (still cycles mode via `cycleTailMode`).
- [x] `serializeTailSetting` / `deserializeTailSetting` pure round-trip (mode + manualMs)
added to `tail_control`; unit-tested including `std::nullopt` on malformed input.
- [x] `TailSetting tail_` promoted into `ReaSamplerSession` (peer to `bank_` and `view_`);
`persist` serializes it under the forever-stable key `"tail_setting"` (namespace
`"reasampler"`) on save and reloads it on project open. Absent key → default Off / 2 s
(graceful for older/unsaved projects).
- [x] Changing the toggle marks the project dirty and commits the value to ext state;
`bankPanelTailSetting()` reads through the session (not a panel-local copy).
**Notes/decisions:**
- `kManualStepMs = 250.0` — Daniel-set coarse-but-precise step; one wheel notch = ± 250 ms.
- Label format: `"Tail: Manual 2.0s"` (one decimal, `s` suffix) — format pinned by unit tests.
- Default fallback on absent/malformed key: `TailSetting { TailMode::None, kDefaultManualTailMs }`
(Off mode, 2 s stored length) — graceful for projects saved before this feature shipped.
- `kProjExtTailKey = "tail_setting"` is forever-stable (changing it would orphan saved choices,
falling back to the default — graceful but lossy).