S-VIEW-9: velocity->amp transfer curve (pure velocity_curve module + zones-payload v7 + Voice::start apply)

Default flat y=1 (R10-F1 Option A) replaces the linear velocity/127 at note-on — a deliberate, non-back-compat behavior change; v1-v6 blobs lift to the flat default.
This commit is contained in:
2026-07-27 14:18:01 -04:00
parent 203005e6cf
commit a1f9dcf6f8
10 changed files with 829 additions and 34 deletions
+15 -1
View File
@@ -498,9 +498,17 @@ add_library(pitch_shift STATIC src/vst/pitch_shift.cpp)
target_include_directories(pitch_shift PUBLIC src src/vst)
target_link_libraries(pitch_shift PUBLIC peaks)
# velocity_curve (S-VIEW-9) — the pure velocity->amp transfer curve (eval + editing/clamp/inverse
# map). NO VST3/REAPER/SWELL/vendor and DELIBERATELY no editor_geometry (its hit-test takes an
# explicit pixel box, not a Rect) so the engine can depend on it WITHOUT gaining a transitive
# dependency on the editor's layout types. sampler_core depends on it (KeyZone carries a
# VelocityCurve; Voice::start eval's it). Mirror of pitch_shift's role, one layer below the engine.
add_library(velocity_curve STATIC src/vst/velocity_curve.cpp)
target_include_directories(velocity_curve PUBLIC src/vst)
add_library(sampler_core STATIC src/vst/sampler_core.cpp)
target_include_directories(sampler_core PUBLIC src src/vst)
target_link_libraries(sampler_core PUBLIC peaks pitch_shift)
target_link_libraries(sampler_core PUBLIC peaks pitch_shift velocity_curve)
# ---------------------------------------------------------------------------
# 3) Standalone tests for the pure modules (run without launching REAPER).
@@ -665,6 +673,12 @@ add_executable(sampler_core_tests tests/test_sampler_core.cpp)
target_link_libraries(sampler_core_tests PRIVATE sampler_core)
add_test(NAME sampler_core_tests COMMAND sampler_core_tests)
# velocity_curve (S-VIEW-9): the pure velocity->amp transfer curve. Links ONLY velocity_curve —
# NEITHER SDK, and specifically not editor_geometry — the plain-data-boundary + engine-clean proof.
add_executable(velocity_curve_tests tests/test_velocity_curve.cpp)
target_link_libraries(velocity_curve_tests PRIVATE velocity_curve)
add_test(NAME velocity_curve_tests COMMAND velocity_curve_tests)
# ---------------------------------------------------------------------------
# 2i) Pure VST3-instrument helpers (Phase S1) — NO VST3, NO REAPER, NO SWELL/LICE.
# editor_geometry: the IPlugView LICE editor's rectangle layout + hit-test math