feat(S9/S8): bank-generation change-detection + instrument-side assignment reader
Extension stamps a monotonic bank_generation counter, bumped at content mutations; the VST3 instrument polls it off-thread on an editor timer and consumes assignment requests, refreshing playback hands-free.
This commit is contained in:
+22
-2
@@ -685,6 +685,17 @@ add_library(waveform_view STATIC src/vst/waveform_view.cpp)
|
||||
target_include_directories(waveform_view PUBLIC src/vst src)
|
||||
target_link_libraries(waveform_view PUBLIC editor_geometry peaks)
|
||||
|
||||
# bank_sync (Phase S9/S8 reader) — PURE decision logic for the instrument's off-audio-thread
|
||||
# poll: parse/compare the S9 bank-generation stamp, and the S8 assignment-request CONSUME
|
||||
# decision (new-and-resolvable-and-target -> apply; unresolvable -> drop-and-mark; non-target
|
||||
# -> stay eligible). The shell owns the timer cadence + side effects (reloadFromBank,
|
||||
# setSelectedSampleId, component-state marker); this owns only the yes/no maths, unit-tested
|
||||
# outside the DAW. Links assignment_request for the decoded AssignmentRequest it consumes.
|
||||
# NEITHER SDK.
|
||||
add_library(bank_sync STATIC src/vst/bank_sync.cpp)
|
||||
target_include_directories(bank_sync PUBLIC src/vst src)
|
||||
target_link_libraries(bank_sync PUBLIC assignment_request)
|
||||
|
||||
add_executable(editor_geometry_tests tests/test_editor_geometry.cpp)
|
||||
target_link_libraries(editor_geometry_tests PRIVATE editor_geometry)
|
||||
add_test(NAME editor_geometry_tests COMMAND editor_geometry_tests)
|
||||
@@ -718,6 +729,12 @@ add_executable(waveform_view_tests tests/test_waveform_view.cpp)
|
||||
target_link_libraries(waveform_view_tests PRIVATE waveform_view)
|
||||
add_test(NAME waveform_view_tests COMMAND waveform_view_tests)
|
||||
|
||||
# bank_sync (S9/S8 reader): the pure generation-parse + assignment-consume decision. Links
|
||||
# ONLY bank_sync (+ its assignment_request dep) — NEITHER SDK — the plain-data-boundary proof.
|
||||
add_executable(bank_sync_tests tests/test_bank_sync.cpp)
|
||||
target_link_libraries(bank_sync_tests PRIVATE bank_sync)
|
||||
add_test(NAME bank_sync_tests COMMAND bank_sync_tests)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 4) The REAPER extension — a loadable module (dlopen'd by REAPER, not linked).
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -770,7 +787,7 @@ add_library(reaper_reasampler MODULE
|
||||
src/card_meta.cpp
|
||||
src/card_drag.cpp
|
||||
)
|
||||
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings batch_capture tail_control realtime_record bank_book wav_trim owned_manifest prune_reconcile prune_button app_version provenance action_buttons drag_out theme component_geometry action_bar footer_bar overflow_menu mode_enable tooltip card_meta card_drag assignment_request)
|
||||
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings batch_capture tail_control realtime_record bank_book wav_trim owned_manifest prune_reconcile prune_button app_version provenance action_buttons drag_out theme component_geometry action_bar footer_bar overflow_menu mode_enable tooltip card_meta card_drag assignment_request bank_sync)
|
||||
target_include_directories(reaper_reasampler PRIVATE ${SDK_INC} ${WDL_INC})
|
||||
# OUTPUT_NAME is channel-derived (Phase V, V4): "reaper_reasampler" (stable, default) or
|
||||
# "reaper_reasampler_beta" (beta). REAPER dlopen's any reaper_* module, so both channels'
|
||||
@@ -901,9 +918,12 @@ if(WIN32 AND EXISTS "${VST3_SDK}/public.sdk/source/main/pluginfactory.cpp")
|
||||
# waveform_view (S11): the pure frame<->pixel marker geometry + zero-crossing snap the
|
||||
# editor's waveform surface draws + hit-tests against; links editor_geometry + peaks
|
||||
# transitively (shared Rect + AudioSample).
|
||||
# bank_sync (S9/S8 reader): the pure generation-compare + assignment-consume decision the
|
||||
# processor's off-thread poll runs; links assignment_request transitively (the decoded
|
||||
# request it consumes) — the same key the extension writes, shared via the pure module.
|
||||
target_link_libraries(reasampler_vst PRIVATE vst3_sdk editor_geometry bridge_marshal
|
||||
sample_map capture_paths embed_strip app_version capture_browser keyboard_strip
|
||||
waveform_view)
|
||||
waveform_view bank_sync)
|
||||
# SDK_INC gives reaper_vst3_interfaces.h + reaper_plugin_functions.h for the bridge;
|
||||
# WDL_INC gives LICE for the editor. The VST3 SDK headers come from vst3_sdk PUBLIC.
|
||||
target_include_directories(reasampler_vst PRIVATE ${SDK_INC} ${WDL_INC})
|
||||
|
||||
Reference in New Issue
Block a user