adding Nonlinear Circuits (#180)

This commit is contained in:
dreamer 2022-02-26 17:25:29 +01:00 committed by GitHub
parent 3b9ecb114f
commit 991867b9cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 86 additions and 0 deletions

3
.gitmodules vendored
View file

@ -181,3 +181,6 @@
[submodule "plugins/MSM"]
path = plugins/MSM
url = https://github.com/netboy3/MSM-vcvrack-plugin.git
[submodule "plugins/nonlinearcircuits"]
path = plugins/nonlinearcircuits
url = https://github.com/mhetrick/nonlinearcircuits.git

View file

@ -145,6 +145,7 @@ At the moment the following 3rd-party modules are provided:
- Mog
- mscHack
- MSM
- Nonlinear Circuits
- Orbits
- Path Set
- Prism

View file

@ -56,6 +56,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 |
| Nonlinear Circuits | CC0-1.0 | |
| Orbits | GPL-3.0-or-later | |
| Path Set | GPL-3.0-or-later | |
| Prism | BSD-3-Clause | |
@ -168,6 +169,8 @@ 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 | |
| nonlinearcircuits/* | CC0-1.0 | No artwork specific license provided |
| nonlinearcircuits/Audiowide-Regular.ttf | OFL-1.1-RFN | |
| Orbits/* | CC-BY-NC-ND-4.0 | |
| Orbits/fonts/ShareTechMono-Regular.ttf | OFL-1.1-RFN | |
| PathSet/* | GPL-3.0-or-later | No artwork specific license provided |

View file

@ -689,6 +689,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
# --------------------------------------------------------------
# Nonlinear Circuits
PLUGIN_FILES += $(filter-out nonlinearcircuits/src/NLC.cpp,$(wildcard nonlinearcircuits/src/*.cpp))
# --------------------------------------------------------------
# Orbits
@ -1581,6 +1586,13 @@ $(BUILD_DIR)/MSM/%.cpp.o: MSM/%.cpp
-DpluginInstance=pluginInstance__MSM \
-DDARKTHEME
$(BUILD_DIR)/nonlinearcircuits/%.cpp.o: nonlinearcircuits/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \
$(foreach m,$(NONLINEARCIRCUITS_CUSTOM),$(call custom_module_names,$(m),nonlinearcircuits)) \
-DpluginInstance=pluginInstance__nonlinearcircuits
$(BUILD_DIR)/Orbits/%.cpp.o: Orbits/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"

@ -0,0 +1 @@
Subproject commit d7c3763ba3f801a3cfe98c49dfb7419a1477fd46

View file

@ -610,6 +610,9 @@ extern Model* modelBlankPanel;
#undef modelVCA
#undef modelVCO
// Nonlinear Circuits
#include "nonlinearcircuits/src/NLC.hpp"
// Orbits
#include "Orbits/src/plugin.hpp"
@ -735,6 +738,7 @@ Plugin* pluginInstance__MockbaModular;
Plugin* pluginInstance__Mog;
extern Plugin* pluginInstance__mscHack;
Plugin* pluginInstance__MSM;
Plugin* pluginInstance__nonlinearcircuits;
Plugin* pluginInstance__Orbits;
Plugin* pluginInstance__PathSet;
Plugin* pluginInstance__Prism;
@ -2215,6 +2219,30 @@ static void initStatic__MSM()
}
}
static void initStatic__nonlinearcircuits()
{
Plugin* const p = new Plugin;
pluginInstance__nonlinearcircuits = p;
const StaticPluginLoader spl(p, "nonlinearcircuits");
if (spl.ok())
{
p->addModel(model4Seq);
p->addModel(modelCipher);
p->addModel(modelBOOLs);
p->addModel(modelDivideConquer);
p->addModel(modelDivineCMOS);
p->addModel(modelDoubleNeuron);
p->addModel(modelGenie);
p->addModel(modelLetsSplosh);
p->addModel(modelNeuron);
p->addModel(modelNumberwang);
p->addModel(modelSegue);
p->addModel(modelSquidAxon);
p->addModel(modelStatues);
}
}
static void initStatic__Orbits()
{
Plugin* const p = new Plugin;
@ -2494,6 +2522,7 @@ void initStaticPlugins()
initStatic__Mog();
initStatic__mscHack();
initStatic__MSM();
initStatic__nonlinearcircuits();
initStatic__Orbits();
initStatic__PathSet();
initStatic__Prism();

View file

@ -265,6 +265,20 @@ static const struct {
{ "/kocmoc/res/SKF.svg", {}, -1 },
{ "/kocmoc/res/SVF.svg", {}, -1 },
{ "/kocmoc/res/TRG.svg", {}, -1 },
// CC0-1.0
{ "/nonlinearcircuits/res/NLC - 4seq.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - 8 BIT CIPHER.svg", {}, -1 },
{ "/nonlinearcircuits/res/BOOLs2.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - DIVIDE & CONQUER.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - DIVINE CMOS.svg", {}, -1 },
{ "/nonlinearcircuits/res/DoubleNeuronRef.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - GENiE.svg", {}, -1 },
{ "/nonlinearcircuits/res/LetsSplosh.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - NEURON.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - NUMBERWANG.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 },
{ "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 },
{ "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 },
// GPL-3.0-or-later
{ "/PathSet/res/AstroVibe.svg", {}, -1 },
{ "/PathSet/res/IceTray.svg", {}, -1 },
@ -365,6 +379,29 @@ static inline bool invertPaint(NSVGshape* const shape, NSVGpaint& paint, const c
}
}
// Special case for Nonlinear Circuits
if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/nonlinearcircuits/", 19) == 0)
{
switch (paint.color)
{
case 0xff9a7900:
case 0xff96782c:
case 0xff6a07ae:
case 0xffcf8044:
case 0xff2ac6ba:
case 0xff5ba85c:
case 0xffa97b00:
case 0xff9f7a00:
case 0xffff7300:
case 0xffa47b00:
case 0xffb09423:
return false;
case 0xffffffff:
paint.color = 0x00000000;
return true;
}
}
// Special case for PathSet colors
if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/PathSet/", 9) == 0)
{