Archive D5 (mode switch) to COMPLETED.md and remove the completed Phase D section from PLAN.md; add mode_switch to CLAUDE.md architecture + targets.
4.2 KiB
PLAN.md — ReaSampler milestone roadmap
Living milestone roadmap for ReaSampler. Derived from CONTEXT.md's 11-step build
order; CONTEXT.md remains the authoritative spec — this file is the tickable
checklist, not a re-statement of the spec. When a point lands, doc-keeper removes
it here and appends it to COMPLETED.md.
Conventions
- One checkbox
- [ ]= one discrete, independently-landable point. - Each milestone opens with a Goal (one line) and a Verify criterion (the acceptance gate; precision invariants pulled in where one applies).
- Verify-in-DAW points require a manual REAPER run; pure points are gated by CTest.
- "See CONTEXT.md §…" points at the authoritative detail — do not duplicate it here.
Milestone 8 — RealtimeRecordBackend
Goal: Realtime record behind the same ICaptureBackend, producing identical
bank entries. CONTEXT.md §capture (realtime), §Precision invariants.
Verify (in DAW): Hidden temp track resamples wet output; recorded file moves
into the bank; non-destructive — temp track removed cleanly, source routing
and user monitoring restored unchanged.
Note (from M3): The realtime backend captures during playback and does NOT invoke the offline-render path, so it is inherently dialog-free (no render-progress window) — a secondary benefit beyond hardware/performed-FX capture.
- Hidden-track resample recipe (
I_RECMODE/I_RECINPUT/I_RECARM,CSurf_OnRecord/CSurf_OnStop); verify record-mode values against SDK. - Resolve wet-master routing that does not alter user monitoring (open question).
- Move recorded source into bank; populate identical
Sample; clean teardown.
Milestone 9 — slots (MPC-style)
Goal: "Capture to slot N" / "insert slot N", MIDI-bindable. CONTEXT.md Build order 9. Verify (in DAW): Slot capture and slot insert fire from MIDI bindings; slot state persists via the index.
- Slot model + slot↔sample assignment.
- "Capture to slot N" / "insert slot N" actions, MIDI-bindable.
Milestone 10 — provenance + null-test verify action
Goal: Provenance (parent sample id + FX-chain snapshot) and "re-capture from source"; ship the null-test verification action. CONTEXT.md §Precision invariants, Build order 10. Verify (in DAW): Null test — a dry offline capture of a range, re-inserted at its source position, nulls to silence against the source. This action is the tool's trust anchor and must pass.
- Provenance fields populated on resample-from-sample (parent id + FX-chain snapshot string).
- "Re-capture from source" action.
- Null-test verification action (capture → re-insert at source pos → assert silence sum).
Note (from M7): The null test requires a TRUE pre-FX dry capture, which REAPER offline render cannot produce via RENDER_SETTINGS (there is no pre-FX bit). True dry must be obtained by bypassing the source FX around an offline render (snapshot→bypass→render→restore) OR via the M8 realtime pre-FX path — so the dry-capture mechanism should be designed as part of the M10 null-test work.
Milestone 11 — polish
Goal: Batch capture (per selected item / per razor area), resample-and-mute-source, conform-on-insert, native OS drag-out. CONTEXT.md Build order 11, §Non-goals (drag-out deferred to last). Verify (in DAW): Each polish action works without regressing the precision invariants; drag-out places a valid file in the OS target.
- Batch capture: per selected item / per razor area.
- Resample-and-mute-source.
- Conform-on-insert (explicit).
- Native OS drag-out (deferred final;
InsertMediapath must already work).
Open questions to resolve during build
Carried from CONTEXT.md §Open questions — keep visible until each is closed by a landed milestone.
- Realtime wet-master routing that captures master output without altering the user's monitoring. (blocks M8)
parseIntnarrowing hardening:src/bank_model.cppparseIntcastsint64_t → intviastatic_castwithout a range check; integers that fit in int64 but exceedINT_MAXare implementation-defined. Hardening candidate — add bounds check before the cast when integer-field validation is in scope.