From 3c1f9dfb9ab50f01b44687eea5eda10ccbee8725 Mon Sep 17 00:00:00 2001 From: Jojosito Date: Tue, 24 Sep 2024 22:00:49 +0200 Subject: [PATCH] Add MUS-X plugin (#707) * add MUS-X plugin * fix dual inclusion --------- Co-authored-by: Johannes Rauch --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/MUS-X | 1 + plugins/Makefile | 12 ++++++++++++ plugins/plugins.cpp | 29 +++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+) create mode 160000 plugins/MUS-X diff --git a/.gitmodules b/.gitmodules index 7d9b38a..0c21bd0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -200,6 +200,9 @@ [submodule "plugins/forsitan-modulare"] path = plugins/forsitan-modulare url = https://github.com/gosub/forsitan-modulare.git +[submodule "plugins/MUS-X"] + path = plugins/MUS-X + url = https://github.com/Jojosito/MUS-X.git [submodule "plugins/myth-modules"] path = plugins/myth-modules url = https://github.com/Ahineya/vcv-myth-plugin.git diff --git a/README.md b/README.md index 718db52..5878800 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ At the moment the following 3rd-party modules are provided: - [Mog](https://github.com/JustMog/Mog-VCV) - [mscHack](https://github.com/mschack/VCV-Rack-Plugins) - [MSM](https://github.com/netboy3/MSM-vcvrack-plugin) +- [MUS-X](https://github.com/Jojosito/MUS-X) - [Myth](https://github.com/Ahineya/vcv-myth-plugin) - [Nonlinear Circuits](https://github.com/mhetrick/nonlinearcircuits) - [Orbits](https://github.com/RareBreeds/Orbits) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 024d6ce..745b9d2 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -68,6 +68,7 @@ Below follows a list of all code licenses used in Cardinal and linked submodules | Mog | CC0-1.0 | | | mscHack | BSD-3-Clause | | | MSM | MIT | Repo's [LICENSE-dist.md](https://github.com/netboy3/MSM-vcvrack-plugin/issues/10) includes wrong information | +| MUS-X | GPL-3.0-or-later | | | Myth | GPL-3.0-or-later | | | Nonlinear Circuits | CC0-1.0 | | | Orbits | GPL-3.0-or-later | | @@ -227,6 +228,7 @@ Below is a list of artwork licenses from plugins | MSM/Fonts/DejaVuSansMono.ttf | Bitstream-Vera | | | MSM/Fonts/Segment7Standard.ttf | OFL-1.1-RFN | | | MSM/Fonts/Sudo.ttf | OFL-1.1-no-RFN | | +| MUS-X/* | GPL-3.0-or-later | No artwork specific license provided | | Myth/* | GPL-3.0-or-later | No artwork specific license provided | | nonlinearcircuits/* | CC0-1.0 | No artwork specific license provided | | nonlinearcircuits/Audiowide-Regular.ttf | OFL-1.1-RFN | | diff --git a/plugins/MUS-X b/plugins/MUS-X new file mode 160000 index 0000000..f622217 --- /dev/null +++ b/plugins/MUS-X @@ -0,0 +1 @@ +Subproject commit f622217ec6b709b7707fb76f85026e0faa93b893 diff --git a/plugins/Makefile b/plugins/Makefile index add96ff..b7fe888 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -930,6 +930,11 @@ PLUGIN_FILES += $(filter-out MSM/src/MSM.cpp,$(wildcard MSM/src/*.cpp)) # modules/types which are present in other plugins MSM_CUSTOM = ADSR BlankPanel Delay LFO LowFrequencyOscillator Mult Noise OP VCA VCO sawTable triTable +# -------------------------------------------------------------- +# MUS-X + +PLUGIN_FILES += $(filter-out MUS-X/src/plugin.cpp,$(wildcard MUS-X/src/*.cpp)) + # -------------------------------------------------------------- # myth-modules @@ -2621,6 +2626,13 @@ $(BUILD_DIR)/MSM/%.cpp.o: MSM/%.cpp $(foreach m,$(MSM_CUSTOM),$(call custom_module_names,$(m),MSM)) \ -DpluginInstance=pluginInstance__MSM +$(BUILD_DIR)/MUS-X/%.cpp.o: MUS-X/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(MUS_X_CUSTOM),$(call custom_module_names,$(m),MUS_X)) \ + -DpluginInstance=pluginInstance__MUS_X + $(BUILD_DIR)/myth-modules/%.cpp.o: myth-modules/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 3625192..ef1da5d 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -759,6 +759,9 @@ extern Model* modelBlankPanel; #undef modelVCA #undef modelVCO +// MUS-X +#include "MUS-X/src/plugin.hpp" + // myth-modules #include "myth-modules/src/plugin.hpp" @@ -955,6 +958,7 @@ Plugin* pluginInstance__MockbaModular; Plugin* pluginInstance__Mog; extern Plugin* pluginInstance__mscHack; Plugin* pluginInstance__MSM; +Plugin* pluginInstance__MUS_X; Plugin* pluginInstance__myth_modules; Plugin* pluginInstance__nonlinearcircuits; Plugin* pluginInstance__Orbits; @@ -2850,6 +2854,30 @@ static void initStatic__MSM() } } +static void initStatic__MUS_X() +{ + Plugin* const p = new Plugin; + pluginInstance__MUS_X = p; + + const StaticPluginLoader spl(p, "MUS-X"); + if (spl.ok()) + { + p->addModel(musx::modelADSR); + p->addModel(musx::modelDelay); + p->addModel(musx::modelDrift); + p->addModel(musx::modelFilter); + p->addModel(musx::modelLast); + p->addModel(musx::modelLFO); + p->addModel(musx::modelModMatrix); + p->addModel(musx::modelOnePole); + p->addModel(musx::modelOnePoleLP); + p->addModel(musx::modelOscillators); + p->addModel(musx::modelSplitStack); + p->addModel(musx::modelSynth); + p->addModel(musx::modelTuner); + } +} + static void initStatic__myth_modules() { Plugin* const p = new Plugin; @@ -3495,6 +3523,7 @@ void initStaticPlugins() initStatic__Mog(); initStatic__mscHack(); initStatic__MSM(); + initStatic__MUS_X(); initStatic__myth_modules(); initStatic__nonlinearcircuits(); initStatic__Orbits();