From 7c1b55206dda9633731ba035eabe66605f8961e1 Mon Sep 17 00:00:00 2001 From: washikano Date: Thu, 25 Apr 2024 22:05:09 -0600 Subject: [PATCH 1/6] Preliminary work to add LOGinstruments --- .gitmodules | 3 +++ plugins/LOGinstruments | 1 + 2 files changed, 4 insertions(+) create mode 160000 plugins/LOGinstruments diff --git a/.gitmodules b/.gitmodules index 33b61a87..80b1edc7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -245,3 +245,6 @@ [submodule "plugins/Biset"] path = plugins/Biset url = https://github.com/gibbonjoyeux/VCV-Biset.git +[submodule "plugins/LOGinstruments"] + path = plugins/LOGinstruments + url = https://github.com/LOGUNIVPM/LOGinstruments.git diff --git a/plugins/LOGinstruments b/plugins/LOGinstruments new file mode 160000 index 00000000..1fc62faf --- /dev/null +++ b/plugins/LOGinstruments @@ -0,0 +1 @@ +Subproject commit 1fc62fafe66bd622432db895a09ef1e3afc4531c From 62bacc69acf291cfaf6ac5bfebed9fb48511df9d Mon Sep 17 00:00:00 2001 From: washikano Date: Fri, 26 Apr 2024 02:31:10 -0600 Subject: [PATCH 2/6] Add LOGinstruments to Makefile and plugins.cpp --- plugins/Makefile | 12 ++++++++++++ plugins/plugins.cpp | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index d929601b..330763fd 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -848,6 +848,11 @@ PLUGIN_FILES += $(filter-out LittleUtils/src/plugin.cpp,$(wildcard LittleUtils/s # modules/types which are present in other plugins LITTLEUTILS_CUSTOM = MsDisplayWidget +# -------------------------------------------------------------- +# LOGinstruments + +PLUGIN_FILES += $(filter-out LOGinstruments/src/LOGinstruments.cpp,$(wildcard LOGinstruments/src/*.cpp)) + # -------------------------------------------------------------- # LomasModules @@ -2508,6 +2513,13 @@ $(BUILD_DIR)/LittleUtils/%.cpp.o: LittleUtils/%.cpp $(foreach m,$(LITTLEUTILS_CUSTOM),$(call custom_module_names,$(m),LittleUtils)) \ -DpluginInstance=pluginInstance__LittleUtils +$(BUILD_DIR)/LOGinstruments/src/%.cpp.o: LOGinstruments/src/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(LOGINSTRUMENTS_CUSTOM),$(call custom_module_names,$(m),LOGinstruments)) \ + -DpluginInstance=pluginInstance__LOGinstruments + $(BUILD_DIR)/LomasModules/%.cpp.o: LomasModules/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 8b2d8344..b33b44dd 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -587,6 +587,10 @@ extern Model* modelDriftgen; extern Model* modelLooperOne; extern Model* modelLooperTwo; +// LOGinstruments +#include "LOGinstruments/src/kiss_fft.c" +#include "LOGinstruments/src/LOGinstruments.hpp" + // LomasModules #include "LomasModules/src/plugin.hpp" #undef DR_WAV_IMPLEMENTATION @@ -933,6 +937,7 @@ Plugin* pluginInstance__kocmoc; Plugin* pluginInstance__LifeFormModular; Plugin* pluginInstance__LilacLoop; Plugin* pluginInstance__LittleUtils; +Plugin* pluginInstance__LOGinstruments; Plugin* pluginInstance__Lomas; Plugin* pluginInstance__Lyrae; Plugin* pluginInstance__Meander; @@ -2551,6 +2556,21 @@ static void initStatic__LittleUtils() } } +static void initStatic__LOGinstruments() +{ + Plugin* const p = new Plugin; + pluginInstance__LOGinstruments = p; + + const StaticPluginLoader spl(p, "LOGinstruments"); + if (spl.ok()) + { + p->addModel(modelSpeck); + p->addModel(modelLessMess); + p->addModel(modelVelvet); + p->addModel(modelCrystal); + } +} + static void initStatic__Lomas() { Plugin* const p = new Plugin; @@ -3414,6 +3434,7 @@ void initStaticPlugins() initStatic__LifeFormModular(); initStatic__LilacLoop(); initStatic__LittleUtils(); + initStatic__LOGinstruments(); initStatic__Lomas(); initStatic__Lyrae(); initStatic__Meander(); From 7a7cfed6909e40f5cb2d271d7dded1311fef3549 Mon Sep 17 00:00:00 2001 From: washikano Date: Fri, 26 Apr 2024 02:31:50 -0600 Subject: [PATCH 3/6] Runtime darkmode for LOGinstruments --- src/custom/dep.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 14a1fc44..4f51c8d5 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -69,6 +69,7 @@ enum DarkMode { kModeJW, kModeLilacLoop, kModeLittleUtils, + kModeLOGinstruments, kModeKocmoc, kModeMyth, kModeNonlinearcircuits, @@ -315,6 +316,11 @@ static const struct { { kModeLittleUtils, "/LittleUtils/res/PulseGenerator.svg", {}, -1 }, { kModeLittleUtils, "/LittleUtils/res/TeleportIn.svg", {}, -1 }, { kModeLittleUtils, "/LittleUtils/res/TeleportOut.svg", {}, -1 }, + // BSD-3 Clause + { kModeLOGinstruments, "/LOGinstruments/res/crystal-nofonts.svg", {}, -1 }, + { kModeLOGinstruments, "/LOGinstruments/res/LessMess_nofonts.svg", {}, -1 }, + { kModeLOGinstruments, "/LOGinstruments/res/Speck_nofonts2.svg", {}, -1 }, + { kModeLOGinstruments, "/LOGinstruments/res/velvet-nofonts.svg", {}, -1 }, // GPL-3.0-or-later { kModeKocmoc, "/kocmoc/res/DDLY.svg", {}, -1 }, { kModeKocmoc, "/kocmoc/res/LADR.svg", {}, -1 }, @@ -654,6 +660,11 @@ bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpai paint.type = NSVG_PAINT_COLOR; paint.color = 0xff191919; return true; + // Special case for LOGinstruments gradient + case kModeLOGinstruments: + paint.gradient->stops[0].color = 0xd95c5c5c; // original color from stop 1 was copied to this stop and made ~25% darker + paint.gradient->stops[1].color = 0xd91f1f1f; // color was made ~75% darker + return false; // Special case for PathSet shifty gradient case kModePathSet: paint.gradient->stops[0].color = 0xff7c4919; // 50% darker than main blue @@ -762,6 +773,15 @@ bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpai return true; } break; + // Special case for LOGinstruments + case kModeLOGinstruments: + switch (paint.color) + { + // Don't change Speck scope color + case 0xff1a1a1a: + return false; + } + break; // Special case for Nonlinear Circuits case kModeNonlinearcircuits: switch (paint.color) From e3d99b5b8c4f058bdcfcebc8b01436898edf0e76 Mon Sep 17 00:00:00 2001 From: washikano Date: Fri, 26 Apr 2024 02:44:59 -0600 Subject: [PATCH 4/6] Upd docs and README.md --- README.md | 1 + docs/LICENSES.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 1cef9eab..f979a1fe 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ At the moment the following 3rd-party modules are provided: - [LifeFormModular](https://github.com/TimeControlledOrganism/LifeFormModular) - [Lilac Loop](https://grough.github.io/lilac-loop-vcv) - [Little Utils](https://github.com/mgunyho/Little-Utils) +- [LOGinstruments](https://github.com/LOGUNIVPM/LOGinstruments) - [Lomas Modules](https://github.com/LomasModules/LomasModules) - [Lyrae Modules](https://github.com/VegaDeftwing/LyraeModules) - [Meander](https://github.com/knchaffin/Meander) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 33e875ff..728c783e 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -59,6 +59,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | LifeFormModular | MIT | | | Lilac Loop | GPL-3.0-or-later | | | Little Utils | EUPL-1.2 | | +| LOGinstruments | BSD-3-Clause | | | Lomas Modules | GPL-3.0-or-later | | | Lyrae Modules | GPL-3.0-or-later | | | Meander | GPL-3.0-or-later | | @@ -204,6 +205,8 @@ Below is a list of artwork licenses from plugins | LittleUtils/fonts/CooperHewitt-*.ttf | OFL-1.1-RFN | | | LittleUtils/fonts/Overpass-*.ttf | OFL-1.1-RFN | | | LittleUtils/fonts/RobotoMono-*.ttf | Apache-2.0 | | +| LOGinstruments/* | BSD-3-Clause | No artwork specific license provided | +| LOGinstruments/DejaVuSansMono.ttf | Bitstream Vera | | | LomasModules/* | GPL-3.0-or-later | [Same license as source code](https://github.com/LomasModules/LomasModules/issues/26) | | LomasModules/Fonts/FiraMono-Bold.ttf | OFL-1.1-RFN | | | LyraeModules/* | CC-BY-NC-SA-4.0 | | From d746188616fcfef4d5c9cf8512a9c7795292363f Mon Sep 17 00:00:00 2001 From: washikano Date: Fri, 26 Apr 2024 23:42:10 -0600 Subject: [PATCH 5/6] Change build rules for LOGinstruments, removed kiss_fft from plugins.cpp --- plugins/Makefile | 3 ++- plugins/plugins.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 330763fd..4e9caad9 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -852,6 +852,7 @@ LITTLEUTILS_CUSTOM = MsDisplayWidget # LOGinstruments PLUGIN_FILES += $(filter-out LOGinstruments/src/LOGinstruments.cpp,$(wildcard LOGinstruments/src/*.cpp)) +PLUGIN_FILES += LOGinstruments/src/kiss_fft.c # -------------------------------------------------------------- # LomasModules @@ -2513,7 +2514,7 @@ $(BUILD_DIR)/LittleUtils/%.cpp.o: LittleUtils/%.cpp $(foreach m,$(LITTLEUTILS_CUSTOM),$(call custom_module_names,$(m),LittleUtils)) \ -DpluginInstance=pluginInstance__LittleUtils -$(BUILD_DIR)/LOGinstruments/src/%.cpp.o: LOGinstruments/src/%.cpp +$(BUILD_DIR)/LOGinstruments/src/%.o: LOGinstruments/src/% -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index b33b44dd..a52ff574 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -588,7 +588,6 @@ extern Model* modelLooperOne; extern Model* modelLooperTwo; // LOGinstruments -#include "LOGinstruments/src/kiss_fft.c" #include "LOGinstruments/src/LOGinstruments.hpp" // LomasModules From 28b9ab17053119abfd504e49bb5b80890dd9a0d1 Mon Sep 17 00:00:00 2001 From: washikano Date: Fri, 26 Apr 2024 23:45:38 -0600 Subject: [PATCH 6/6] Minor upd to dep.cpp --- src/custom/dep.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 4f51c8d5..fc998f64 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -662,8 +662,10 @@ bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpai return true; // Special case for LOGinstruments gradient case kModeLOGinstruments: - paint.gradient->stops[0].color = 0xd95c5c5c; // original color from stop 1 was copied to this stop and made ~25% darker - paint.gradient->stops[1].color = 0xd91f1f1f; // color was made ~75% darker + // original color from stop 1 was copied to this stop and made ~25% darker + paint.gradient->stops[0].color = 0xd95c5c5c; + // color was made ~75% darker + paint.gradient->stops[1].color = 0xd91f1f1f; return false; // Special case for PathSet shifty gradient case kModePathSet: