| @@ -5,7 +5,7 @@ body: | |||
| id: version | |||
| attributes: | |||
| label: Version | |||
| value: "24.04" | |||
| value: "24.05" | |||
| validations: | |||
| required: true | |||
| - type: dropdown | |||
| @@ -504,6 +504,7 @@ jobs: | |||
| - name: Build linux (LTO) | |||
| run: | | |||
| make features | |||
| make WITH_LTO=true -j $(nproc) mini | |||
| make WITH_LTO=true -j $(nproc) native | |||
| sysdeps: | |||
| @@ -248,3 +248,9 @@ | |||
| [submodule "plugins/PdArray"] | |||
| path = plugins/PdArray | |||
| url = https://github.com/mgunyho/PdArray.git | |||
| [submodule "deps/JUCE"] | |||
| path = deps/JUCE | |||
| url = https://github.com/CardinalModules/JUCE.git | |||
| [submodule "plugins/rcm-modules"] | |||
| path = plugins/rcm-modules | |||
| url = https://github.com/Rcomian/rcm-modules.git | |||
| @@ -15,7 +15,7 @@ include $(ROOT)/Makefile.base.mk | |||
| # src/CardinalPlugin.cpp `getVersion` | |||
| # utils/macOS/Info_{JACK,Native}.plist | |||
| # .github/ISSUE_TEMPLATE/bug.yaml src/CardinalCommon.cpp src/CardinalPlugin.cpp utils/macOS/Info_{JACK,Native}.plist | |||
| VERSION = 24.04 | |||
| VERSION = 24.05 | |||
| # -------------------------------------------------------------- | |||
| # Build targets | |||
| @@ -192,6 +192,12 @@ plugins: deps | |||
| resources: | |||
| $(MAKE) resources -C plugins | |||
| mini-plugins: deps | |||
| $(MAKE) mini -C plugins | |||
| mini-resources: | |||
| $(MAKE) mini-resources -C plugins | |||
| ifneq ($(CROSS_COMPILING),true) | |||
| gen: cardinal resources dpf/utils/lv2_ttl_generator | |||
| @$(CURDIR)/dpf/utils/generate-ttl.sh | |||
| @@ -211,9 +217,12 @@ jack: carla deps dgl plugins resources | |||
| native: carla deps dgl plugins resources | |||
| $(MAKE) native -C src $(CARLA_EXTRA_ARGS) | |||
| mini: carla deps dgl plugins resources | |||
| mini: carla deps dgl mini-plugins mini-resources | |||
| $(MAKE) mini -C src $(CARLA_EXTRA_ARGS) | |||
| au: carla deps dgl plugins resources | |||
| $(MAKE) au -C src $(CARLA_EXTRA_ARGS) | |||
| clap: carla deps dgl plugins resources | |||
| $(MAKE) clap -C src $(CARLA_EXTRA_ARGS) | |||
| @@ -21,6 +21,7 @@ export DISTRHO_NAMESPACE = CardinalDISTRHO | |||
| export DGL_NAMESPACE = CardinalDGL | |||
| export NVG_DISABLE_SKIPPING_WHITESPACE = true | |||
| export NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST | |||
| export USE_FILE_BROWSER = true | |||
| export USE_NANOVG_FBO = true | |||
| export WASM_EXCEPTIONS = true | |||
| export WINDOWS_ICON_ID = 401 | |||
| @@ -33,6 +34,7 @@ DGL_EXTRA_ARGS = \ | |||
| DGL_NAMESPACE=$(DGL_NAMESPACE) \ | |||
| NVG_DISABLE_SKIPPING_WHITESPACE=$(NVG_DISABLE_SKIPPING_WHITESPACE) \ | |||
| NVG_FONT_TEXTURE_FLAGS=$(NVG_FONT_TEXTURE_FLAGS) \ | |||
| USE_FILE_BROWSER=$(USE_FILE_BROWSER) \ | |||
| USE_NANOVG_FBO=$(USE_NANOVG_FBO) \ | |||
| WASM_EXCEPTIONS=$(WASM_EXCEPTIONS) \ | |||
| WINDOWS_ICON_ID=$(WINDOWS_ICON_ID) \ | |||
| @@ -135,6 +135,7 @@ At the moment the following 3rd-party modules are provided: | |||
| - [Bacon Music](https://github.com/baconpaul/BaconPlugs) | |||
| - [Befaco](https://github.com/VCVRack/Befaco) | |||
| - [Bidoo](https://github.com/sebastien-bouffier/Bidoo) | |||
| - [Biset](https://github.com/gibbonjoyeux/VCV-Biset) | |||
| - [Bogaudio](https://github.com/bogaudio/BogaudioModules) | |||
| - [Catro/Modulo](https://github.com/catronomix/catro-modulo) | |||
| - [cf](https://github.com/cfoulc/cf) | |||
| @@ -182,6 +183,7 @@ At the moment the following 3rd-party modules are provided: | |||
| - [PinkTrombone](https://github.com/VegaDeftwing/PinkTromboneVCV) | |||
| - [Prism](https://github.com/SteveRussell33/Prism) | |||
| - [rackwindows](https://github.com/n0jo/rackwindows) | |||
| - [RCM](https://github.com/Rcomian/rcm-modules/) | |||
| - [RebelTech](https://github.com/hemmer/rebel-tech-vcv) | |||
| - [repelzen](https://github.com/wiqid/repelzen) | |||
| - [Sapphire](https://github.com/cosinekitty/sapphire) | |||
| @@ -1 +1 @@ | |||
| Subproject commit 3c7d0e7b914d38a32b733cc5ced0b5696d2f9a03 | |||
| Subproject commit c37d53a4216654118e711fa41e88e7e801d5bd9b | |||
| @@ -0,0 +1 @@ | |||
| Subproject commit 4aaa2a7f4c83bd9807070825fbccd9d6d582e34d | |||
| @@ -266,8 +266,8 @@ ifeq ($(CPU_I386),true) | |||
| SURGE_CXX_FLAGS += -D__sigemptyset=sigemptyset | |||
| endif | |||
| # use custom JUCE from DISTRHO and Carla | |||
| SURGE_CXX_FLAGS += -I$(abspath ../carla/source/modules) | |||
| # use custom JUCE | |||
| SURGE_CXX_FLAGS += -I$(abspath ../deps/JUCE/modules) | |||
| # possibly use fftw? | |||
| # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) | |||
| @@ -298,7 +298,7 @@ $(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt | |||
| -DSURGE_SKIP_JUCE_FOR_RACK=TRUE \ | |||
| -DSURGE_SKIP_LUA=TRUE \ | |||
| -DSURGE_SKIP_ODDSOUND_MTS=TRUE \ | |||
| -DSURGE_JUCE_PATH=$(abspath ../carla/source) \ | |||
| -DSURGE_JUCE_PATH=$(abspath ../deps/JUCE) \ | |||
| -DSURGE_SIMDE_PATH=$(abspath ../src/Rack/dep/simde) \ | |||
| $(SURGE_SRC_PATH) | |||
| @@ -77,6 +77,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | |||
| | PinkTrombone | GPL-3.0-or-later | | | |||
| | Prism | BSD-3-Clause | | | |||
| | Rackwindows | MIT | | | |||
| | RCM | GPL-2.0-or-later | | | |||
| | repelzen | GPL-3.0-or-later | | | |||
| | RebelTech | GPL-2.0-or-later | | | |||
| | Sapphire | GPL-3.0-or-later | | | |||
| @@ -240,6 +241,7 @@ Below is a list of artwork licenses from plugins | |||
| | Prism/* | CC-BY-SA-4.0 | | | |||
| | Prism/RobotoCondensed-Regular.ttf | Apache-2.0 | | | |||
| | Rackwindows/* | MIT | [Same license as source code](https://github.com/n0jo/rackwindows/issues/15) | | |||
| | RCM/* | GPL-2.0-or-later | No artwork specific license provided | | |||
| | repelzen/* | CC-BY-SA-4.0 | | | |||
| | RebelTech/* | CC-BY-NC-4.0 | | | |||
| | Sapphire/* | GPL-3.0-or-later | No artwork specific license provided | | |||
| @@ -1 +1 @@ | |||
| Subproject commit 01aca7649c1a3a5ee20a47c5ecd3cb2e29395f89 | |||
| Subproject commit 8f10cdc4f11a256f597fc39a7ac6de38a28cef57 | |||
| @@ -89,16 +89,12 @@ struct CardinalPluginContext : rack::Context { | |||
| const CardinalDISTRHO::MidiEvent* midiEvents; | |||
| uint32_t midiEventCount; | |||
| CardinalDISTRHO::Plugin* const plugin; | |||
| #ifndef HEADLESS | |||
| CardinalDGL::NanoTopLevelWidget* tlw; | |||
| CardinalDISTRHO::UI* ui; | |||
| #endif | |||
| CardinalPluginContext(CardinalDISTRHO::Plugin* const p); | |||
| void writeMidiMessage(const rack::midi::Message& message, uint8_t channel); | |||
| #ifndef HEADLESS | |||
| bool addIdleCallback(IdleCallback* cb) const; | |||
| void removeIdleCallback(IdleCallback* cb) const; | |||
| #endif | |||
| }; | |||
| #ifndef HEADLESS | |||
| @@ -439,6 +439,7 @@ struct AidaPluginModule : Module { | |||
| model = newmodel.release(); | |||
| // if processing, wait for process cycle to complete | |||
| using DISTRHO_NAMESPACE::d_msleep; | |||
| while (oldmodel != nullptr && activeModel.load()) | |||
| d_msleep(1); | |||
| @@ -629,11 +629,11 @@ struct IldaeilModule : Module { | |||
| CarlaEngine* const engine = carla_get_engine_from_handle(fCarlaHostHandle); | |||
| water::XmlDocument xml(projectState); | |||
| water::XmlDocument xmlState{water::String(projectState)}; | |||
| { | |||
| const MutexLocker cml(sPluginInfoLoadMutex); | |||
| engine->loadProjectInternal(xml, true); | |||
| engine->loadProjectInternal(xmlState, true); | |||
| } | |||
| projectLoadedFromDSP(fUI); | |||
| @@ -1664,7 +1664,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { | |||
| // save plugin info into cache | |||
| if (sha1sum != nullptr) | |||
| { | |||
| const water::String configDir(asset::config("Ildaeil")); | |||
| const String configDir(asset::config("Ildaeil").c_str()); | |||
| const water::File cacheFile(configDir + CARLA_OS_SEP_STR "cache" CARLA_OS_SEP_STR + sha1sum); | |||
| if (cacheFile.create().ok()) | |||
| @@ -1755,7 +1755,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { | |||
| if (sha1sum == nullptr) | |||
| return false; | |||
| const water::String configDir(asset::config("Ildaeil")); | |||
| const String configDir(asset::config("Ildaeil").c_str()); | |||
| const water::File cacheFile(configDir + CARLA_OS_SEP_STR "cache" CARLA_OS_SEP_STR + sha1sum); | |||
| if (cacheFile.existsAsFile()) | |||
| @@ -1002,6 +1002,16 @@ PRISM_CUSTOM = bogaudio Scale | |||
| PLUGIN_FILES += $(filter-out rackwindows/src/plugin.cpp,$(wildcard rackwindows/src/*.cpp)) | |||
| # -------------------------------------------------------------- | |||
| # RCM | |||
| PLUGIN_FILES += $(filter-out rcm-modules/src/plugin.cpp,$(wildcard rcm-modules/src/*.cpp)) | |||
| PLUGIN_FILES += $(wildcard rcm-modules/src/*.c) | |||
| PLUGIN_FILES += $(wildcard rcm-modules/src/PianoRoll/*.cpp) | |||
| # modules/types which are present in other plugins | |||
| RCM_CUSTOM = Transport | |||
| # -------------------------------------------------------------- | |||
| # RebelTech | |||
| @@ -1405,6 +1415,11 @@ ifneq ($(HEADLESS),true) | |||
| $(MAKE) HEADLESS=true plugins-mini-headless.a | |||
| endif | |||
| mini: plugins-mini$(TARGET_SUFFIX).a | |||
| ifneq ($(HEADLESS),true) | |||
| $(MAKE) HEADLESS=true plugins-mini-headless.a | |||
| endif | |||
| clean: | |||
| rm -f *.a | |||
| rm -rf $(BUILD_DIR) | |||
| @@ -1691,6 +1706,7 @@ MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-14.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-16.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/components/mod-button.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/components/port.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/panels/fx/BlankNoDisplay.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/EGLFO.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Matrix.svg | |||
| MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Mixer.svg | |||
| @@ -1793,31 +1809,37 @@ MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_7.svg | |||
| # MOD builds only have LV2 main and FX variant | |||
| ifeq ($(MOD_BUILD),true) | |||
| LV2_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.lv2/resources/PluginManifests/%.json) | |||
| MINI_RESOURCES = $(MINIPLUGIN_LIST:%=../bin/CardinalMini.lv2/resources/PluginManifests/%.json) | |||
| MINI_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) | |||
| LV2_RESOURCES = $(MINI_RESOURCES) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalFX.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(MINIPLUGIN_LIST:%=../bin/CardinalMini.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.lv2/resources/%) | |||
| LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.lv2/resources/%) | |||
| LV2_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) | |||
| # MOD builds only have LV2 FX variant for now | |||
| else ifeq ($(WASM),true) | |||
| LV2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalNative.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(MINIPLUGIN_LIST:%=../bin/CardinalMini.lv2/resources/PluginManifests/%.json) | |||
| MINI_RESOURCES = $(MINIPLUGIN_LIST:%=../bin/CardinalMini.lv2/resources/PluginManifests/%.json) | |||
| MINI_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) | |||
| LV2_RESOURCES = $(MINI_RESOURCES) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalNative.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalNative.lv2/resources/%) | |||
| LV2_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) | |||
| else | |||
| LV2_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalFX.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(MINIPLUGIN_LIST:%=../bin/CardinalMini.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) | |||
| LV2_RESOURCES = $(MINI_RESOURCES) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalFX.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.lv2/resources/PluginManifests/%.json) | |||
| LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.lv2/resources/%) | |||
| LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.lv2/resources/%) | |||
| LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.lv2/resources/%) | |||
| LV2_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) | |||
| ifeq ($(MACOS),true) | |||
| VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalFX.vst/Contents/Resources/PluginManifests/%.json) | |||
| @@ -1848,6 +1870,8 @@ endif | |||
| resources: $(JACK_RESOURCES) $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES) $(CLAP_RESOURCES) | |||
| mini-resources: $(MINI_RESOURCES) | |||
| ../bin/Cardinal.lv2/resources/%: % | |||
| -@mkdir -p "$(shell dirname $@)" | |||
| $(SILENT)ln -sf $(abspath $<) $@ | |||
| @@ -2667,6 +2691,19 @@ $(BUILD_DIR)/rackwindows/%.cpp.o: rackwindows/%.cpp | |||
| -Wno-implicit-fallthrough \ | |||
| -Wno-sign-compare | |||
| $(BUILD_DIR)/rcm-modules/%.c.o: rcm-modules/%.c | |||
| -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" | |||
| @echo "Compiling $<" | |||
| $(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@ \ | |||
| $(foreach m,$(RCM_CUSTOM),$(call custom_module_names,$(m),RCM)) | |||
| $(BUILD_DIR)/rcm-modules/%.cpp.o: rcm-modules/%.cpp | |||
| -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" | |||
| @echo "Compiling $<" | |||
| $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ | |||
| $(foreach m,$(RCM_CUSTOM),$(call custom_module_names,$(m),RCM)) \ | |||
| -DpluginInstance=pluginInstance__RCM | |||
| $(BUILD_DIR)/RebelTech/%.cpp.o: RebelTech/%.cpp | |||
| -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" | |||
| @echo "Compiling $<" | |||
| @@ -575,6 +575,7 @@ static void initStatic__surgext() | |||
| spl.removeModule("SurgeXTDigitalRingMod"); | |||
| spl.removeModule("SurgeXTVCF"); | |||
| p->addModel(modelFXNimbus); | |||
| spl.removeModule("SurgeXTFXBonsai"); | |||
| spl.removeModule("SurgeXTFXChorus"); | |||
| spl.removeModule("SurgeXTFXChow"); | |||
| @@ -586,7 +587,6 @@ static void initStatic__surgext() | |||
| spl.removeModule("SurgeXTFXFlanger"); | |||
| spl.removeModule("SurgeXTFXFrequencyShifter"); | |||
| spl.removeModule("SurgeXTFXNeuron"); | |||
| spl.removeModule("SurgeXTFXNimbus"); | |||
| spl.removeModule("SurgeXTFXPhaser"); | |||
| spl.removeModule("SurgeXTFXResonator"); | |||
| spl.removeModule("SurgeXTFXReverb"); | |||
| @@ -796,6 +796,9 @@ extern Model* modelBlankPanel; | |||
| // rackwindows | |||
| #include "rackwindows/src/plugin.hpp" | |||
| // RCM | |||
| #include "rcm-modules/src/plugin.hpp" | |||
| // RebelTech | |||
| #define BefacoInputPort BefacoInputPortRebelTech | |||
| #define BefacoOutputPort BefacoOutputPortRebelTech | |||
| @@ -961,6 +964,7 @@ Plugin* pluginInstance__PdArray; | |||
| Plugin* pluginInstance__PinkTrombone; | |||
| Plugin* pluginInstance__Prism; | |||
| Plugin* pluginInstance__rackwindows; | |||
| Plugin* pluginInstance__RCM; | |||
| Plugin* pluginInstance__RebelTech; | |||
| Plugin* pluginInstance__repelzen; | |||
| Plugin* pluginInstance__sapphire; | |||
| @@ -2996,6 +3000,28 @@ static void initStatic__rackwindows() | |||
| } | |||
| } | |||
| static void initStatic__RCM() | |||
| { | |||
| Plugin* const p = new Plugin; | |||
| pluginInstance__RCM = p; | |||
| const StaticPluginLoader spl(p, "rcm-modules"); | |||
| if (spl.ok()) | |||
| { | |||
| p->addModel(modelGVerbModule); | |||
| p->addModel(modelCV0to10Module); | |||
| p->addModel(modelCVS0to10Module); | |||
| p->addModel(modelCV5to5Module); | |||
| p->addModel(modelCVMmtModule); | |||
| p->addModel(modelCVTglModule); | |||
| p->addModel(modelPianoRollModule); | |||
| p->addModel(modelDuckModule); | |||
| p->addModel(modelSEQAdapterModule); | |||
| p->addModel(modelSyncModule); | |||
| p->addModel(modelPolyNosModule); | |||
| } | |||
| } | |||
| static void initStatic__RebelTech() | |||
| { | |||
| Plugin* const p = new Plugin; | |||
| @@ -3458,6 +3484,7 @@ void initStaticPlugins() | |||
| initStatic__PinkTrombone(); | |||
| initStatic__Prism(); | |||
| initStatic__rackwindows(); | |||
| initStatic__RCM(); | |||
| initStatic__RebelTech(); | |||
| initStatic__repelzen(); | |||
| initStatic__Sapphire(); | |||
| @@ -0,0 +1 @@ | |||
| Subproject commit c4a243ec7089254aa19225c0666bb4bda2163a6a | |||
| @@ -36,6 +36,7 @@ | |||
| #define DISTRHO_PLUGIN_AU_TYPE aumf | |||
| #define DISTRHO_PLUGIN_BRAND_ID Dstr | |||
| #define DISTRHO_PLUGIN_UNIQUE_ID DcnM | |||
| #define DISTRHO_PLUGIN_EXTRA_IO { CARDINAL_NUM_AUDIO_INPUTS, CARDINAL_NUM_AUDIO_OUTPUTS }, { 2, 2 } | |||
| #ifdef HEADLESS | |||
| #define DISTRHO_PLUGIN_HAS_UI 0 | |||
| @@ -99,7 +99,7 @@ void destroyStaticPlugins(); | |||
| } | |||
| } | |||
| const std::string CARDINAL_VERSION = "24.04"; | |||
| const std::string CARDINAL_VERSION = "24.05"; | |||
| // ----------------------------------------------------------------------------------------------------------- | |||
| @@ -162,19 +162,16 @@ CardinalPluginContext::CardinalPluginContext(Plugin* const p) | |||
| dataOuts(nullptr), | |||
| midiEvents(nullptr), | |||
| midiEventCount(0), | |||
| plugin(p) | |||
| #ifndef HEADLESS | |||
| , tlw(nullptr) | |||
| , ui(nullptr) | |||
| #endif | |||
| plugin(p), | |||
| tlw(nullptr), | |||
| ui(nullptr) | |||
| { | |||
| std::memset(parameters, 0, sizeof(parameters)); | |||
| } | |||
| #ifndef HEADLESS | |||
| bool CardinalPluginContext::addIdleCallback(IdleCallback* const cb) const | |||
| { | |||
| #ifndef CARDINAL_COMMON_DSP_ONLY | |||
| #if !(defined(HEADLESS) || defined(CARDINAL_COMMON_DSP_ONLY)) | |||
| if (ui != nullptr) | |||
| { | |||
| ui->addIdleCallback(cb); | |||
| @@ -190,7 +187,7 @@ bool CardinalPluginContext::addIdleCallback(IdleCallback* const cb) const | |||
| void CardinalPluginContext::removeIdleCallback(IdleCallback* const cb) const | |||
| { | |||
| #ifndef CARDINAL_COMMON_DSP_ONLY | |||
| #if !(defined(HEADLESS) || defined(CARDINAL_COMMON_DSP_ONLY)) | |||
| if (ui != nullptr) | |||
| ui->removeIdleCallback(cb); | |||
| #else | |||
| @@ -198,7 +195,6 @@ void CardinalPluginContext::removeIdleCallback(IdleCallback* const cb) const | |||
| (void)cb; | |||
| #endif | |||
| } | |||
| #endif | |||
| void CardinalPluginContext::writeMidiMessage(const rack::midi::Message& message, const uint8_t channel) | |||
| { | |||
| @@ -196,6 +196,14 @@ class CardinalPlugin : public CardinalBasePlugin | |||
| float fMiniReportValues[kCardinalParameterCountAtMini - kCardinalParameterStartMini]; | |||
| #endif | |||
| #ifdef DISTRHO_PLUGIN_EXTRA_IO | |||
| uint16_t fNumActiveInputs = DISTRHO_PLUGIN_NUM_INPUTS; | |||
| uint16_t fNumActiveOutputs = DISTRHO_PLUGIN_NUM_OUTPUTS; | |||
| #else | |||
| static constexpr const uint16_t fNumActiveInputs = DISTRHO_PLUGIN_NUM_INPUTS; | |||
| static constexpr const uint16_t fNumActiveOutputs = DISTRHO_PLUGIN_NUM_OUTPUTS; | |||
| #endif | |||
| public: | |||
| CardinalPlugin() | |||
| : CardinalBasePlugin(kCardinalParameterCount, 0, kCardinalStateCount), | |||
| @@ -406,7 +414,7 @@ protected: | |||
| uint32_t getVersion() const override | |||
| { | |||
| return d_version(0, 24, 4); | |||
| return d_version(0, 24, 5); | |||
| } | |||
| int64_t getUniqueId() const override | |||
| @@ -1135,7 +1143,10 @@ protected: | |||
| #if DISTRHO_PLUGIN_NUM_INPUTS != 0 | |||
| fAudioBufferCopy = new float*[DISTRHO_PLUGIN_NUM_INPUTS]; | |||
| for (int i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
| { | |||
| fAudioBufferCopy[i] = new float[context->bufferSize]; | |||
| std::memset(fAudioBufferCopy[i], 0, sizeof(float) * context->bufferSize); | |||
| } | |||
| #endif | |||
| fNextExpectedFrame = 0; | |||
| @@ -1226,7 +1237,7 @@ protected: | |||
| else | |||
| { | |||
| #if DISTRHO_PLUGIN_NUM_INPUTS != 0 | |||
| for (int i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
| for (int i=0; i<fNumActiveInputs; ++i) | |||
| { | |||
| #if CARDINAL_VARIANT_MAIN || CARDINAL_VARIANT_MINI | |||
| // can be null on main and mini variants | |||
| @@ -1241,7 +1252,7 @@ protected: | |||
| context->dataOuts = outputs; | |||
| } | |||
| for (int i=0; i<DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) | |||
| for (int i=0; i<fNumActiveOutputs; ++i) | |||
| { | |||
| #if CARDINAL_VARIANT_MAIN || CARDINAL_VARIANT_MINI | |||
| // can be null on main and mini variants | |||
| @@ -1288,6 +1299,14 @@ protected: | |||
| context->engine->setSampleRate(newSampleRate); | |||
| } | |||
| #ifdef DISTRHO_PLUGIN_EXTRA_IO | |||
| void ioChanged(const uint16_t numInputs, const uint16_t numOutputs) override | |||
| { | |||
| fNumActiveInputs = numInputs; | |||
| fNumActiveOutputs = numOutputs; | |||
| } | |||
| #endif | |||
| // ------------------------------------------------------------------------------------------------------- | |||
| private: | |||
| @@ -426,10 +426,6 @@ public: | |||
| const double height = std::max(538.f, rack::settings::windowSize.y) * scaleFactor; | |||
| setSize(width, height); | |||
| } | |||
| else if (scaleFactor != 1.0) | |||
| { | |||
| setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor); | |||
| } | |||
| #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS | |||
| const DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(window); | |||
| @@ -932,7 +928,7 @@ protected: | |||
| context->patch->loadAutosave(); | |||
| } catch(const rack::Exception& e) { | |||
| d_stderr(e.what()); | |||
| } DISTRHO_SAFE_EXCEPTION_RETURN("setState loadAutosave",); | |||
| } DISTRHO_SAFE_EXCEPTION_RETURN("stateChanged loadAutosave",); | |||
| return; | |||
| } | |||
| @@ -1180,7 +1176,7 @@ protected: | |||
| const int height = static_cast<int>(ev.size.getHeight() / scaleFactor + 0.5); | |||
| char sizeString[64] = {}; | |||
| std::snprintf(sizeString, sizeof(sizeString), "%d:%d", width, height); | |||
| std::snprintf(sizeString, sizeof(sizeString) - 1, "%d:%d", width, height); | |||
| setState("windowSize", sizeString); | |||
| if (rack::isStandalone()) | |||
| @@ -141,6 +141,11 @@ native: $(TARGETS) | |||
| mini: $(TARGETS) | |||
| $(MAKE) jack -C CardinalMini | |||
| $(MAKE) lv2_sep -C CardinalMiniSep | |||
| au: $(TARGETS) | |||
| $(MAKE) au -C CardinalFX $(CARDINAL_SYNTH_ARGS) | |||
| $(MAKE) au -C CardinalSynth $(CARDINAL_SYNTH_ARGS) | |||
| lv2: $(TARGETS) | |||
| $(MAKE) lv2 -C Cardinal | |||
| @@ -412,7 +412,7 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' | |||
| # Enable all possible plugin types and setup resources | |||
| ifeq ($(CARDINAL_VARIANT),main) | |||
| TARGETS = jack lv2 vst3 clap | |||
| TARGETS = clap jack lv2 vst3 | |||
| else ifeq ($(DSP_UI_SPLIT),true) | |||
| TARGETS = lv2_sep | |||
| else ifeq ($(CARDINAL_VARIANT),mini) | |||
| @@ -11,7 +11,7 @@ | |||
| <key>CFBundleIdentifier</key> | |||
| <string>studio.kx.distrho.cardinal.jack</string> | |||
| <key>CFBundleShortVersionString</key> | |||
| <string>23.04</string> | |||
| <string>24.05</string> | |||
| <key>LSMinimumSystemVersion</key> | |||
| <string>10.15</string> | |||
| <key>NSHumanReadableCopyright</key> | |||
| @@ -11,7 +11,7 @@ | |||
| <key>CFBundleIdentifier</key> | |||
| <string>studio.kx.distrho.cardinal.native</string> | |||
| <key>CFBundleShortVersionString</key> | |||
| <string>24.04</string> | |||
| <string>24.05</string> | |||
| <key>LSMinimumSystemVersion</key> | |||
| <string>10.15</string> | |||
| <key>NSHumanReadableCopyright</key> | |||