From 135715871dddf676211c560edb0682f7ce9eda21 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 24 Feb 2022 19:08:44 +0000 Subject: [PATCH] Add ML Modules Signed-off-by: falkTX --- .gitmodules | 3 ++ README.md | 1 + docs/LICENSES.md | 4 ++ plugins/ML_modules | 1 + plugins/Makefile | 16 ++++++++ plugins/plugins.cpp | 94 ++++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 114 insertions(+), 5 deletions(-) create mode 160000 plugins/ML_modules diff --git a/.gitmodules b/.gitmodules index 63c1ea2..6ad5006 100644 --- a/.gitmodules +++ b/.gitmodules @@ -148,3 +148,6 @@ [submodule "plugins/HamptonHarmonics"] path = plugins/HamptonHarmonics url = https://gitlab.com/hampton-harmonics/hampton-harmonics-modules.git +[submodule "plugins/ML_modules"] + path = plugins/ML_modules + url = https://github.com/martin-lueders/ML_modules.git diff --git a/README.md b/README.md index 5099834..6cde881 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ At the moment the following 3rd-party modules are provided: - Lomas Modules - Lyrae Modules - MindMeld +- ML Modules - Mockba Modular - Mog - mscHack diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 7e08888..3a519c2 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -45,6 +45,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Lomas Modules | GPL-3.0-or-later | | | Lyrae Modules | GPL-3.0-or-later | | | MindMeld | GPL-3.0-or-later | | +| ML Modules | BSD-3-Clause | | | Mockba Modular | MIT | | | Mog | CC0-1.0 | | | mscHack | BSD-3-Clause | | @@ -136,6 +137,9 @@ Below is a list of artwork licenses from plugins | LyraeModules/* | CC-BY-NC-SA-4.0 | | | MindMeld/* | CC-BY-NC-ND-4.0 | | | MindMeld/fonts/RobotoCondensed-*.ttf | Apache-2.0 | | +| ML_modules/* | BSD-3-Clause | No artwork specific license provided | +| ML_modules/DejaVuSansMono.ttf | Bitstream-Vera | | +| ML_modules/Segment7Standard.ttf | OFL-1.1-RFN | | | MockbaModular/* | MIT | No artwork specific license provided | | Mog/* | CC0-1.0 | | | Mog/components/* | CC-BY-NC-4.0 | | diff --git a/plugins/ML_modules b/plugins/ML_modules new file mode 160000 index 0000000..788ceb7 --- /dev/null +++ b/plugins/ML_modules @@ -0,0 +1 @@ +Subproject commit 788ceb73cfabddaff7245b0df072b0e22a19b360 diff --git a/plugins/Makefile b/plugins/Makefile index 5841a29..dfd9917 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -604,6 +604,15 @@ PLUGIN_FILES += $(wildcard MindMeldModular/src/Utilities/*.cpp) # modules/types which are present in other plugins MINDMELD_CUSTOM = printNote +# -------------------------------------------------------------- +# ML_modules + +PLUGIN_FILES += $(filter-out ML_modules/src/plugin.cpp,$(wildcard ML_modules/src/*.cpp)) +PLUGIN_FILES += ML_modules/freeverb/revmodel.cpp + +# modules/types which are present in other plugins +ML_CUSTOM = Quant Quantizer QuantizerWidget SH8 allpass comb revmodel + # -------------------------------------------------------------- # MockbaModular @@ -1417,6 +1426,13 @@ $(BUILD_DIR)/MindMeldModular/%.cpp.o: MindMeldModular/%.cpp $(foreach m,$(MINDMELD_CUSTOM),$(call custom_module_names,$(m),MindMeld)) \ -DpluginInstance=pluginInstance__MindMeld +$(BUILD_DIR)/ML_modules/%.cpp.o: ML_modules/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(ML_CUSTOM),$(call custom_module_names,$(m),ML)) \ + -DpluginInstance=pluginInstance__ML + $(BUILD_DIR)/MockbaModular/%.cpp.o: MockbaModular/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index cd075ce..a6305ef 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -462,6 +462,44 @@ extern Model* modelBassMaster; extern Model* modelBassMasterJr; extern Model* modelShapeMaster; +// ML_modules +/* NOTE too much noise in original include, do this a different way +// #include "ML_modules/src/ML_modules.hpp" +*/ +#define modelQuantizer modelMLQuantizer +#define modelSH8 modelMLSH8 +extern Model* modelQuantizer; +extern Model* modelQuantum; +extern Model* modelTrigBuf; +extern Model* modelSeqSwitch; +extern Model* modelSeqSwitch2; +extern Model* modelShiftRegister; +extern Model* modelShiftRegister2; +extern Model* modelFreeVerb; +extern Model* modelSum8; +extern Model* modelSum8mk2; +extern Model* modelSum8mk3; +extern Model* modelSH8; +extern Model* modelConstants; +extern Model* modelCounter; +extern Model* modelTrigDelay; +extern Model* modelBPMdetect; +extern Model* modelVoltMeter; +extern Model* modelOctaFlop; +extern Model* modelOctaTrig; +extern Model* modelOctaSwitch; +extern Model* modelTrigSwitch; +extern Model* modelTrigSwitch2; +extern Model* modelTrigSwitch3; +extern Model* modelTrigSwitch3_2; +extern Model* modelOctaPlus; +extern Model* modelOctaTimes; +extern Model* modelCloner; +extern Model* modelPolySplitter; +extern Model* modelArpeggiator; +#undef modelQuantizer +#undef modelSH8 + // MockbaModular #define modelBlank modelMockbaModularBlank #define modelComparator modelMockbaModularComparator @@ -613,6 +651,7 @@ Plugin* pluginInstance__LittleUtils; Plugin* pluginInstance__Lomas; Plugin* pluginInstance__Lyrae; extern Plugin* pluginInstance__MindMeld; +Plugin* pluginInstance__ML; Plugin* pluginInstance__MockbaModular; Plugin* pluginInstance__Mog; extern Plugin* pluginInstance__mscHack; @@ -1788,16 +1827,47 @@ static void initStatic__MindMeld() } } -static void initStatic__Mog() +static void initStatic__ML() { Plugin* const p = new Plugin; - pluginInstance__Mog = p; + pluginInstance__ML = p; - const StaticPluginLoader spl(p, "Mog"); + const StaticPluginLoader spl(p, "ML_modules"); if (spl.ok()) { - p->addModel(modelNetwork); - p->addModel(modelNexus); +#define modelQuantizer modelMLQuantizer +#define modelSH8 modelMLSH8 + p->addModel(modelQuantizer); + p->addModel(modelQuantum); + p->addModel(modelTrigBuf); + p->addModel(modelSeqSwitch); + p->addModel(modelSeqSwitch2); + p->addModel(modelShiftRegister); + p->addModel(modelShiftRegister2); + p->addModel(modelFreeVerb); + p->addModel(modelSum8); + p->addModel(modelSum8mk2); + p->addModel(modelSum8mk3); + p->addModel(modelSH8); + p->addModel(modelConstants); + p->addModel(modelCounter); + p->addModel(modelTrigDelay); + p->addModel(modelBPMdetect); + p->addModel(modelVoltMeter); + p->addModel(modelOctaFlop); + p->addModel(modelOctaTrig); + p->addModel(modelOctaSwitch); + p->addModel(modelTrigSwitch); + p->addModel(modelTrigSwitch2); + p->addModel(modelTrigSwitch3); + p->addModel(modelTrigSwitch3_2); + p->addModel(modelOctaPlus); + p->addModel(modelOctaTimes); + p->addModel(modelCloner); + p->addModel(modelPolySplitter); + p->addModel(modelArpeggiator); +#undef modelQuantizer +#undef modelSH8 } } @@ -1860,6 +1930,19 @@ static void initStatic__MockbaModular() } } +static void initStatic__Mog() +{ + Plugin* const p = new Plugin; + pluginInstance__Mog = p; + + const StaticPluginLoader spl(p, "Mog"); + if (spl.ok()) + { + p->addModel(modelNetwork); + p->addModel(modelNexus); + } +} + static void initStatic__mscHack() { Plugin* const p = new Plugin; @@ -2121,6 +2204,7 @@ void initStaticPlugins() initStatic__Lomas(); initStatic__Lyrae(); initStatic__MindMeld(); + initStatic__ML(); initStatic__MockbaModular(); initStatic__Mog(); initStatic__mscHack();