A few more details for mini variant

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-27 14:05:57 +00:00
parent b00e0f7c01
commit a53f15af77
12 changed files with 363 additions and 76 deletions

View file

@ -311,6 +311,11 @@ endif
PLUGIN_FILES += $(filter-out Fundamental/src/plugin.cpp,$(wildcard Fundamental/src/*.cpp))
PLUGIN_FILES += Fundamental/src/dr_wav.c
MINIPLUGIN_FILES += Fundamental/src/ADSR.cpp
MINIPLUGIN_FILES += Fundamental/src/LFO.cpp
MINIPLUGIN_FILES += Fundamental/src/VCF.cpp
MINIPLUGIN_FILES += Fundamental/src/VCO.cpp
# modules/types which are present in other plugins
FUNDAMENTAL_CUSTOM = $(DRWAV)
@ -1294,7 +1299,7 @@ endif
ifeq ($(NOPLUGINS),true)
TARGETS = noplugins$(TARGET_SUFFIX).a
else
TARGETS = plugins$(TARGET_SUFFIX).a plugins-mini.a
TARGETS = plugins$(TARGET_SUFFIX).a plugins-mini$(TARGET_SUFFIX).a
endif
all: $(TARGETS)
@ -1375,11 +1380,14 @@ JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/wavetables
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/windows.wt
endif
MINIPLUGIN_LIST = Cardinal
MINIRESOURCE_FILES = $(wildcard Cardinal/res/*.svg)
RESOURCE_FILES += Cardinal/res/Miku/Miku.png
MINIPLUGIN_LIST = Cardinal Fundamental
MINIRESOURCE_FILES = $(wildcard Cardinal/res/*.svg)
MINIRESOURCE_FILES += $(wildcard Fundamental/res/*.svg)
MINIRESOURCE_FILES += $(wildcard Fundamental/res/components/*.svg)
MINIRESOURCE_FILES += Fundamental/presets
# MOD builds only have LV2 main and FX variant
ifeq ($(MOD_BUILD),true)

View file

@ -23,11 +23,15 @@
// Cardinal (built-in)
#include "Cardinal/src/plugin.hpp"
// Fundamental
#include "Fundamental/src/plugin.hpp"
// known terminal modules
std::vector<Model*> hostTerminalModels;
// plugin instances
Plugin* pluginInstance__Cardinal;
Plugin* pluginInstance__Fundamental;
namespace rack {
@ -175,9 +179,47 @@ static void initStatic__Cardinal()
}
}
static void initStatic__Fundamental()
{
Plugin* const p = new Plugin;
pluginInstance__Fundamental = p;
const StaticPluginLoader spl(p, "Fundamental");
if (spl.ok())
{
p->addModel(modelADSR);
p->addModel(modelLFO);
p->addModel(modelVCF);
p->addModel(modelVCO);
spl.removeModule("VCO2");
spl.removeModule("VCA-1");
spl.removeModule("VCA");
spl.removeModule("LFO2");
spl.removeModule("Delay");
spl.removeModule("Mixer");
spl.removeModule("VCMixer");
spl.removeModule("8vert");
spl.removeModule("Mutes");
spl.removeModule("Pulses");
spl.removeModule("Scope");
spl.removeModule("SEQ3");
spl.removeModule("SequentialSwitch1");
spl.removeModule("SequentialSwitch2");
spl.removeModule("Octave");
spl.removeModule("Quantizer");
spl.removeModule("Split");
spl.removeModule("Merge");
spl.removeModule("Sum");
spl.removeModule("MidSide");
spl.removeModule("Noise");
spl.removeModule("Random");
}
}
void initStaticPlugins()
{
initStatic__Cardinal();
initStatic__Fundamental();
}
void destroyStaticPlugins()