Add surgext

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-04 20:38:19 +00:00
parent 8efc6a45e0
commit 1ba43b195f
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
12 changed files with 371 additions and 3 deletions

View file

@ -919,6 +919,63 @@ PLUGIN_FILES += $(filter-out $(STOERMELDER_PACKONE_IGNORED:%=stoermelder-packone
STOERMELDER_PACKONE_CUSTOM = LongPressButton
STOERMELDER_PACKONE_CUSTOM_PER_FILE = InputLedDisplay IntermixEnvModule
# --------------------------------------------------------------
# surgext
PLUGIN_FILES += $(filter-out surgext/src/SurgeXT.cpp,$(wildcard surgext/src/*.cpp))
PLUGIN_FILES += surgext-helper/surgext-helper.cpp
# modules/types which are present in other plugins
SURGEXT_CUSTOM = HysteresisProcessing Patch SolverType Tunings Wavetable ghc clouds plaits stmlib
SURGEXT_FLAGS = $(filter-out -fsingle-precision-constant,$(filter-out -std=gnu++11,$(BUILD_CXX_FLAGS)))
SURGEXT_FLAGS += -std=gnu++17
SURGEXT_FLAGS += -DTIXML_USE_STL=1
SURGEXT_FLAGS += -Isurgext/surge/src/common \
-Isurgext/surge/src/common/dsp \
-Isurgext/surge/src/common/dsp/filters \
-Isurgext/surge/src/common/dsp/vembertech \
-Isurgext/surge/src/common/dsp/utilities \
-Isurgext/surge/src/common/dsp/oscillators \
-Isurgext/surge/src/common/dsp/modulators \
-Isurgext/surge/src/surge-testrunner \
-Isurgext/surge/libs/sst/sst-filters/include \
-Isurgext/surge/libs/sst/sst-cpputils/include \
-Isurgext/surge/libs/sst/sst-waveshapers/include \
-Isurgext/surge/libs/sst/sst-plugininfra/include \
-Isurgext/surge/libs/sst/sst-plugininfra/libs/tinyxml/include \
-Isurgext/surge/libs/sst/sst-plugininfra/libs/filesystem \
-Isurgext/surge/libs/fmt/include \
-Isurgext/surge/libs/LuaJitLib/LuaJIT/src \
-Isurgext/surge/libs/strnatcmp \
-Isurgext/surge/src/headless \
-Isurgext/surge/libs/tuning-library/include \
-I../deps/surge-build/libs/sst/sst-plugininfra/libs/filesystem/include \
-include limits \
-DSURGE_COMPILE_BLOCK_SIZE=8
ifneq ($(DEBUG),true)
SURGEXT_FLAGS += -DRELEASE=1
endif
ifeq ($(MACOS),true)
SURGEXT_FLAGS += -Wno-undefined-bool-conversion -Wno-unused-variable -Wno-reorder -Wno-char-subscripts -Wno-sign-compare -Wno-ignored-qualifiers -Wno-c++17-extensions -Wno-unused-private-field
SURGEXT_FLAGS += -DMAC
else ifeq ($(WINDOWS),true)
SURGEXT_FLAGS += -Wno-suggest-override -Wno-sign-compare -Wno-ignored-qualifiers -Wno-unused-variable -Wno-char-subscripts -Wno-reorder -Wno-int-in-bool-context
SURGEXT_FLAGS += -DWINDOWS
SURGEXT_FLAGS += -DSKIP_MINGW_FORMAT
else
SURGEXT_FLAGS += -Wno-unused-value -Wno-suggest-override -Wno-implicit-fallthrough -Wno-ignored-qualifiers
SURGEXT_FLAGS += -Wno-nonnull-compare -Wno-sign-compare -Wno-char-subscripts -Wno-unused-variable -Wno-unused-but-set-variable -Wno-reorder -Wno-multichar
SURGEXT_FLAGS += -DLINUX
SURGEXT_FLAGS += -Isurge/src/linux
endif
SURGEXT_FLAGS += -DSURGE_RACK_BASE_VERSION=XT1-0-1
SURGEXT_FLAGS += -DSURGE_RACK_PLUG_VERSION=Cardinal
SURGEXT_FLAGS += -DSURGE_RACK_SURGE_VERSION=Cardinal
# --------------------------------------------------------------
# unless_modules
@ -1197,6 +1254,7 @@ all: $(TARGET)
clean:
rm -f $(TARGET)
rm -rf $(BUILD_DIR)
rm -rf surgext/build
# --------------------------------------------------------------
@ -1223,6 +1281,8 @@ RESOURCE_FILES = \
$(wildcard */res/*.svg) \
$(wildcard */res/*/*.svg) \
$(wildcard */res/*/*/*.svg) \
$(wildcard */res/*/*/*/*.svg) \
$(wildcard */res/*/*/*/*/*.svg) \
$(wildcard */res/*.otf) \
$(wildcard */res/*/*.otf) \
$(wildcard */res/*/*/*.otf) \
@ -1247,10 +1307,21 @@ RESOURCE_FILES += Meander/res
RESOURCE_FILES += Mog/res
RESOURCE_FILES += nonlinearcircuits/res
RESOURCE_FILES += ParableInstruments/res/Neil.png
RESOURCE_FILES += surgext/build/surge-data/configuration.xml
RESOURCE_FILES += surgext/build/surge-data/fx_presets
RESOURCE_FILES += surgext/build/surge-data/wavetables
RESOURCE_FILES += surgext/build/surge-data/windows.wt
RESOURCE_FILES += surgext/patches
RESOURCE_FILES += $(wildcard surgext/res/xt/fonts/quicksand/*.ttf)
RESOURCE_FILES += $(wildcard unless_modules/art/*.art)
RESOURCE_FILES += $(wildcard unless_modules/art/svg/*/*.svg)
RESOURCE_FILES += $(wildcard unless_modules/font/*.ttf)
# RESOURCE_FILES += $(wildcard unless_modules/manual/*)
JACK_RESOURCES = $(CURDIR)/surgext/build/surge-data/configuration.xml
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/fx_presets
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/wavetables
JACK_RESOURCES += $(CURDIR)/surgext/build/surge-data/windows.wt
endif
RESOURCE_FILES += Cardinal/res/Miku/Miku.png
@ -1305,7 +1376,7 @@ VST3_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.vst3/Contents/Resource
endif
resources: $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES) $(CLAP_RESOURCES)
resources: $(JACK_RESOURCES) $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES) $(CLAP_RESOURCES)
../bin/Cardinal.lv2/resources/%: %
-@mkdir -p "$(shell dirname $@)"
@ -1427,6 +1498,23 @@ else
$(SILENT)ln -sf $(abspath $<) $@
endif
%/surgext/build/surge-data/configuration.xml: surgext/surge/resources/surge-shared/configuration.xml
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@
%/surgext/build/surge-data/fx_presets:
-@mkdir -p "$@"
cp -R surgext/surge/resources/data/fx_presets/* $@/
cp -R surgext/res/surge_extra_data/fx_presets/* $@/
%/surgext/build/surge-data/wavetables: surgext/surge/resources/data/wavetables
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@
%/surgext/build/surge-data/windows.wt: surgext/surge/resources/surge-shared/windows.wt
-@mkdir -p "$(shell dirname $@)"
$(SILENT)ln -sf $(abspath $<) $@
# --------------------------------------------------------------
# Build commands
@ -2048,6 +2136,13 @@ $(BUILD_DIR)/stocaudio/%.cpp.o: stocaudio/%.cpp
$(foreach m,$(STOCAUDIO_CUSTOM),$(call custom_module_names,$(m),stocaudio)) \
-DpluginInstance=pluginInstance__stocaudio
$(BUILD_DIR)/surgext%.cpp.o: surgext%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(SURGEXT_FLAGS) -c -o $@ \
$(foreach m,$(SURGEXT_CUSTOM),$(call custom_module_names,$(m),surgext)) \
-DpluginInstance=pluginInstance__surgext
$(BUILD_DIR)/unless_modules/%.cpp.o: unless_modules/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"

View file

@ -736,6 +736,11 @@ StoermelderSettings pluginSettings;
void StoermelderSettings::saveToJson() {}
void StoermelderSettings::readFromJson() {}
// surgext
#include "surgext/src/SurgeXT.h"
void surgext_rack_initialize();
void surgext_rack_update_theme();
// unless_modules
#include "unless_modules/src/unless.hpp"
@ -848,6 +853,7 @@ Plugin* pluginInstance__repelzen;
Plugin* pluginInstance__sonusmodular;
Plugin* pluginInstance__stocaudio;
extern Plugin* pluginInstance__stoermelder_p1;
Plugin* pluginInstance__surgext;
Plugin* pluginInstance__unless_modules;
Plugin* pluginInstance__ValleyAudio;
Plugin* pluginInstance__Voxglitch;
@ -2840,6 +2846,64 @@ static void initStatic__stoermelder_p1()
}
}
static void initStatic__surgext()
{
Plugin* const p = new Plugin;
pluginInstance__surgext = p;
const StaticPluginLoader spl(p, "surgext");
if (spl.ok())
{
p->addModel(modelVCOClassic);
p->addModel(modelVCOModern);
p->addModel(modelVCOWavetable);
p->addModel(modelVCOWindow);
p->addModel(modelVCOSine);
p->addModel(modelVCOFM2);
p->addModel(modelVCOFM3);
p->addModel(modelVCOSHNoise);
p->addModel(modelVCOAlias);
p->addModel(modelVCOString);
p->addModel(modelVCOTwist);
// Add the ported ones
p->addModel(modelSurgeVCF);
p->addModel(modelSurgeDelay);
p->addModel(modelSurgeDelayLineByFreq);
p->addModel(modelSurgeWaveshaper);
p->addModel(modelSurgeLFO);
p->addModel(modelSurgeMixer);
p->addModel(modelSurgeModMatrix);
p->addModel(modelFXReverb);
p->addModel(modelFXPhaser);
p->addModel(modelFXRotarySpeaker);
p->addModel(modelFXDistortion);
p->addModel(modelFXFrequencyShifter);
p->addModel(modelFXChorus);
p->addModel(modelFXVocoder);
p->addModel(modelFXReverb2);
p->addModel(modelFXFlanger);
p->addModel(modelFXRingMod);
p->addModel(modelFXNeuron);
p->addModel(modelFXResonator);
p->addModel(modelFXChow);
p->addModel(modelFXExciter);
p->addModel(modelFXEnsemble);
p->addModel(modelFXCombulator);
p->addModel(modelFXSpringReverb);
p->addModel(modelFXTreeMonster);
/* v2.1 modules
p->addModel(modelEGxVCA);
p->addModel(modelQuadAD);
p->addModel(modelQuadLFO);
*/
surgext_rack_initialize();
}
}
static void initStatic__unless_modules()
{
Plugin* const p = new Plugin;
@ -3038,7 +3102,8 @@ void initStaticPlugins()
initStatic__repelzen();
initStatic__sonusmodular();
initStatic__stocaudio();
initStatic__stoermelder_p1(),
initStatic__stoermelder_p1();
initStatic__surgext();
initStatic__unless_modules();
initStatic__ValleyAudio();
initStatic__Voxglitch();
@ -3077,6 +3142,10 @@ void updateStaticPluginsDarkMode()
{
gtg_default_theme = darkMode ? 1 : 0;
}
// surgext
{
surgext_rack_update_theme();
}
#endif
}

1
plugins/surgext Submodule

@ -0,0 +1 @@
Subproject commit 1475b73ba29189ac6e294bf6d27a39443b584fa6

View file

@ -0,0 +1,31 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
*
* 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.
*/
#include "../surgext/src/XTStyle.h"
using namespace sst::surgext_rack::style;
void surgext_rack_initialize()
{
XTStyle::initialize();
}
void surgext_rack_update_theme()
{
XTStyle::setGlobalStyle(rack::settings::darkMode ? XTStyle::Style::DARK : XTStyle::Style::LIGHT);
XTStyle::notifyStyleListeners();
}