docs: rewrite README to current state, retire TODO.md, fix stale mpe_model ref
README was frozen at Milestone 0. TODO.md was entirely M0-M2 tasks, all landed. CONTEXT.md intro cited a file deleted in M0.
This commit is contained in:
@@ -5,79 +5,88 @@ per-project **sample bank** (cached files + a docked grid), decoupled from the
|
||||
arrange view, with keyboard/MIDI-bindable capture and placement. Built as a
|
||||
precision tool: deterministic, non-destructive, no clutter.
|
||||
|
||||
This is a **skeleton**: the loading contract, build system, and the testable
|
||||
pure-core library are wired up. The bank panel, capture backend, and remaining
|
||||
module set are stubbed with clearly marked seams.
|
||||
## The two artifacts
|
||||
|
||||
## Layout
|
||||
**`reaper_reasampler`** — the REAPER extension. Captures audio into a named,
|
||||
per-project sample bank, displays it in a docked panel, and provides bindable
|
||||
actions for capture and placement.
|
||||
|
||||
src/main.cpp The REAPER<->extension contract: the single file that
|
||||
#defines REAPERAPI_IMPLEMENT, resolves API pointers,
|
||||
and holds the action-registration seam (commented,
|
||||
ready to reinstate under the CEREBELLUM_REASAMPLER_
|
||||
prefix). Logs "ReaSampler loaded." on startup.
|
||||
src/bank_model.{h,cpp} Pure, REAPER-free core: the Sample metadata struct and
|
||||
BankIndex (add / remove / query / tier moves /
|
||||
dedup-by-hash + JSON round-trip). This is the heart;
|
||||
everything else hangs off it. Currently an M0
|
||||
placeholder — the full implementation is Milestone 1.
|
||||
tests/test_bank_model.cpp Standalone tests for bank_model — no REAPER needed.
|
||||
vendor/ git submodules go here (see below).
|
||||
**ReaSampler 9000** (`reasampler_9000.vst3`) — a Windows-only VST3 sampler
|
||||
instrument that plays bank captures back across a MIDI keyboard. The VST3 target
|
||||
(`reasampler_vst`) is gated on the vendored `vendor/vst3sdk` slice; configure
|
||||
quietly omits it if the slice is absent.
|
||||
|
||||
Target module set (milestones ahead — see PLAN.md):
|
||||
A **beta channel** build is available via `-DREASAMPLER_CHANNEL=beta` at configure
|
||||
time, producing `reaper_reasampler_beta` and `reasampler_9000_beta.vst3`. The two
|
||||
channels coexist in one REAPER installation and do not share state.
|
||||
|
||||
bank_model Sample metadata + BankIndex + JSON (pure)
|
||||
peaks Waveform min/max bins from raw PCM (pure)
|
||||
capture ICaptureBackend: OfflineRenderBackend + RealtimeRecordBackend
|
||||
insert InsertMedia-based placement (explicit tempo-conform flag)
|
||||
bank_panel Docked LICE-drawn grid: thumbnails, audition, multi-select
|
||||
persist Project ext state <-> bank_model JSON; project-relative paths
|
||||
actions Bindable capture / placement / slot action family
|
||||
## The load-bearing principle
|
||||
|
||||
Capture and placement are separate acts. Capturing audio writes a file to the bank
|
||||
and adds an index entry. It **never** puts an item in the arrange view. Placement
|
||||
is a distinct, on-demand action. Any code path that auto-inserts a capture into the
|
||||
timeline violates the purpose of the tool.
|
||||
|
||||
## One-time setup
|
||||
|
||||
git submodule update --init
|
||||
|
||||
Vendors two submodules:
|
||||
Vendors three submodules:
|
||||
- `vendor/reaper-sdk` — `sdk/reaper_plugin.h`, `sdk/reaper_plugin_functions.h`, SWELL headers
|
||||
- `vendor/WDL` — WDL utilities and the SWELL cross-platform Win32 layer
|
||||
- `vendor/vst3sdk` — Steinberg VST3 SDK (Windows-only; requires a nested init after the top-level init):
|
||||
|
||||
## Build
|
||||
git submodule update --init vendor/vst3sdk
|
||||
cd vendor/vst3sdk && git submodule update --init pluginterfaces base public.sdk
|
||||
|
||||
## Build and test
|
||||
|
||||
cmake -B build -S .
|
||||
cmake --build build
|
||||
ctest --test-dir build
|
||||
|
||||
Targets:
|
||||
- `bank_model_tests` — run with `ctest --test-dir build` (or run the binary).
|
||||
This is your fast loop: iterate the pure core without touching REAPER.
|
||||
- `reaper_reasampler` — the extension binary.
|
||||
Pure modules have `<module>_tests` targets that run without REAPER or a DAW.
|
||||
`CMakeLists.txt` is the authoritative list of all targets.
|
||||
|
||||
### Beta channel
|
||||
|
||||
cmake -B build-beta -S . -DREASAMPLER_CHANNEL=beta
|
||||
cmake --build build-beta
|
||||
|
||||
### macOS / Linux dialog resources
|
||||
|
||||
When `bank_panel` is added (Milestone 5), `resource.rc` will need SWELL's resgen
|
||||
once (Win32 compiles it directly). Generate the SWELL dialog source and add it to
|
||||
the non-Windows build:
|
||||
`src/resource.rc` must be pre-processed by SWELL's resgen once per platform:
|
||||
|
||||
php vendor/WDL/WDL/swell/mac_resgen.php src/resource.rc # macOS
|
||||
# (Linux uses the same generated output.)
|
||||
php vendor/WDL/WDL/swell/mac_resgen.php src/resource.rc # macOS; Linux reuses the output
|
||||
|
||||
Then add the generated file to the `APPLE` / Linux `target_sources` blocks in
|
||||
CMakeLists.txt. The SWS extension's build is the canonical reference if you get
|
||||
stuck here — it's the fiddliest step and only bites once.
|
||||
Add the generated file to the appropriate `APPLE` / Linux `target_sources` block in
|
||||
CMakeLists.txt. The SWS extension build is the canonical reference for this step.
|
||||
|
||||
## Install / test
|
||||
## Install
|
||||
|
||||
Copy the built binary into REAPER's `UserPlugins/` folder
|
||||
(Options -> Show REAPER resource path), then **restart REAPER** (extensions load
|
||||
at startup; there is no hot reload). The extension logs "ReaSampler loaded." to
|
||||
the REAPER console on startup; no actions are registered yet.
|
||||
(Options → Show REAPER resource path), then **restart REAPER**. Extensions load at
|
||||
startup only; there is no hot reload.
|
||||
|
||||
Debug by attaching your debugger to the REAPER process. `ShowConsoleMsg` is a
|
||||
quick printf.
|
||||
## Repo layout
|
||||
|
||||
## Where to build next
|
||||
The codebase is organized around one discipline: **pure, REAPER-free testable core
|
||||
split from REAPER-facing shells**.
|
||||
|
||||
See `PLAN.md` for the full milestone roadmap and `TODO.md` for the near-term slice.
|
||||
The current first work is **Milestone 1** — flesh out `bank_model`: define the full
|
||||
`Sample` field set, implement `BankIndex` (add / remove / query / tier / dedup),
|
||||
add JSON serialize/deserialize, and drive it all through the existing CTest harness.
|
||||
- `src/` — pure core modules (no REAPER types, unit-testable outside the DAW) and
|
||||
REAPER-facing shells (extension entry point, panel, actions, capture backends, etc.)
|
||||
- `src/vst/` — the VST3 instrument: pure voice engine + zone payload + editor UI
|
||||
pure modules, and the VST3 shells
|
||||
- `tests/` — unit tests for the pure core modules
|
||||
- `vendor/` — git submodules
|
||||
|
||||
See `CLAUDE.md` for the full module inventory, architectural contracts, and the
|
||||
precise boundary between pure core and REAPER-facing shells.
|
||||
|
||||
## Further reading
|
||||
|
||||
- `CLAUDE.md` — architecture, module inventory, and build/API contracts
|
||||
- `CONTEXT.md` — the authoritative spec (large: ~186k — grep the relevant section rather than reading whole)
|
||||
- `CONTEXT-ARCHIVE.md` — build detail for landed work
|
||||
- `PLAN.md` — roadmap
|
||||
- `COMPLETED.md` — landed milestones
|
||||
|
||||
Reference in New Issue
Block a user