Retire MPE scaffold; stand up reaper_reasampler pure-core skeleton

Rename CMake project/module to reaper_reasampler, delete mpe_model/mpe_view,
add minimal pure bank_model lib + placeholder CTest. main.cpp loads, logs to
console, keeps the action-registration seam commented with the forever-stable
CEREBELLUM_REASAMPLER_ action-id prefix.
This commit is contained in:
2026-07-21 21:18:51 -04:00
parent bbc0b2c19e
commit acfc9daabc
5 changed files with 196 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
cmake_minimum_required(VERSION 3.19)
project(reaper_reasampler LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# ---------------------------------------------------------------------------
# Vendored dependencies — add as git submodules (see README):
# git submodule add https://github.com/justinfrankel/reaper-sdk vendor/reaper-sdk
# git submodule add https://github.com/justinfrankel/WDL vendor/WDL
# ---------------------------------------------------------------------------
set(SDK_INC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/reaper-sdk/sdk)
set(WDL_INC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/WDL/WDL)
set(SWELL ${WDL_INC}/swell)
# ---------------------------------------------------------------------------
# 1) Pure model library — NO REAPER, NO SWELL. Builds & tests anywhere.
# The sampler's heart: Sample metadata + BankIndex (Milestone 1).
# ---------------------------------------------------------------------------
add_library(bank_model STATIC src/bank_model.cpp)
target_include_directories(bank_model PUBLIC src)
# ---------------------------------------------------------------------------
# 2) Standalone tests for the model (run without launching REAPER).
# ---------------------------------------------------------------------------
enable_testing()
add_executable(bank_model_tests tests/test_bank_model.cpp)
target_link_libraries(bank_model_tests PRIVATE bank_model)
add_test(NAME bank_model_tests COMMAND bank_model_tests)
# ---------------------------------------------------------------------------
# 3) The REAPER extension — a loadable module (dlopen'd by REAPER, not linked).
# ---------------------------------------------------------------------------
add_library(reaper_reasampler MODULE
src/main.cpp
)
target_link_libraries(reaper_reasampler PRIVATE bank_model)
target_include_directories(reaper_reasampler PRIVATE ${SDK_INC} ${WDL_INC})
set_target_properties(reaper_reasampler PROPERTIES PREFIX "" OUTPUT_NAME "reaper_reasampler")
if(WIN32)
# Native Win32. REAPER provides nothing extra to link.
# Dialog resources return with the docked bank_panel (Milestone 5).
elseif(APPLE)
# macOS: use REAPER's OWN SWELL at runtime via the modstub.
# Do NOT build full SWELL. SWELL_PROVIDED_BY_APP routes calls to the host.
target_sources(reaper_reasampler PRIVATE ${SWELL}/swell-modstub.mm)
target_compile_definitions(reaper_reasampler PRIVATE SWELL_PROVIDED_BY_APP)
target_link_libraries(reaper_reasampler PRIVATE "-framework AppKit")
set_target_properties(reaper_reasampler PROPERTIES SUFFIX ".dylib")
# Dialog: run SWELL resgen once (see README) and add the generated source.
else()
# Linux: REAPER's libSwell.so is used at runtime via the generic modstub.
# With SWELL_PROVIDED_BY_APP you can drop pkg-config / -lX11 entirely.
target_sources(reaper_reasampler PRIVATE ${SWELL}/swell-modstub-generic.cpp)
target_compile_definitions(reaper_reasampler PRIVATE SWELL_PROVIDED_BY_APP)
set_target_properties(reaper_reasampler PROPERTIES SUFFIX ".so")
# Dialog: run SWELL resgen once (see README) and add the generated source.
endif()