diff --git a/CLAUDE.md b/CLAUDE.md index d571b43..3380b80 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Repo identity and current state -The CMake project and binary are now named `reaper_reasampler`. This is **ReaSampler** — a per-project audio sample-bank capture tool. The MPE modules (`mpe_model`, `mpe_view`) have been removed; `bank_model` exists as a pure-core placeholder (Milestone 0). The remaining sampler module set (`peaks`, `capture`, `insert`, `bank_panel`, `persist`, `actions`) is being built out per CONTEXT.md / PLAN.md. The *discipline* — pure REAPER-free testable core split from REAPER-facing shells — is **preserved** throughout. +The CMake project and binary are now named `reaper_reasampler`. This is **ReaSampler** — a per-project audio sample-bank capture tool. The MPE modules (`mpe_model`, `mpe_view`) have been removed. The pure core (M0–M2) is complete: `bank_model` (Sample metadata + BankIndex with JSON round-trip) and `peaks` (waveform min/max bin computation) are both implemented and fully tested. The REAPER-facing shells (`capture`, `insert`, `bank_panel`, `persist`, `actions`) are being built out per CONTEXT.md / PLAN.md. The *discipline* — pure REAPER-free testable core split from REAPER-facing shells — is **preserved** throughout. CONTEXT.md is the authoritative spec and build roadmap. Read it first for any non-trivial task. Every REAPER API name cited there is correct-by-intent; verify argument order, types, and flag values against `vendor/reaper-sdk/sdk/reaper_plugin_functions.h` before use. @@ -22,11 +22,12 @@ Vendors two submodules (see `.gitmodules`): cmake --build build ctest --test-dir build -Two targets: +Three targets: | Target | Kind | Purpose | |---|---|---| -| `bank_model_tests` | executable | Pure unit tests — no REAPER, no DAW. This is the fast iteration loop. | +| `bank_model_tests` | executable | Pure unit tests for `bank_model` — no REAPER, no DAW. | +| `peaks_tests` | executable | Pure unit tests for `peaks` — no REAPER, no DAW. | | `reaper_reasampler` | loadable module | The actual extension binary (`.dll` / `.dylib` / `.so`). | ### macOS / Linux: SWELL dialog resources diff --git a/COMPLETED.md b/COMPLETED.md index 3a7b7dd..0b72be3 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -53,3 +53,17 @@ only** invariant enforced at the model boundary (no absolute path accepted/store - [x] Tests: full-field round-trip lossless; dedup collapses equal-hash adds; tier filter/move correct; relative-path invariant rejects absolute paths; empty-index and malformed-JSON edge cases. + +--- + +## Milestone 2 — peaks (pure) +**Goal:** Compute waveform min/max bins from raw PCM, dependency-free (not +REAPER's peak API). CONTEXT.md §Module architecture, §Non-goals. +**Verify:** CTest green. Fed a known signal (full-scale sine, ramp), asserted +min/max envelope per bin matches expected within tolerance; channel count +preserved; bin count honored for arbitrary sample lengths (incl. remainder bin). + +- [x] Min/max bin computation from interleaved PCM given a target bin count. +- [x] Multi-channel handling (per-channel envelope; no silent fold). +- [x] Tests: sine envelope ≈ ±amplitude; ramp envelope monotonic; DC/silence → + zero envelope; short-buffer and non-divisible-length edge cases. diff --git a/PLAN.md b/PLAN.md index f07de3e..1f06a4a 100644 --- a/PLAN.md +++ b/PLAN.md @@ -14,20 +14,6 @@ it here and appends it to `COMPLETED.md`. --- -## Milestone 2 — peaks (pure) -**Goal:** Compute waveform min/max bins from raw PCM, dependency-free (not -REAPER's peak API). CONTEXT.md §Module architecture, §Non-goals. -**Verify:** CTest green. Fed a known signal (full-scale sine, ramp), asserted -min/max envelope per bin matches expected within tolerance; channel count -preserved; bin count honored for arbitrary sample lengths (incl. remainder bin). - -- [ ] Min/max bin computation from interleaved PCM given a target bin count. -- [ ] Multi-channel handling (per-channel envelope; no silent fold). -- [ ] Tests: sine envelope ≈ ±amplitude; ramp envelope monotonic; DC/silence → - zero envelope; short-buffer and non-divisible-length edge cases. - ---- - ## Milestone 3 — Offline capture spike (REAPER shell) **Goal:** Offline-render the time-selection master mix to a wav in the project bank folder, add a `Sample`, log it. The render-driving spike. CONTEXT.md