From 6f9606b6bbff4f95d44b379ba7e74df73cf70e31 Mon Sep 17 00:00:00 2001 From: rl2939 <60378449+rl2939@users.noreply.github.com> Date: Tue, 3 Jun 2025 01:49:51 -0400 Subject: [PATCH] First attempt to add XOXDrums. --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/4ms-XOXDrums | 1 + plugins/Makefile | 22 +++++++++++++++++++- plugins/plugins.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 1 deletion(-) create mode 160000 plugins/4ms-XOXDrums diff --git a/.gitmodules b/.gitmodules index b054833..beb7267 100644 --- a/.gitmodules +++ b/.gitmodules @@ -264,3 +264,6 @@ path = plugins/eightfold url = https://github.com/scanner-darkly/eightfold.git +[submodule "plugins/4ms-XOXDrums"] + path = plugins/4ms-XOXDrums + url = https://github.com/4ms/XOXDrums diff --git a/README.md b/README.md index a216d0e..a5b7609 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ But a couple of modules background's have their colors flipped, because damn we At the moment the following 3rd-party modules are provided: - [21kHz](https://github.com/netboy3/21kHz-rack-plugins) +- [4ms XOX Drums](https://github.com/4ms/XOXDrums) - [8Mode](https://github.com/8Mode/8Mode-VCV_Modules) - [Aaron Static](https://github.com/aaronstatic/AaronStatic_modules) - [Admiral](https://github.com/wapiflapi/admiral) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 671f0e3..b949216 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -14,6 +14,7 @@ Below follows a list of all code licenses used in Cardinal and linked submodules | DPF | ISC | Used as the plugin framework | | Rack | GPL-3.0-or-later | The actual Rack code, internal dependencies are compatible with GPLv3+ | | 21kHz | MIT | | +| 4MS XOX Drums | GPL-3.0-or-later | | | 8Mode | BSD-3-Clause | | | Aaron Static | MIT | | | admiral | MIT | | @@ -113,6 +114,7 @@ Below is a list of artwork licenses from plugins | Name | License(s) | Additional notes | |-----------------------------------------|------------------|------------------| | 21kHz | MIT | No artwork specific license provided | +| 4ms-XOXDrums/* | GPL-3.0-or-later | No artwork specific license provided | | 8Mode | BSD-3-Clause | No artwork specific license provided | | AaronStatic/* | MIT | No artwork specific license provided | | AaronStatic/fonts/PixelOperator.ttf | CC0-1.0 | | diff --git a/plugins/4ms-XOXDrums b/plugins/4ms-XOXDrums new file mode 160000 index 0000000..b8d279a --- /dev/null +++ b/plugins/4ms-XOXDrums @@ -0,0 +1 @@ +Subproject commit b8d279ac48e657eb977f9c95e1e921ed63718b76 diff --git a/plugins/Makefile b/plugins/Makefile index b975411..77c79bf 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -320,6 +320,19 @@ FUNDAMENTAL_CUSTOM = $(DRWAV) PLUGIN_FILES += $(filter-out 21kHz/src/21kHz.cpp,$(wildcard 21kHz/src/*.cpp)) +# -------------------------------------------------------------- +# 4ms XOX Drums + +PLUGIN_FILES += $(filter-out 4ms-XOXDrums/src/plugin-vcv.cc 4ms-XOXDrums/src/plugin-mm.cc,$(wildcard 4ms-XOXDrums/src/*.cc)) +PLUGIN_FILES += $(wildcard 4ms-XOXDrums/src/vcv/*.cc) +PLUGIN_FILES += $(wildcard 4ms-XOXDrums/src/modules/*.cc) +# PLUGIN_FILES += 4ms-XOXDrums-helper/comm_module.cc +PLUGIN_FILES += $(wildcard 4ms-XOXDrums/src/helpers/*.cc) +4MS_XOXDRUM_FLAGS = -std=gnu++20 +4MS_XOXDRUM_FLAGS = -I../src/Rack/include/rack.hpp + +4MSXOXDRUMS_CUSTOM = Duck + # -------------------------------------------------------------- # 8Mode @@ -1036,7 +1049,7 @@ PLUGIN_FILES += $(wildcard rcm-modules/src/*.c) PLUGIN_FILES += $(wildcard rcm-modules/src/PianoRoll/*.cpp) # modules/types which are present in other plugins -RCM_CUSTOM = Transport +RCM_CUSTOM = Transport Duck # -------------------------------------------------------------- # RebelTech @@ -2136,6 +2149,13 @@ $(BUILD_DIR)/21kHz/%.cpp.o: 21kHz/%.cpp $(foreach m,$(21KHZ_CUSTOM),$(call custom_module_names,$(m),21kHz)) \ -DpluginInstance=pluginInstance__21kHz +$(BUILD_DIR)/4ms-XOXDrums/%.o: 4ms-XOXDrums/% + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(4MS_XOXDRUM_FLAGS) -c -o $@ \ + $(foreach m,$(4MSXOXDRUMS_CUSTOM),$(call custom_module_names,$(m),4ms-XOXDrums)) \ + -DpluginInstance=pluginInstance__4msXOXDrums + $(BUILD_DIR)/8Mode/%.cpp.o: 8Mode/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 45c0f52..aa0f918 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -21,6 +21,23 @@ // 21kHz #include "21kHz/src/21kHz.hpp" +// 4ms XOX Drums +//#define modelDuck model4msXOXDrumsDuck +#include "4ms-XOXDrums/src/plugin-vcv.hh" +rack::Model* modelClave; +rack::Model* modelCowbell; +rack::Model* modelAccent; +rack::Model* modelClap; +rack::Model* modelCongabongo; +rack::Model* modelHiHat; +rack::Model* modelMaraca; +rack::Model* modelRimshot; +rack::Model* modelKick; +rack::Model* modelTom; +rack::Model* modelDuck; +rack::Model* modelSnare; +//#undef modelDuck + // 8Mode #include "8Mode/src/8mode.hpp" @@ -827,7 +844,9 @@ extern Model* modelBlankPanel; #include "rackwindows/src/plugin.hpp" // RCM +#define modelDuck modelRCMDuck #include "rcm-modules/src/plugin.hpp" +#undef modelDuck // RebelTech #define BefacoInputPort BefacoInputPortRebelTech @@ -932,6 +951,7 @@ Plugin* pluginInstance__Cardinal; Plugin* pluginInstance__Fundamental; // Plugin* pluginInstance__ZamAudio; Plugin* pluginInstance__21kHz; +Plugin* pluginInstance__4msXOXDrums; Plugin* pluginInstance__8Mode; extern Plugin* pluginInstance__AaronStatic; Plugin* pluginInstance__admiral; @@ -1251,6 +1271,31 @@ static void initStatic__21kHz() } } +static void initStatic__4msXOXDrums() +{ + Plugin* const p = new Plugin; + pluginInstance__4msXOXDrums = p; + + const StaticPluginLoader spl(p, "4ms-XOXDrums"); + if (spl.ok()) + { +//#define modelDuck model4msXOXDrumsDuck + p->addModel(modelClave); + p->addModel(modelCowbell); + p->addModel(modelAccent); + p->addModel(modelClap); + p->addModel(modelCongabongo); + p->addModel(modelHiHat); + p->addModel(modelMaraca); + p->addModel(modelRimshot); + p->addModel(modelKick); + p->addModel(modelSnare); + p->addModel(modelTom); + p->addModel(modelDuck); +//#undef modelDuck + } +} + static void initStatic__8Mode() { Plugin* const p = new Plugin; @@ -3150,6 +3195,7 @@ static void initStatic__RCM() const StaticPluginLoader spl(p, "rcm-modules"); if (spl.ok()) { +#define modelDuck modelRCMDuck p->addModel(modelGVerbModule); p->addModel(modelCV0to10Module); p->addModel(modelCVS0to10Module); @@ -3161,6 +3207,7 @@ static void initStatic__RCM() p->addModel(modelSEQAdapterModule); p->addModel(modelSyncModule); p->addModel(modelPolyNosModule); +#undef modelDuck } } @@ -3584,6 +3631,7 @@ void initStaticPlugins() initStatic__Fundamental(); // initStatic__ZamAudio(); initStatic__21kHz(); + initStatic__4msXOXDrums(); initStatic__8Mode(); initStatic__AaronStatic(); initStatic__admiral();