diff --git a/.gitmodules b/.gitmodules index 16f700b..8ecb987 100644 --- a/.gitmodules +++ b/.gitmodules @@ -230,3 +230,6 @@ [submodule "plugins/EnigmaCurry"] path = plugins/EnigmaCurry url = https://github.com/EnigmaCurry/EnigmaCurry-vcv-pack.git +[submodule "plugins/DHE-Modules"] + path = plugins/DHE-Modules + url = https://github.com/dhemery/DHE-Modules.git diff --git a/README.md b/README.md index cdafe68..e3ff25c 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ At the moment the following 3rd-party modules are provided: - [cf](https://github.com/cfoulc/cf) - [ChowDSP](https://github.com/jatinchowdhury18/ChowDSP-VCV) - [dBiz](https://github.com/dBiz/dBiz) +- [DHE Modules](https://github.com/dhemery/DHE-Modules) - [DrumKit](https://svmodular.com/plugin/vcv/drumkit.html) - [EnigmaCurry](https://github.com/EnigmaCurry/EnigmaCurry-vcv-pack) - [E-Series](https://github.com/VCVRack/ESeries) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 9d85fa7..04263a6 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -34,6 +34,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | cf | BSD-3-Clause | | | ChowDSP | GPL-3.0-or-later | | | dBiz | GPL-3.0-or-later | | +| DHE-Modules | MIT | | | DrumKit | CC0-1.0 | | | EnigmaCurry | GPL-3.0-or-later | | | E-Series | GPL-3.0-or-later | | @@ -159,6 +160,7 @@ Below is a list of artwork licenses from plugins | dBiz/* | CC-BY-NC-ND-4.0 | | | dBiz/DejaVuSansMono.ttf | Bitstream-Vera | | | dBiz/ShareTechMono-Regular.ttf | OFL-1.1 | | +| DHE-Modules/* | MIT | Same license as source code | | DrumKit/* | CC0-1.0 | | | DrumKit/component/NovaMono.ttf | OFL-1.1-RFN | | | EnigmaCurry/res/fonts/dseg/* | OFL-1.1-RFN | | diff --git a/plugins/DHE-Modules b/plugins/DHE-Modules new file mode 160000 index 0000000..1d1c286 --- /dev/null +++ b/plugins/DHE-Modules @@ -0,0 +1 @@ +Subproject commit 1d1c286fc69babdb36dfe5fa4fe2856b0f707854 diff --git a/plugins/Makefile b/plugins/Makefile index 3c3c636..72aff2d 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -655,6 +655,11 @@ PLUGIN_FILES += $(filter-out dBiz/src/plugin.cpp,$(wildcard dBiz/src/*.cpp)) DBIZ_CUSTOM = Chord DarkDefaultItem Divider FourSeq FourSeqWidget OrangeLight VCA4 Wavefolder darkPanelID lightPanelID DBIZ_CUSTOM_PER_FILE = LERP MultiFilter Oscillator calcOutput sineOsc subBank +# -------------------------------------------------------------- +# DHE-Modules + +PLUGIN_FILES += $(filter-out DHE-Modules/src/plugin.cpp,$(wildcard DHE-Modules/src/modules/*/init.cpp)) + # -------------------------------------------------------------- # DrumKit @@ -1390,6 +1395,7 @@ RESOURCE_FILES += BaconPlugs/res/midi/chopin RESOURCE_FILES += BaconPlugs/res/midi/debussy RESOURCE_FILES += BaconPlugs/res/midi/goldberg RESOURCE_FILES += cf/playeroscs +RESOURCE_FILES += DHE-Modules/svg RESOURCE_FILES += DrumKit/res/samples RESOURCE_FILES += MindMeldModular/res/ShapeMaster/CommunityPresets RESOURCE_FILES += MindMeldModular/res/ShapeMaster/CommunityShapes @@ -2216,6 +2222,14 @@ $(BUILD_DIR)/dBiz/src/%.cpp.o: dBiz/src/%.cpp $(foreach m,$(DBIZ_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),dBiz_$(shell basename $*))) \ -DpluginInstance=pluginInstance__dBiz +$(BUILD_DIR)/DHE-Modules/src/%.cpp.o: DHE-Modules/src/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(DHE_CUSTOM),$(call custom_module_names,$(m),DHE)) \ + -DpluginInstance=pluginInstance__DHE \ + -IDHE-Modules/src + $(BUILD_DIR)/DrumKit/%.cpp.o: DrumKit/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 4d391a1..96b5429 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1,18 +1,7 @@ /* * DISTRHO Cardinal Plugin - * 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 - * published by the Free Software Foundation; either version 3 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the LICENSE file. + * Copyright (C) 2021-2024 Filipe Coelho + * SPDX-License-Identifier: GPL-3.0-or-later */ #include "rack.hpp" @@ -335,6 +324,26 @@ extern Model* modelTestVCF; #undef modelFourSeq #undef modelVCA4 +// DHEModules +// NOTE very unique way of handling init, needs special handling +namespace dhe { +namespace blossom { void init(Plugin*); } +namespace buttons { void init(Plugin*); } +namespace cubic { void init(Plugin*); } +namespace curve_sequencer { void init(Plugin*); } +namespace envelope { void init(Plugin*); } +namespace func { void init(Plugin*); } +namespace fuzzy_logic { void init(Plugin*); } +namespace gator { void init(Plugin*); } +namespace ranger { void init(Plugin*); } +namespace scannibal { void init(Plugin*); } +namespace sequencizer { void init(Plugin*); } +namespace swave { void init(Plugin*); } +namespace tapers { void init(Plugin*); } +namespace truth { void init(Plugin*); } +namespace xycloid { void init(Plugin*); } +} + // DrumKit #include "DrumKit/src/DrumKit.hpp" void setupSamples(); @@ -821,6 +830,7 @@ Plugin* pluginInstance__CatroModulo; Plugin* pluginInstance__cf; Plugin* pluginInstance__ChowDSP; Plugin* pluginInstance__dBiz; +Plugin* pluginInstance__DHE; extern Plugin* pluginInstance__DrumKit; Plugin* pluginInstance__EnigmaCurry; Plugin* pluginInstance__ESeries; @@ -1835,6 +1845,32 @@ static void initStatic__dBiz() } } +static void initStatic__DHE() +{ + Plugin* const p = new Plugin; + pluginInstance__DHE = p; + + const StaticPluginLoader spl(p, "DHE-Modules"); + if (spl.ok()) + { + dhe::blossom::init(p); + dhe::buttons::init(p); + dhe::cubic::init(p); + dhe::curve_sequencer::init(p); + dhe::envelope::init(p); + dhe::func::init(p); + dhe::fuzzy_logic::init(p); + dhe::gator::init(p); + dhe::ranger::init(p); + dhe::scannibal::init(p); + dhe::sequencizer::init(p); + dhe::swave::init(p); + dhe::tapers::init(p); + dhe::truth::init(p); + dhe::xycloid::init(p); + } +} + static void initStatic__DrumKit() { Plugin* const p = new Plugin; @@ -3116,6 +3152,7 @@ void initStaticPlugins() initStatic__cf(); initStatic__ChowDSP(); initStatic__dBiz(); + initStatic__DHE(); initStatic__DrumKit(); initStatic__EnigmaCurry(); initStatic__ESeries(); diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 9cf0016..af87b8c 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -74,6 +74,7 @@ enum DarkMode { kModeAudibleInstruments, kModeBidoo, kModeCf, + kModeDHE, kModeDrumKit, kModeESeries, kModeHetrickCV, @@ -226,6 +227,35 @@ static const struct { { kModeCf, "/cf/res/SUB.svg", {}, -1 }, { kModeCf, "/cf/res/trSEQ.svg", {}, -1 }, { kModeCf, "/cf/res/VARIABLE.svg", {}, -1 }, + // MIT + { kModeDHE, "/DHE-Modules/svg/blossom.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/booster-stage.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/buttons.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/cubic.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/curve-sequencer-4.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/curve-sequencer-8.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/curve-sequencer-16.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/func.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/func-6.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/fuzzy-logic-h.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/fuzzy-logic-z.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/gator.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/hostage.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/ranger.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/scannibal-4.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/scannibal-8.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/scannibal-16.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/sequencizer-4.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/sequencizer-8.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/sequencizer-16.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/stage.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/swave.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/tapers.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/truth-2.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/truth-3.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/truth-4.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/upstage.svg", {}, -1 }, + { kModeDHE, "/DHE-Modules/svg/xycloid.svg", {}, -1 }, // CC0-1.0 { kModeDrumKit, "/DrumKit/res/Baronial.svg", {}, -1 }, { kModeDrumKit, "/DrumKit/res/BD9.svg", {}, -1 }, @@ -611,6 +641,15 @@ static const struct { { kModeSonusmodular, "/sonusmodular/res/yabp.svg" }, }; +static inline +unsigned int darkerColor(const unsigned int color) noexcept +{ + return (color & 0xff000000) + | (std::max(0, ((color & 0xff0000) >> 16) - 0x80) << 16) + | (std::max(0, ((color & 0xff00) >> 8) - 0x80) << 8) + | (std::max(0, (color & 0xff) - 0x80)); +} + static inline unsigned int invertColor(const unsigned int color) noexcept { @@ -670,6 +709,10 @@ bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpai } } break; + // Special case for DHE, mark things darker instead of inverting + case kModeDHE: + paint.color = darkerColor(paint.color); + return true; // Special case for JW-Modules colors case kModeJW: switch (paint.color)