From 952df617e838a0d862678adef2a1dd170e56b222 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 29 Jun 2022 16:22:47 +0100 Subject: [PATCH] Add Myth modules Signed-off-by: falkTX --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/Makefile | 12 ++++++++++++ plugins/myth-modules | 1 + plugins/plugins.cpp | 18 ++++++++++++++++++ src/custom/dep.cpp | 6 +++++- 7 files changed, 42 insertions(+), 1 deletion(-) create mode 160000 plugins/myth-modules diff --git a/.gitmodules b/.gitmodules index 37549d6..8ed60c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -206,3 +206,6 @@ [submodule "plugins/forsitan-modulare"] path = plugins/forsitan-modulare url = https://github.com/gosub/forsitan-modulare.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 61a1b4e..9a3acce 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,7 @@ At the moment the following 3rd-party modules are provided: - Mog - mscHack - MSM +- Myth - Nonlinear Circuits - Orbits - Parable Instruments diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 9253946..89fe81b 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -60,6 +60,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | 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 | +| Myth | GPL-3.0-or-later | | | Nonlinear Circuits | CC0-1.0 | | | Orbits | GPL-3.0-or-later | | | Parable Instruments | GPL-3.0-or-later | | @@ -187,6 +188,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 | | +| 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 | | | Orbits/* | CC-BY-NC-ND-4.0 | | diff --git a/plugins/Makefile b/plugins/Makefile index 5249cc7..d46d634 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -727,6 +727,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 +# -------------------------------------------------------------- +# myth-modules + +PLUGIN_FILES += $(filter-out myth-modules/src/plugin.cpp,$(wildcard myth-modules/src/*.cpp)) + # -------------------------------------------------------------- # Nonlinear Circuits @@ -1709,6 +1714,13 @@ $(BUILD_DIR)/MSM/%.cpp.o: MSM/%.cpp -DpluginInstance=pluginInstance__MSM \ -DDARKTHEME +$(BUILD_DIR)/myth-modules/%.cpp.o: myth-modules/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(MYTH_MODULES_CUSTOM),$(call custom_module_names,$(m),myth_modules)) \ + -DpluginInstance=pluginInstance__myth_modules + $(BUILD_DIR)/nonlinearcircuits/%.cpp.o: nonlinearcircuits/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/myth-modules b/plugins/myth-modules new file mode 160000 index 0000000..e511dd9 --- /dev/null +++ b/plugins/myth-modules @@ -0,0 +1 @@ +Subproject commit e511dd95eca830ee74fef23bddc195696603125f diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 32e94a2..712fa88 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -631,6 +631,9 @@ extern Model* modelBlankPanel; #undef modelVCA #undef modelVCO +// myth-modules +#include "myth-modules/src/plugin.hpp" + // Nonlinear Circuits #include "nonlinearcircuits/src/NLC.hpp" @@ -759,6 +762,7 @@ Plugin* pluginInstance__MockbaModular; Plugin* pluginInstance__Mog; extern Plugin* pluginInstance__mscHack; Plugin* pluginInstance__MSM; +Plugin* pluginInstance__myth_modules; Plugin* pluginInstance__nonlinearcircuits; Plugin* pluginInstance__Orbits; Plugin* pluginInstance__ParableInstruments; @@ -2343,6 +2347,19 @@ static void initStatic__MSM() } } +static void initStatic__myth_modules() +{ + Plugin* const p = new Plugin; + pluginInstance__myth_modules = p; + + const StaticPluginLoader spl(p, "myth-modules"); + if (spl.ok()) + { + p->addModel(modelMavka); + p->addModel(modelMolphar); + } +} + static void initStatic__nonlinearcircuits() { Plugin* const p = new Plugin; @@ -2726,6 +2743,7 @@ void initStaticPlugins() initStatic__Mog(); initStatic__mscHack(); initStatic__MSM(); + initStatic__myth_modules(); initStatic__nonlinearcircuits(); initStatic__Orbits(); initStatic__ParableInstruments(); diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index d72ff45..fd61147 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -268,6 +268,9 @@ static const struct { { "/kocmoc/res/SKF.svg", {}, -1 }, { "/kocmoc/res/SVF.svg", {}, -1 }, { "/kocmoc/res/TRG.svg", {}, -1 }, + // GPL-3.0-or-later + { "/myth-modules/res/Mavka.svg", {}, -1 }, + { "/myth-modules/res/Molphar.svg", {}, -1 }, // CC0-1.0 { "/nonlinearcircuits/res/BOOLs2.svg", {}, -1 }, { "/nonlinearcircuits/res/DoubleNeuronRef.svg", {}, -1 }, @@ -549,6 +552,7 @@ static inline bool invertPaint(NSVGshape* const shape, NSVGpaint& paint, const c { // scopes or other special things (do nothing) case 0x40ffffff: + case 0xff0000aa: case 0xff004200: case 0xff2b281e: case 0xff2d2827: