Add ZZC plugins

This commit is contained in:
falkTX 2021-11-24 22:47:51 +00:00
parent b1ce729dba
commit 4682417dbd
7 changed files with 64 additions and 1 deletions

3
.gitmodules vendored
View file

@ -73,3 +73,6 @@
[submodule "plugins/mscHack"]
path = plugins/mscHack
url = https://github.com/CardinalModules/mscHack.git
[submodule "plugins/ZZC"]
path = plugins/ZZC
url = https://github.com/zezic/ZZC.git

2
dpf

@ -1 +1 @@
Subproject commit 14423c5eec85b7ef1b5f997a9e27bfc48487c24f
Subproject commit d1892e151f4fdeeb93f23beaddd69df6b53edeca

View file

@ -535,6 +535,16 @@ VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob
PLUGIN_FILES += $(filter-out ZetaCarinaeModules/src/plugin.cpp,$(wildcard ZetaCarinaeModules/src/*.cpp))
# --------------------------------------------------------------
# ZZC
PLUGIN_FILES += $(filter-out ZZC/src/ZZC.cpp,$(wildcard ZZC/src/*.cpp))
PLUGIN_FILES += ZZC/src/dsp/Wavetable.cpp
PLUGIN_FILES += ZZC/src/filetypes/WavSupport.cpp
# modules/types which are present in other plugins
ZZC_CUSTOM = Clock LowFrequencyOscillator
# --------------------------------------------------------------
endif # !NOPLUGINS
@ -960,6 +970,13 @@ $(BUILD_DIR)/ZetaCarinaeModules/%.cpp.o: ZetaCarinaeModules/%.cpp
$(foreach m,$(ZETACARINAE_CUSTOM),$(call custom_module_names,$(m),ZetaCarinae)) \
-DpluginInstance=pluginInstance__ZetaCarinaeModules
$(BUILD_DIR)/ZZC/%.cpp.o: ZZC/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \
$(foreach m,$(ZZC_CUSTOM),$(call custom_module_names,$(m),ZZC)) \
-DpluginInstance=pluginInstance__ZZC
# --------------------------------------------------------------
-include $(PLUGIN_OBJS:%.o=%.d)

1
plugins/ZZC Submodule

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

View file

@ -295,6 +295,14 @@ extern Model *modelMaude_221;
// ZetaCarinaeModules
#include "ZetaCarinaeModules/src/plugin.hpp"
// ZZC
#define DISPLAYS_H
#define ZZC_SHARED_H
#define ZZC_WIDGETS_H
#define modelClock modelZZCClock
#include "ZZC/src/ZZC.hpp"
#undef modelClock
#endif // NOPLUGINS
// stuff that reads config files, we dont want that
@ -328,6 +336,7 @@ extern Plugin* pluginInstance__mscHack;
Plugin* pluginInstance__rackwindows;
Plugin* pluginInstance__ValleyAudio;
Plugin* pluginInstance__ZetaCarinaeModules;
Plugin* pluginInstance__ZZC;
#endif // NOPLUGINS
namespace rack {
@ -1218,6 +1227,28 @@ static void initStatic__ZetaCarinaeModules()
p->addModel(modelFirefly);
}
}
static void initStatic__ZZC()
{
Plugin* p = new Plugin;
pluginInstance__ZZC = p;
const StaticPluginLoader spl(p, "ZZC");
if (spl.ok())
{
#define modelClock modelZZCClock
p->addModel(modelClock);
p->addModel(modelDivider);
p->addModel(modelFN3);
p->addModel(modelSCVCA);
p->addModel(modelSH8);
p->addModel(modelSRC);
p->addModel(modelDiv);
p->addModel(modelDivExp);
p->addModel(modelPolygate);
#undef modelClock
}
}
#endif // NOPLUGINS
void initStaticPlugins()
@ -1245,6 +1276,7 @@ void initStaticPlugins()
initStatic__rackwindows();
initStatic__ValleyAudio();
initStatic__ZetaCarinaeModules();
initStatic__ZZC();
#endif // NOPLUGINS
}

1
plugins/res/ZZC Symbolic link
View file

@ -0,0 +1 @@
../ZZC/res

View file

@ -41,6 +41,15 @@ GLFWAPI const char* glfwGetClipboardString(GLFWwindow*) { return nullptr; }
GLFWAPI void glfwSetClipboardString(GLFWwindow*, const char*) {}
GLFWAPI int glfwGetKeyScancode(int) { return 0; }
GLFWAPI double glfwGetTime(void)
{
CardinalPluginContext* const context = static_cast<CardinalPluginContext*>(APP);
DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, 0.0);
DISTRHO_SAFE_ASSERT_RETURN(context->ui != nullptr, 0.0);
return context->ui->getApp().getTime();
}
GLFWAPI const char* glfwGetKeyName(const int key, int)
{
switch (key)