daniel 22f91ac1d1 docs(product): split look-and-feel into Phase L (L1 kit / L2 panel / L3 VST-restyle)
Port visual-design-language.md to dev with DS-1/2/3 settled (B + spectral
strip; LICE + WDL free game; thorough M11-aware panel layout). L1 shared
kit; L2 panel redesign after M11 merges; L3 VST restyle gated on Phase S
landing. Phase S adopts the kit when it lands — not gated.
2026-07-26 19:36:00 -04:00
2026-07-21 21:45:36 -04:00
2026-07-21 21:27:31 -04:00

ReaSampler

A native C++ REAPER extension that captures any arbitrary audio source into a 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.

Layout

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).

Target module set (milestones ahead — see PLAN.md):

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

One-time setup

git submodule update --init

Vendors two submodules:

  • vendor/reaper-sdksdk/reaper_plugin.h, sdk/reaper_plugin_functions.h, SWELL headers
  • vendor/WDL — WDL utilities and the SWELL cross-platform Win32 layer

Build

cmake -B build -S .
cmake --build 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.

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:

php vendor/WDL/WDL/swell/mac_resgen.php src/resource.rc   # macOS
# (Linux uses the same generated 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.

Install / test

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.

Debug by attaching your debugger to the REAPER process. ShowConsoleMsg is a quick printf.

Where to build next

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.

S
Description
REAPER Extension for first-class resampling
Readme AGPL-3.0 10 MiB
Languages
C++ 98.7%
CMake 1.2%