From 6b9bfbba1849797c4f4fd335362ef1098d3a84a8 Mon Sep 17 00:00:00 2001 From: Dan Green Date: Tue, 10 Sep 2024 23:32:33 -0700 Subject: [PATCH 1/6] Update core-interface (add Bypass Routes to info) --- lib/metamodule-core-interface | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metamodule-core-interface b/lib/metamodule-core-interface index 613dd68..5e1da16 160000 --- a/lib/metamodule-core-interface +++ b/lib/metamodule-core-interface @@ -1 +1 @@ -Subproject commit 613dd682ec1c1f503e5008b23023f6f3554a247d +Subproject commit 5e1da1619a2918cafad666e132abac56f77b6481 From 76526f2a1f01cdd2c499de348af40bf2c9e5b31f Mon Sep 17 00:00:00 2001 From: Dan Green Date: Tue, 10 Sep 2024 23:32:42 -0700 Subject: [PATCH 2/6] Update CoreModules (DLD Bypass routes) --- lib/CoreModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CoreModules b/lib/CoreModules index 7523f74..b5039e9 160000 --- a/lib/CoreModules +++ b/lib/CoreModules @@ -1 +1 @@ -Subproject commit 7523f74728d3725279d76d1ffb26bd493e9db7e3 +Subproject commit b5039e97b241ae648686ab8c0be0b8e92843d885 From 7ff2ed33ffe7be313cf3181d66545dc128869c5d Mon Sep 17 00:00:00 2001 From: Dan Green Date: Tue, 10 Sep 2024 23:39:37 -0700 Subject: [PATCH 3/6] Configure bypass routes --- src/generic_module.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/generic_module.hh b/src/generic_module.hh index 9464dc0..5eec5a1 100644 --- a/src/generic_module.hh +++ b/src/generic_module.hh @@ -27,6 +27,10 @@ struct GenericModule { for (auto &element : INFO::Elements) { std::visit([&creator](auto &el) { creator.config_element(el); }, element); } + // Bypass Routes + for (auto route : INFO::bypass_routes) { + configBypass(route.input, route.output); + } } }; From 34cc4b28cd9b81dac43b3caffe2429cba99501d0 Mon Sep 17 00:00:00 2001 From: Dan Green Date: Tue, 10 Sep 2024 23:40:03 -0700 Subject: [PATCH 4/6] Generic module cleanup: INFO => Info (former is a macro) --- src/generic_module.hh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/generic_module.hh b/src/generic_module.hh index 5eec5a1..b271d18 100644 --- a/src/generic_module.hh +++ b/src/generic_module.hh @@ -6,29 +6,30 @@ #include "widgets/vcv_module_creator.hh" #include "widgets/vcv_widget_creator.hh" -template INFO> +template Info> struct GenericModule { static rack::Model *create() { - return rack::createModel(INFO::slug.data()); + return rack::createModel(Info::slug.data()); } struct Module : CommModule { Module() { // Create processing core - core = MetaModule::ModuleFactory::create(INFO::slug); + core = MetaModule::ModuleFactory::create(Info::slug); // Register with VCV the number of elements of each type - auto cnt = ElementCount::count(); + auto cnt = ElementCount::count(); configComm(cnt.num_params, cnt.num_inputs, cnt.num_outputs, cnt.num_lights); // Configure elements with VCV // this includes alt parameters - MetaModule::VCVModuleParamCreator creator{this}; - for (auto &element : INFO::Elements) { + MetaModule::VCVModuleParamCreator creator{this}; + for (auto &element : Info::Elements) { std::visit([&creator](auto &el) { creator.config_element(el); }, element); } + // Bypass Routes - for (auto route : INFO::bypass_routes) { + for (auto route : Info::bypass_routes) { configBypass(route.input, route.output); } } @@ -45,7 +46,7 @@ struct GenericModule { setModule(static_cast(module)); // use svg file as panel - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, INFO::svg_filename.data()))); + setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, Info::svg_filename.data()))); // draw screws addChild(createWidget(rack::math::Vec(RACK_GRID_WIDTH, 0))); @@ -58,8 +59,8 @@ struct GenericModule { } // create widgets from all elements - MetaModule::VCVWidgetCreator creator(this, module); - for (auto &element : INFO::Elements) { + MetaModule::VCVWidgetCreator creator(this, module); + for (auto &element : Info::Elements) { std::visit([&creator](auto &el) { creator.create(el); }, element); } } @@ -67,7 +68,7 @@ struct GenericModule { // custom menu item that draws a child menu populated with entries // defined by the alt parameter elements of the module struct AltParamMenuTop : rack::ui::MenuItem { - AltParamMenuTop(MetaModule::VCVWidgetCreator creator_) + AltParamMenuTop(MetaModule::VCVWidgetCreator creator_) : creator(creator_) { } @@ -75,18 +76,18 @@ struct GenericModule { auto childMenu = new rack::ui::Menu; // let each element render itself to the menu - for (auto &element : INFO::Elements) { + for (auto &element : Info::Elements) { std::visit([&childMenu, this](auto &el) { creator.renderToContextMenu(el, childMenu); }, element); } return childMenu; } private: - MetaModule::VCVWidgetCreator creator; + MetaModule::VCVWidgetCreator creator; }; void appendContextMenu(rack::ui::Menu *menu) override { - MetaModule::VCVWidgetCreator creator(this, module); + MetaModule::VCVWidgetCreator creator(this, module); // add single entry with submenu // we need to forward the creator so the entry itself is able to create further menu items From d55e74fd3b61ebee59116a585c617b5bde3b0909 Mon Sep 17 00:00:00 2001 From: Dan Green Date: Wed, 11 Sep 2024 21:59:37 -0700 Subject: [PATCH 5/6] Update CoreModules (bypass routes for all FX) --- lib/CoreModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CoreModules b/lib/CoreModules index b5039e9..3d45368 160000 --- a/lib/CoreModules +++ b/lib/CoreModules @@ -1 +1 @@ -Subproject commit b5039e97b241ae648686ab8c0be0b8e92843d885 +Subproject commit 3d45368f6ac6938b5a2cf9e480acf8a0b6e96812 From bbf92b1c4a6826098014d574a053c379a94bf80a Mon Sep 17 00:00:00 2001 From: Dan Green Date: Mon, 16 Sep 2024 08:39:02 -0700 Subject: [PATCH 6/6] Update CoreModules (merged bypass into main) --- lib/CoreModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CoreModules b/lib/CoreModules index 3d45368..5e2302d 160000 --- a/lib/CoreModules +++ b/lib/CoreModules @@ -1 +1 @@ -Subproject commit 3d45368f6ac6938b5a2cf9e480acf8a0b6e96812 +Subproject commit 5e2302d6a7d55fb66c4c78a38f4f5defd9d0299b