diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b19ef8..c8f2557 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1081,14 +1081,14 @@ jobs: make NOOPT=true SKIP_STRIPPING=true -j $(nproc) - name: Run Cardinal self-tests run: | - #xvfb-run valgrind \ - #--gen-suppressions=all \ - #--exit-on-first-error=yes \ - #--error-exitcode=255 \ - #--leak-check=no \ - #--track-origins=yes \ - #--suppressions=./dpf/utils/valgrind-dpf.supp - xvfb-run ./bin/Cardinal selftest + # --exit-on-first-error=yes + xvfb-run valgrind \ + --gen-suppressions=all \ + --error-exitcode=255 \ + --leak-check=no \ + --track-origins=yes \ + --suppressions=./dpf/utils/valgrind-dpf.supp \ + ./bin/Cardinal selftest - name: Validate LV2 ttl syntax run: | lv2_validate \ diff --git a/Makefile b/Makefile index ebb7306..b2b722f 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # jucewrapper/CMakeList.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.08 +VERSION = 22.09 # -------------------------------------------------------------- # Import base definitions diff --git a/README.md b/README.md index 602fa13..f167b7b 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,12 @@ All "Core" modules from Rack have been replaced by Cardinal equivalents, simplif Cardinal does not load external modules and does not connect to the official Rack library/store. All VCV branding has been removed (to the best of our knowledge) in order to avoid any trademark issues. -**The VST3 version is in progress, already part of the build but still experimental.** -Prefer to use other formats if you can. - ## Current status Cardinal should be considered stable, if you spot any bugs please report them. Currently the following should be noted: -- VST3 support incomplete/experimental [#41](https://github.com/DISTRHO/Cardinal/issues/41) - Windows 32bit builds do not work well [#80](https://github.com/DISTRHO/Cardinal/issues/80) ### Stable release diff --git a/carla b/carla index c6f49f6..963f194 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit c6f49f6da367306f0c02e49dcfd6fba2d7c93551 +Subproject commit 963f194b0ed93829188ffda23320b1dc848f07d8 diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index 6659132..cbf1bb3 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -24,7 +24,8 @@ Bellow follows a list of features comparing the official plugin to Cardinal. | Plugin in AU format | No | Yes | | | Plugin in LV2 format | No | Yes | | | Plugin in VST2 format | Yes | Yes | | -| Plugin in VST3 format | No | WIP | | +| Plugin in VST3 format | No | Yes | | +| Plugin in CLAP format | No | WIP | | | Plugin inside itself | No, will crash | Yes | Technical limitations prevent Rack Pro from loading inside itself | | Multi-threaded engine | Yes | No, uses host audio thread | Intentional in Cardinal, for removing jitter | | Supports ARM systems | No | Yes | This means Apple M1 too, yes | diff --git a/dpf b/dpf index 6cf523a..5ddaeef 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 6cf523adada34df242dc1bf4b33bfb025284c631 +Subproject commit 5ddaeefc47bd215c630b372304461a62f3464924 diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 9d78d06..099ff1d 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 22.08) +project(Cardinal VERSION 22.09) add_subdirectory(JUCE) diff --git a/plugins/AS b/plugins/AS index 2284e4a..93aa1d0 160000 --- a/plugins/AS +++ b/plugins/AS @@ -1 +1 @@ -Subproject commit 2284e4a3befb097b42ae30032147fd61226f64ff +Subproject commit 93aa1d0bbb2550bf05998e331e603e87425aeb91 diff --git a/plugins/BaconPlugs b/plugins/BaconPlugs index 9d35b74..adf84fc 160000 --- a/plugins/BaconPlugs +++ b/plugins/BaconPlugs @@ -1 +1 @@ -Subproject commit 9d35b745af8569d6a9d6bc5c3f2c3e64c852d8e0 +Subproject commit adf84fc00a953f8e8a1b378531a08ee68b9a68d7 diff --git a/plugins/Bidoo b/plugins/Bidoo index b88130f..97f61b3 160000 --- a/plugins/Bidoo +++ b/plugins/Bidoo @@ -1 +1 @@ -Subproject commit b88130f6b6311c8cd58669c20cc9842f2ea81575 +Subproject commit 97f61b3616a6e0935ac84f02b1e35734413c6b34 diff --git a/plugins/ML_modules b/plugins/ML_modules index 788ceb7..66527f1 160000 --- a/plugins/ML_modules +++ b/plugins/ML_modules @@ -1 +1 @@ -Subproject commit 788ceb73cfabddaff7245b0df072b0e22a19b360 +Subproject commit 66527f10d0ad18d03aca3bbabceb198396da5d81 diff --git a/plugins/Makefile b/plugins/Makefile index 7da4832..0dd3b97 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1093,6 +1093,9 @@ endif # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS +# Ignore bad behaviour from Rack API +BUILD_CXX_FLAGS += -Wno-format-security + ifeq ($(WASM),true) BUILD_CXX_FLAGS += -fexceptions endif @@ -1225,9 +1228,13 @@ VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalFX.vst/Contents/Resources/Plugi VST2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.vst/Contents/Resources/PluginManifests/%.json) VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.vst/Contents/Resources/%) VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.vst/Contents/Resources/%) +CLAP_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalFX.clap/Contents/Resources/PluginManifests/%.json) +CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.clap/Contents/Resources/%) else VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.vst/resources/PluginManifests/%.json) VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.vst/resources/%) +CLAP_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.clap/resources/PluginManifests/%.json) +CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.clap/resources/%) endif VST3_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.vst3/Contents/Resources/PluginManifests/%.json) @@ -1239,7 +1246,7 @@ VST3_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.vst3/Contents/Resource endif -resources: $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES) +resources: $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES) $(CLAP_RESOURCES) ../bin/Cardinal.lv2/resources/%: % -@mkdir -p "$(shell dirname $@)" @@ -1308,6 +1315,10 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/CardinalFX.clap/Contents/Resources/%: % + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + ../bin/CardinalSynth.vst/Contents/Resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -1316,6 +1327,10 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/CardinalFX.clap/Contents/Resources/PluginManifests/%.json: %/plugin.json + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + ../bin/CardinalSynth.vst/Contents/Resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -1324,9 +1339,17 @@ else -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/Cardinal.clap/resources/%: % + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + ../bin/Cardinal.vst/resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ + +../bin/Cardinal.clap/resources/PluginManifests/%.json: %/plugin.json + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ endif # -------------------------------------------------------------- diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index cd71f9a..f526208 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit cd71f9a4c4a23bdec5666cc78c5bc8b3f936d175 +Subproject commit f526208d9b54f9fc8950919ed3f9d9793c6e54e2 diff --git a/plugins/ValleyAudio b/plugins/ValleyAudio index 4507aa7..9745a4c 160000 --- a/plugins/ValleyAudio +++ b/plugins/ValleyAudio @@ -1 +1 @@ -Subproject commit 4507aa7e1b0efc68e33e0ce1530ebd8ac7b7763c +Subproject commit 9745a4c63747a2225a31da69b085e6185b4c8407 diff --git a/plugins/kocmoc b/plugins/kocmoc index f2a8c19..eb46ce3 160000 --- a/plugins/kocmoc +++ b/plugins/kocmoc @@ -1 +1 @@ -Subproject commit f2a8c19f8aa81769e13d085d69a44de5afaacfaa +Subproject commit eb46ce3a8b5795d61c2e3eb60f6ca58799a8cee2 diff --git a/plugins/sonusmodular b/plugins/sonusmodular index b63a685..407829b 160000 --- a/plugins/sonusmodular +++ b/plugins/sonusmodular @@ -1 +1 @@ -Subproject commit b63a685c6c68be188f5a3d5d9f6582eb94d62e53 +Subproject commit 407829b0341dc04aa8530bd14a739c9f222930ed diff --git a/plugins/unless_modules b/plugins/unless_modules index 3f895c7..7c15142 160000 --- a/plugins/unless_modules +++ b/plugins/unless_modules @@ -1 +1 @@ -Subproject commit 3f895c7663e3e54c4e30c406c56d420ea407133e +Subproject commit 7c15142c4e7adb174f92d7ad54c819970ac4bda4 diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index 32dfb19..f08793d 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -39,6 +39,8 @@ #define DISTRHO_UI_FILE_BROWSER 1 #define DISTRHO_UI_USE_NANOVG 1 #define DISTRHO_UI_USER_RESIZABLE 1 +#define DISTRHO_UI_DEFAULT_WIDTH 1228 +#define DISTRHO_UI_DEFAULT_HEIGHT 666 #endif #define DISTRHO_PLUGIN_IS_SYNTH 0 #define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS + 10 diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index a67d446..4329e04 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -57,7 +57,7 @@ # include #endif -const std::string CARDINAL_VERSION = "22.08"; +const std::string CARDINAL_VERSION = "22.09"; namespace rack { diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index 34bd556..ca17520 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -45,6 +45,8 @@ #define DISTRHO_UI_FILE_BROWSER 1 #define DISTRHO_UI_USE_NANOVG 1 #define DISTRHO_UI_USER_RESIZABLE 1 +#define DISTRHO_UI_DEFAULT_WIDTH 1228 +#define DISTRHO_UI_DEFAULT_HEIGHT 666 #endif #define DISTRHO_PLUGIN_IS_SYNTH 0 #define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS diff --git a/src/CardinalNative/DistrhoPluginInfo.h b/src/CardinalNative/DistrhoPluginInfo.h index e42972f..b820481 100644 --- a/src/CardinalNative/DistrhoPluginInfo.h +++ b/src/CardinalNative/DistrhoPluginInfo.h @@ -45,6 +45,8 @@ #define DISTRHO_UI_FILE_BROWSER 1 #define DISTRHO_UI_USE_NANOVG 1 #define DISTRHO_UI_USER_RESIZABLE 1 +#define DISTRHO_UI_DEFAULT_WIDTH 1228 +#define DISTRHO_UI_DEFAULT_HEIGHT 666 #endif #define DISTRHO_PLUGIN_IS_SYNTH 0 #define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index bfd2f1e..d7e6f75 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -712,7 +712,7 @@ protected: uint32_t getVersion() const override { - return d_version(0, 22, 8); + return d_version(0, 22, 9); } int64_t getUniqueId() const override @@ -733,20 +733,49 @@ protected: void initAudioPort(const bool input, uint32_t index, AudioPort& port) override { - #if CARDINAL_VARIANT_FX || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_SYNTH - if (index < 2) - port.groupId = kPortGroupStereo; - #endif - - if (index >= 8) + #if CARDINAL_VARIANT_MAIN + if (index < 8) + { + port.groupId = index / 2; + } + else { port.hints = kAudioPortIsCV | kCVPortHasPositiveUnipolarRange | kCVPortHasScaledRange; index -= 8; } + #elif CARDINAL_VARIANT_FX || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_SYNTH + if (index < 2) + port.groupId = kPortGroupStereo; + #endif CardinalBasePlugin::initAudioPort(input, index, port); } + #if CARDINAL_VARIANT_MAIN + void initPortGroup(const uint32_t index, PortGroup& portGroup) override + { + switch (index) + { + case 0: + portGroup.name = "Audio 1+2"; + portGroup.symbol = "audio_1_and_2"; + break; + case 1: + portGroup.name = "Audio 3+4"; + portGroup.symbol = "audio_3_and_4"; + break; + case 2: + portGroup.name = "Audio 5+6"; + portGroup.symbol = "audio_5_and_6"; + break; + case 3: + portGroup.name = "Audio 7+8"; + portGroup.symbol = "audio_7_and_8"; + break; + } + } + #endif + void initParameter(const uint32_t index, Parameter& parameter) override { if (index < kModuleParameters) diff --git a/src/CardinalSynth/DistrhoPluginInfo.h b/src/CardinalSynth/DistrhoPluginInfo.h index b4ba9a6..1d1ac1f 100644 --- a/src/CardinalSynth/DistrhoPluginInfo.h +++ b/src/CardinalSynth/DistrhoPluginInfo.h @@ -39,6 +39,8 @@ #define DISTRHO_UI_FILE_BROWSER 1 #define DISTRHO_UI_USE_NANOVG 1 #define DISTRHO_UI_USER_RESIZABLE 1 +#define DISTRHO_UI_DEFAULT_WIDTH 1228 +#define DISTRHO_UI_DEFAULT_HEIGHT 666 #endif #define DISTRHO_PLUGIN_IS_SYNTH 1 #define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 667fef6..5b1496e 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -339,7 +339,7 @@ class CardinalUI : public CardinalBaseUI, public: CardinalUI() - : CardinalBaseUI(1228, 666) + : CardinalBaseUI(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT) { Window& window(getWindow()); @@ -351,7 +351,7 @@ public: setGeometryConstraints(648 * scaleFactor, 538 * scaleFactor); if (scaleFactor != 1.0) - setSize(1228 * scaleFactor, 666 * scaleFactor); + setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor); rack::contextSet(context); diff --git a/src/Makefile b/src/Makefile index a9a0b90..9b1c3d0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -120,6 +120,9 @@ BUILD_CXX_FLAGS += -DnsvgParseFromFile=nsvgParseFromFileCardinal # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS +# Ignore bad behaviour from Rack API +BUILD_CXX_FLAGS += -Wno-format-security + # -------------------------------------------------------------- # Rack files to build @@ -197,8 +200,8 @@ endif TARGET = rack.a ifneq ($(MACOS),true) -CARDINAL_FX_ARGS = VST2_FILENAME=Cardinal.vst/CardinalFX$(LIB_EXT) -CARDINAL_SYNTH_ARGS = VST2_FILENAME=Cardinal.vst/CardinalSynth$(LIB_EXT) +CARDINAL_FX_ARGS = VST2_FILENAME=Cardinal.vst/CardinalFX$(LIB_EXT) CLAP_FILENAME=Cardinal.clap/CardinalFX.clap +CARDINAL_SYNTH_ARGS = VST2_FILENAME=Cardinal.vst/CardinalSynth$(LIB_EXT) CLAP_FILENAME=Cardinal.clap/CardinalSynth.clap endif all: $(TARGET) @@ -234,6 +237,9 @@ vst3: $(TARGET) $(MAKE) vst3 -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) vst3 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) +clap: $(TARGET) + $(MAKE) clap -C CardinalFX $(CARDINAL_FX_ARGS) + clean: rm -f $(TARGET) rm -rf $(BUILD_DIR) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 70d83dd..a03f268 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -163,8 +163,10 @@ endif ifneq ($(CARDINAL_VARIANT),main) ifeq ($(MACOS),true) VST2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst/Contents/Resources/%) +CLAP_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).clap/Contents/Resources/%) else VST2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.vst/resources/%) +CLAP_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.clap/resources/%) endif endif @@ -182,6 +184,7 @@ endif # Do some magic USE_VST2_BUNDLE = true +USE_CLAP_BUNDLE = true include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- @@ -250,6 +253,9 @@ endif # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS +# Ignore bad behaviour from Rack API +BUILD_CXX_FLAGS += -Wno-format-security + # -------------------------------------------------------------- # FIXME lots of warnings from VCV side @@ -355,10 +361,16 @@ else TARGETS = lv2 vst2 vst3 static endif +# TESTING +ifeq ($(CARDINAL_VARIANT),fx) +TARGETS += clap +endif + all: $(TARGETS) lv2: $(LV2_RESOURCES) vst2: $(VST2_RESOURCES) vst3: $(VST3_RESOURCES) +clap: $(CLAP_RESOURCES) # -------------------------------------------------------------- # Extra rules for macOS app bundle @@ -430,6 +442,10 @@ $(TARGET_DIR)/Cardinal.vst/resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +$(TARGET_DIR)/Cardinal.clap/resources/%: ../Rack/res/% + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + $(TARGET_DIR)/$(NAME).vst/Contents/Resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -438,4 +454,8 @@ $(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +$(TARGET_DIR)/$(NAME).clap/Contents/Resources/%: ../Rack/res/% + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + # -------------------------------------------------------------- diff --git a/utils/macOS/welcome.txt b/utils/macOS/welcome.txt index e8ed845..48a4ca0 100644 --- a/utils/macOS/welcome.txt +++ b/utils/macOS/welcome.txt @@ -10,5 +10,4 @@ This package provides the AU, LV2, VST2 and VST3 audio plugins, plus standalones Notes: - Due to AU and VST2 not supporting CV ports, the main variant is not available for these formats - - The VST3 version is in progress, Synth and FX variants work well, main variant is known to have issues - The standalones are intentionally very barebones in terms of system integration, prefer to use the plugin versions if you can