0b19d59f68
PLAN.md: living 12-milestone roadmap from CONTEXT.md's build order, each with a verify gate and its precision invariant; open questions carried forward. TODO.md: near-term M0-M2 slice as ordered tasks.
3.7 KiB
3.7 KiB
TODO.md — near-term actionable slice
The immediate, ordered tasks to execute the first step of PLAN.md: Milestone 0
(transition) → Milestone 1 (bank_model) → Milestone 2 (peaks). Everything past
M2 lives in PLAN.md, not here. Verify REAPER API names/flags against
vendor/reaper-sdk/sdk/reaper_plugin_functions.h before use.
Now — Milestone 0: transition scaffold
- Delete the MPE modules:
src/mpe_model.{h,cpp},src/mpe_view.{h,cpp},tests/test_mpe_model.cpp. - CMakeLists.txt — rename
project(reaper_mpeview …)and the MODULE target toreaper_reasampler; updateOUTPUT_NAME,PREFIX "", and the WIN32/APPLE/ Linux SUFFIX blocks to the new target name. - CMakeLists.txt — replace the
mpe_modelstatic lib with abank_modelstatic lib (src/bank_model.cpp,PUBLIC srcincludes); replacempe_model_testswithbank_model_tests(tests/test_bank_model.cpp), keepadd_test/ CTest. src/main.cpp— remove#include "mpe_view.h"and everyMpeView_*call (MpeView_Toggle,MpeView_IsOpen,MpeView_OnTimer,MpeView_Cleanup). Leave a minimal, loadable extension entry that resolves API pointers and logs to console; keep thecommand_id/gaccel/hookcommandregistration pattern as a commented seam for the future action family.src/main.cpp— replace theCEREBELLUM_MPEVIEW_TOGGLEaction string with the chosen sampler action-id prefix (record the prefix in a comment; it is forever-stable once shipped).- Confirm the tree still configures and builds:
cmake -B build -S .→cmake --build build→ctest --test-dir build. (bank_model tests may be a single placeholder assertion at this point.) - README.md — retarget the layout / "where to build next" sections to the sampler module set so the first implementer is not misled by MPE prose.
Next — Milestone 1: bank_model + JSON round-trip (pure, no REAPER)
src/bank_model.h— defineSamplewith the full field set from CONTEXT.md §Data model (id, name, relative path, source mode, source range project-time + PPQ, track GUID(s), wet/dry, channels, SR, length sec + beats, capture tempo, optional key, peak/RMS/LUFS, clip flag, tier, content hash, provenance, ts).src/bank_model.h/.cpp—BankIndex: ordered, keyed by id;add/remove/query.- Dedup: content-hash lookup so an add with an existing hash collapses.
- Tiers:
scratch|archive, tier-move, tier filtering; scratch auto-prunable. - JSON serialize/deserialize to/from
std::string(self-contained; no external JSON dep unless one is already vendored — check first). - Enforce relative-paths-only at the model boundary (reject/normalize absolute paths on add).
tests/test_bank_model.cpp— assert: full-field round-trip lossless; dedup collapses equal-hash adds; tier move + filter correct; absolute-path rejected; empty-index and malformed-JSON edge cases.
Then — Milestone 2: peaks (pure, no REAPER)
src/peaks.h/.cpp— min/max bin computation from interleaved PCM for a target bin count; per-channel (no silent fold). Addpeaks.cppto thebank_modellib (or a sibling pure lib) so tests link it.tests/test_peaks.cpp(+ CTest entry) — assert: full-scale sine envelope ≈ ±amplitude per bin; ramp envelope monotonic; silence/DC → zero envelope; short-buffer and non-divisible-length (remainder bin) edge cases.
Definition of done for this slice
ctest --test-dir buildgreen withbank_model_testsandpeakstests present.- No
mpe/Mpe/MPEsymbols remain insrc/ortests/. - The extension target builds under the new name and loads in REAPER (console log on load); it registers no half-wired actions.