From 38fca07f14fad8166aa9829ce25796dd07720dc1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 07:18:04 +0100 Subject: [PATCH 001/451] Fix memory leak in AudioToCVPitch Signed-off-by: falkTX --- plugins/Cardinal/src/AudioToCVPitch.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/Cardinal/src/AudioToCVPitch.cpp b/plugins/Cardinal/src/AudioToCVPitch.cpp index 89d9e69b..2c79720b 100644 --- a/plugins/Cardinal/src/AudioToCVPitch.cpp +++ b/plugins/Cardinal/src/AudioToCVPitch.cpp @@ -95,6 +95,14 @@ struct AudioToCVPitch : Module { configParam(PARAM_TOLERANCE, 0.f, 99.f, kDefaultTolerance, "Tolerance", " %"); } + ~AudioToCVPitch() override + { + if (pitchDetector != nullptr) + del_aubio_pitch(pitchDetector); + del_fvec(detectedPitch); + del_fvec(inputBuffer); + } + void process(const ProcessArgs& args) override { float cvPitch = lastUsedOutputPitch; From 26ec541280d14d0365f374520a9845115597b495 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 07:54:28 +0100 Subject: [PATCH 002/451] Fix DrumKit memory leaks Signed-off-by: falkTX --- plugins/DrumKit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/DrumKit b/plugins/DrumKit index 7681d30a..d44b52e9 160000 --- a/plugins/DrumKit +++ b/plugins/DrumKit @@ -1 +1 @@ -Subproject commit 7681d30ac0b9246605d3d8d71dc7e25030748ec6 +Subproject commit d44b52e9bf8915c06382bfd1a41a460bafbfd671 From 19c12abdd4e621cda731d7af131ae602add1dd58 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 08:37:21 +0100 Subject: [PATCH 003/451] Fix a few plugin memory leaks Signed-off-by: falkTX --- plugins/AS | 2 +- plugins/MSM | 2 +- plugins/PinkTrombone | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/AS b/plugins/AS index 93aa1d0b..b5fdb76c 160000 --- a/plugins/AS +++ b/plugins/AS @@ -1 +1 @@ -Subproject commit 93aa1d0bbb2550bf05998e331e603e87425aeb91 +Subproject commit b5fdb76c79688207e56bd5b07b01e9c63a102797 diff --git a/plugins/MSM b/plugins/MSM index abe3c24d..2ebac756 160000 --- a/plugins/MSM +++ b/plugins/MSM @@ -1 +1 @@ -Subproject commit abe3c24d40b11d31f9f38b2125eff9280c77ad1b +Subproject commit 2ebac7567be4dbb00128b5d7aaccfdf4aac26e81 diff --git a/plugins/PinkTrombone b/plugins/PinkTrombone index 87ecd0ff..1e96d7b8 160000 --- a/plugins/PinkTrombone +++ b/plugins/PinkTrombone @@ -1 +1 @@ -Subproject commit 87ecd0ff5212a65b064444362e76c9bf94c01826 +Subproject commit 1e96d7b898eca6101f438dfd8224d713985486e2 From e39ff6d0f831f7e97da161711d5b0f2b88b54977 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 14:35:17 +0100 Subject: [PATCH 004/451] Fix a few more leaks and update PathSet Signed-off-by: falkTX --- plugins/Bidoo | 2 +- plugins/JW-Modules | 2 +- plugins/PathSet | 2 +- plugins/plugins.cpp | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Bidoo b/plugins/Bidoo index 97f61b36..69c8a23d 160000 --- a/plugins/Bidoo +++ b/plugins/Bidoo @@ -1 +1 @@ -Subproject commit 97f61b3616a6e0935ac84f02b1e35734413c6b34 +Subproject commit 69c8a23d0182b5ef50c23b1870c354b4e30811d1 diff --git a/plugins/JW-Modules b/plugins/JW-Modules index f7399c47..356588dd 160000 --- a/plugins/JW-Modules +++ b/plugins/JW-Modules @@ -1 +1 @@ -Subproject commit f7399c473735c0a5bec95bb40953e781f9a47ca4 +Subproject commit 356588ddb142dab99837af58681bc0d8afb88e4c diff --git a/plugins/PathSet b/plugins/PathSet index de53c786..30e35f94 160000 --- a/plugins/PathSet +++ b/plugins/PathSet @@ -1 +1 @@ -Subproject commit de53c78658c42638b7c356b78d1559634644f733 +Subproject commit 30e35f9414329ed6545ef328fd5951d4cf583362 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index f783375c..87f112ce 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -2450,6 +2450,7 @@ static void initStatic__PathSet() p->addModel(modelAstroVibe); p->addModel(modelGlassPane); p->addModel(modelNudge); + p->addModel(modelOneShot); } } From af64bc5991a68c5f112f26e9efc29134214ddcfb Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 14:35:45 +0100 Subject: [PATCH 005/451] Setup a few more name conflicts Signed-off-by: falkTX --- plugins/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index c2142826..c5a49afd 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -525,7 +525,7 @@ PLUGIN_FILES += $(filter-out Bidoo/src/dep/resampler/main.cpp,$(wildcard Bidoo/s PLUGIN_FILES += BidooDark/plugin.cpp # modules/types which are present in other plugins -BIDOO_CUSTOM = ChannelDisplay InstantiateExpanderItem LadderFilter $(DRWAV) +BIDOO_CUSTOM = ChannelDisplay InstantiateExpanderItem LadderFilter PitchShifter $(DRWAV) BIDOO_CUSTOM_PER_FILE = channel channel filterType # -------------------------------------------------------------- @@ -546,6 +546,9 @@ PLUGIN_FILES += $(wildcard ChowDSP/src/*/*.cpp) PLUGIN_FILES += $(wildcard ChowDSP/src/*/*/*.cpp) PLUGIN_FILES += $(wildcard ChowDSP/lib/r8lib/*.cpp) +# modules/types which are present in other plugins +CHOWDSP_CUSTOM = sign + # -------------------------------------------------------------- # CatroModulo @@ -824,6 +827,9 @@ PARABLE_CUSTOM = Clouds CustomPanel CloudsWidget FreezeLight clouds stmlib PLUGIN_FILES += $(filter-out PathSet/src/plugin.cpp,$(wildcard PathSet/src/*.cpp)) +# modules/types which are present in other plugins +PATHSET_CUSTOM = PitchShifter + # -------------------------------------------------------------- # PinkTrombone @@ -872,7 +878,7 @@ PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/* PLUGIN_FILES += $(filter-out unless_modules/src/unless.cpp,$(wildcard unless_modules/src/*.cpp)) # modules/types which are present in other plugins -UNLESS_MODULES_CUSTOM = Selection +UNLESS_MODULES_CUSTOM = Selection sign # -------------------------------------------------------------- # ValleyAudio From 3a17dbfa415445cf2059a7c8c4ebbdd8ac60692d Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 15:42:05 +0100 Subject: [PATCH 006/451] Update voxglitch, fix last memory leaks Signed-off-by: falkTX --- plugins/ArableInstruments | 2 +- plugins/Makefile | 2 +- plugins/plugins.cpp | 6 ++---- plugins/voxglitch | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/ArableInstruments b/plugins/ArableInstruments index 890448f0..6f09e9d3 160000 --- a/plugins/ArableInstruments +++ b/plugins/ArableInstruments @@ -1 +1 @@ -Subproject commit 890448f087e3ab47eac391f9bcfe03f7bbd2123e +Subproject commit 6f09e9d3e6a1c9b862ca2421227d33fdc4834e2d diff --git a/plugins/Makefile b/plugins/Makefile index c5a49afd..d526aa30 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -962,7 +962,7 @@ VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob PLUGIN_FILES += $(filter-out voxglitch/src/plugin.cpp,$(wildcard voxglitch/src/*.cpp)) # modules/types which are present in other plugins -VOXGLITCH_CUSTOM = $(DRWAV) ADSR AudioFile Looper Readout +VOXGLITCH_CUSTOM = ADSR AudioFile Looper Readout VOXGLITCH_CUSTOM_PER_FILE = AudioBuffer GateSequencer Grain SamplePlayer Sequencer SequencerDisplay VoltageSequencer # -------------------------------------------------------------- diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 87f112ce..3df32c26 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -2643,18 +2643,16 @@ static void initStatic__Voxglitch() p->addModel(modelDigitalSequencerXP); p->addModel(modelGlitchSequencer); p->addModel(modelGhosts); - p->addModel(modelGoblins); - p->addModel(modelGrainEngine); p->addModel(modelGrainEngineMK2); p->addModel(modelGrainEngineMK2Expander); p->addModel(modelGrainFx); + p->addModel(modelGrooveBox); + p->addModel(modelGrooveBoxExpander); p->addModel(modelHazumi); p->addModel(modelLooper); p->addModel(modelRepeater); p->addModel(modelSamplerX8); p->addModel(modelSatanonaut); - p->addModel(modelGrooveBox); - p->addModel(modelGrooveBoxExpander); p->addModel(modelWavBank); p->addModel(modelWavBankMC); p->addModel(modelXY); diff --git a/plugins/voxglitch b/plugins/voxglitch index e856cfb4..c47c0a10 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit e856cfb4dbc255165d22294e80e13957241d2c80 +Subproject commit c47c0a104c9ebd6814d8e8f616113a21ad97756f From 63689b2a1897b074c4aa97b11c04a1cfed7b4a5f Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 15:46:05 +0100 Subject: [PATCH 007/451] Check for memory leaks in CI now that we fix them all Signed-off-by: falkTX --- .github/workflows/build.yml | 14 +++++++------- dpf | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 134af71b..f1109bc6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1085,7 +1085,7 @@ jobs: xvfb-run valgrind \ --gen-suppressions=all \ --error-exitcode=255 \ - --leak-check=no \ + --leak-check=yes \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ ./bin/Cardinal selftest @@ -1112,10 +1112,10 @@ jobs: env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ xvfb-run valgrind \ --error-exitcode=255 \ - --leak-check=no \ + --leak-check=yes \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ - /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \ + /usr/lib/carla/carla-bridge-native lv2 "" ${p}; \ done - name: Test VST2 plugin run: | @@ -1123,10 +1123,10 @@ jobs: env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ xvfb-run valgrind \ --error-exitcode=255 \ - --leak-check=no \ + --leak-check=yes \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ - /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \ + /usr/lib/carla/carla-bridge-native vst2 ./${p} ""; \ done - name: Test VST3 plugin run: | @@ -1134,8 +1134,8 @@ jobs: env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ xvfb-run valgrind \ --error-exitcode=255 \ - --leak-check=no \ + --leak-check=yes \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ - /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \ + /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} ""; \ done diff --git a/dpf b/dpf index 5ddaeefc..8f664b4d 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 5ddaeefc47bd215c630b372304461a62f3464924 +Subproject commit 8f664b4d346ba8c40e6a5a0909ca813654721b1a From f05615d0f43724fe52a5a9ca0efa69694db43b3d Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 16:42:38 +0100 Subject: [PATCH 008/451] Cant enable mem leak checks on CI yet, glx/mesa fails Signed-off-by: falkTX --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1109bc6..3c2299ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1085,7 +1085,7 @@ jobs: xvfb-run valgrind \ --gen-suppressions=all \ --error-exitcode=255 \ - --leak-check=yes \ + --leak-check=no \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ ./bin/Cardinal selftest @@ -1112,7 +1112,7 @@ jobs: env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ xvfb-run valgrind \ --error-exitcode=255 \ - --leak-check=yes \ + --leak-check=no \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native lv2 "" ${p}; \ @@ -1123,7 +1123,7 @@ jobs: env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ xvfb-run valgrind \ --error-exitcode=255 \ - --leak-check=yes \ + --leak-check=no \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native vst2 ./${p} ""; \ @@ -1134,7 +1134,7 @@ jobs: env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ xvfb-run valgrind \ --error-exitcode=255 \ - --leak-check=yes \ + --leak-check=no \ --track-origins=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} ""; \ From 809651427cf55ea2e7a3a113c20c1007492c0d7a Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 16:44:01 +0100 Subject: [PATCH 009/451] Renable LTO in CI in preparation for new modules Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c2299ba..e270ed0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 31 + CACHE_VERSION: 32 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'false' + WITH_LTO: 'true' jobs: linux-arm64: From e9f3a1edce7e381785c77e8edaec0c0495e5e9db Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 18:28:32 +0100 Subject: [PATCH 010/451] Add libfftw3-dev to sysdeps CI build Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e270ed0b..e733f63a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -385,7 +385,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev + sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev - name: Build linux x86_64 (sysdeps) run: | make features From f140fbb55a2d882db2c5894d20188f0ac2efabd2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 18:53:14 +0100 Subject: [PATCH 011/451] Install alsa and pulse for Linux CI builds, so native audio works Signed-off-by: falkTX --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e733f63a..647a7fb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-aarch64-linux-gnu libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static + sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -131,7 +131,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq - sudo apt-get install -yqq g++-arm-linux-gnueabihf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static + sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -211,7 +211,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-multilib libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + sudo apt-get install -yqq g++-multilib libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -285,7 +285,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -341,7 +341,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Build linux x86_64 (debug) env: LDFLAGS: -static-libgcc -static-libstdc++ From 069465eced227a1cbba499fcd7288019f3b5e964 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 22:17:32 +0100 Subject: [PATCH 012/451] Dont do full macOS build if there is no cache for its dependencies Signed-off-by: falkTX --- .github/workflows/build.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 647a7fb1..3793647e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -413,16 +413,18 @@ jobs: src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} - name: Build extra dependencies run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/local/opt/ccache/libexec:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos + - name: Set up ccache + if: steps.cache.outputs.cache-hit == 'true' + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ccache-macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} - name: Build macOS intel (base) + if: steps.cache.outputs.cache-hit == 'true' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/local/opt/ccache/libexec:${PATH}" @@ -430,6 +432,7 @@ jobs: make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu) - name: Build macOS intel (AU using juce) + if: steps.cache.outputs.cache-hit == 'true' env: MACOSX_DEPLOYMENT_TARGET: '10.8' run: | @@ -441,6 +444,7 @@ jobs: pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - name: Build macOS intel (packaging) + if: steps.cache.outputs.cache-hit == 'true' env: MACOS_ARCHS: 'x86_64' run: | @@ -497,16 +501,18 @@ jobs: src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: macos-universal-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-macos-universal-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} - name: Build extra dependencies run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/local/opt/ccache/libexec:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal + - name: Set up ccache + if: steps.cache.outputs.cache-hit == 'true' + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ccache-macos-universal-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} - name: Build macOS universal (base) + if: steps.cache.outputs.cache-hit == 'true' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/local/opt/ccache/libexec:${PATH}" @@ -514,6 +520,7 @@ jobs: make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu) - name: Build macOS universal (AU using juce) + if: steps.cache.outputs.cache-hit == 'true' env: MACOSX_DEPLOYMENT_TARGET: '10.12' run: | @@ -524,6 +531,7 @@ jobs: pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - name: Build macOS universal (packaging) + if: steps.cache.outputs.cache-hit == 'true' env: MACOS_ARCHS: 'arm64,x86_64' run: | From a381b3d160e7f5bc203f556d4696b94913fead9c Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 22:52:41 +0100 Subject: [PATCH 013/451] Add CLAP plugin format to release artifacts, mention it in README Signed-off-by: falkTX --- .github/workflows/build.yml | 14 +++++++------- README.md | 10 ++++++---- utils/create-macos-installer.sh | 12 ++++++++++-- utils/inno/win32.iss | 3 +++ utils/inno/win64.iss | 3 +++ utils/macOS/package.xml.in | 4 ++++ 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3793647e..1b4e1947 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,7 +80,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -164,7 +164,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -244,7 +244,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -316,7 +316,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -353,7 +353,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst) + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -889,7 +889,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -981,7 +981,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} diff --git a/README.md b/README.md index 7be08406..a992f999 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ *Cardinal, the Rack!* Cardinal is a free and open-source virtual modular synthesizer plugin, -available as JACK standalone and AU, LV2, VST2 and VST3 audio plugin for FreeBSD, Linux, macOS and Windows. +available as JACK standalone and AU, LV2, VST2, VST3 and CLAP audio plugin for FreeBSD, Linux, macOS and Windows. It is based on the popular [VCV Rack](https://vcvrack.com/) but with a focus on being a fully self-contained plugin version. More specifically, this is a [DPF-based](https://github.com/DISTRHO/DPF/) @@ -25,7 +25,8 @@ All VCV branding has been removed (to the best of our knowledge) in order to avo Cardinal should be considered stable, if you spot any bugs please report them. Currently the following should be noted: -- Windows 32bit builds do not work well [#80](https://github.com/DISTRHO/Cardinal/issues/80) +- CLAP support is a work-in-progress [DPF#383](https://github.com/DISTRHO/DPF/issues/383) +- Windows 32bit builds still have a few problematic modules [#80](https://github.com/DISTRHO/Cardinal/issues/80) ### Stable release @@ -62,9 +63,10 @@ All variants have MIDI input and output support. ### Main -This variant provides 8 audio inputs and outputs and 10 CV inputs and outputs. +This variant provides 8 audio inputs and outputs and 10 CV inputs and outputs. -NOTE: Due to AU and VST2 formats not supporting CV ports, this variant is not available for those formats. +NOTE: Due to AU and VST2 formats not supporting CV ports, this variant is not available for those formats. +NOTE: This variant is not available in CLAP yet, to be added in a later release ### Synth diff --git a/utils/create-macos-installer.sh b/utils/create-macos-installer.sh index a465d2dc..a757dd5c 100755 --- a/utils/create-macos-installer.sh +++ b/utils/create-macos-installer.sh @@ -9,8 +9,8 @@ else exit fi -rm -rf res jack native au lv2 vst2 vst3 -mkdir jack native au lv2 vst2 vst3 +rm -rf res jack native au lv2 vst2 vst3 clap +mkdir jack native au lv2 vst2 vst3 clap mv Cardinal.app jack/CardinalJACK.app mv CardinalNative.app native/CardinalNative.app @@ -19,10 +19,12 @@ mv *.component au/ mv *.lv2 lv2/ mv *.vst vst2/ mv *.vst3 vst3/ +mv *.clap clap/ cp -RL lv2/Cardinal.lv2/resources res rm -rf lv2/*.lv2/resources rm -rf vst2/*.vst/Contents/Resources rm -rf vst3/*.vst3/Contents/Resources +rm -rf clap/*.clap/Contents/Resources pkgbuild \ --identifier "studio.kx.distrho.cardinal.resources" \ @@ -66,6 +68,12 @@ pkgbuild \ --root "${PWD}/vst3/" \ ../dpf-cardinal-vst3bundles.pkg +pkgbuild \ + --identifier "studio.kx.distrho.plugins.cardinal.clapbundles" \ + --install-location "/Library/Audio/Plug-Ins/CLAP/" \ + --root "${PWD}/clap/" \ + ../dpf-cardinal-clapbundles.pkg + cd .. sed -e "s|@builddir@|${PWD}/build|" \ diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index cff7ed9a..e1b22947 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -27,6 +27,7 @@ Name: native; Description: "Standalone (Native)"; Types: custom; Name: lv2; Description: "LV2 plugin"; Types: normal; Name: vst2; Description: "VST2 plugin"; Types: normal; Name: vst3; Description: "VST3 plugin"; Types: normal; +Name: clap; Description: "CLAP plugin"; Types: normal; [Files] #include "resources.iss" @@ -59,6 +60,8 @@ Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf32}\VST2\Cardinal.vst"; Source: "..\..\bin\Cardinal.vst3\Contents\x86-win\Cardinal.vst3"; DestDir: "{commoncf32}\VST3\Cardinal.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.vst3\Contents\x86-win\CardinalFX.vst3"; DestDir: "{commoncf32}\VST3\CardinalFX.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; Source: "..\..\bin\CardinalSynth.vst3\Contents\x86-win\CardinalSynth.vst3"; DestDir: "{commoncf32}\VST3\CardinalSynth.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; +; clap +Source: "..\..\bin\Cardinal.clap\*.*"; DestDir: "{commoncf32}\CLAP\Cardinal.clap"; Components: clap; Flags: ignoreversion; [Icons] Name: "{commonprograms}\Cardinal (JACK)"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (JACK variant)"; Components: jack; diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss index 90cfa810..d519ca84 100644 --- a/utils/inno/win64.iss +++ b/utils/inno/win64.iss @@ -28,6 +28,7 @@ Name: native; Description: "Standalone (Native)"; Types: custom; Name: lv2; Description: "LV2 plugin"; Types: normal; Name: vst2; Description: "VST2 plugin"; Types: normal; Name: vst3; Description: "VST3 plugin"; Types: normal; +Name: clap; Description: "CLAP plugin"; Types: normal; [Files] #include "resources.iss" @@ -60,6 +61,8 @@ Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf64}\VST2\Cardinal.vst"; Source: "..\..\bin\Cardinal.vst3\Contents\x86_64-win\Cardinal.vst3"; DestDir: "{commoncf64}\VST3\Cardinal.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.vst3\Contents\x86_64-win\CardinalFX.vst3"; DestDir: "{commoncf64}\VST3\CardinalFX.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; Source: "..\..\bin\CardinalSynth.vst3\Contents\x86_64-win\CardinalSynth.vst3"; DestDir: "{commoncf64}\VST3\CardinalSynth.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; +; clap +Source: "..\..\bin\Cardinal.clap\*.*"; DestDir: "{commoncf64}\CLAP\Cardinal.clap"; Components: clap; Flags: ignoreversion; [Icons] Name: "{commonprograms}\Cardinal (JACK)"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (JACK variant)"; Components: jack; diff --git a/utils/macOS/package.xml.in b/utils/macOS/package.xml.in index 381a28bb..ca2f4dad 100644 --- a/utils/macOS/package.xml.in +++ b/utils/macOS/package.xml.in @@ -27,6 +27,9 @@ dpf-cardinal-vst3bundles.pkg + + dpf-cardinal-clapbundles.pkg + @@ -35,5 +38,6 @@ + From 5d68d6bba6f35ebe7d7ceedb8f489d4d45a15070 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 23:15:58 +0100 Subject: [PATCH 014/451] Ensure native standalone does not use jack Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index a03f2680..19c12189 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -21,6 +21,8 @@ endif ifneq ($(STATIC_BUILD),true) +STATIC_PLUGIN_TARGET = true + CWD = ../../carla/source include $(CWD)/Makefile.deps.mk From 3fc03c311ef6e7572955ece3896e5a62e3db2e3f Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 23:18:00 +0100 Subject: [PATCH 015/451] Add libsdl2-dev to CI, for linux native audio standalone Signed-off-by: falkTX --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b4e1947..a4ea0f79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static + sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libpulse-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -131,7 +131,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq - sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static + sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libpulse-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -211,7 +211,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-multilib libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + sudo apt-get install -yqq g++-multilib libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libpulse-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -285,7 +285,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libpulse-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -341,7 +341,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Build linux x86_64 (debug) env: LDFLAGS: -static-libgcc -static-libstdc++ From 010b8fe6fd6f7e3a8e033f24881b3667f526664d Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Sep 2022 23:26:02 +0100 Subject: [PATCH 016/451] Deal with lack of RAM on github CI, use -j1 on final build stage Signed-off-by: falkTX --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4ea0f79..9b5a7c98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -347,7 +347,10 @@ jobs: LDFLAGS: -static-libgcc -static-libstdc++ run: | make features - make DEBUG=true -j $(nproc) + # multiple jobs for building carla, deps and plugins + make DEBUG=true carla deps dgl plugins resources -j $(nproc) + # single job for final build stage, otherwise we might killed due to OOM + make DEBUG=true -j 1 - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -718,7 +721,10 @@ jobs: source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd make features - make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc) + # multiple jobs for building carla, deps and plugins + make CIBUILD=true NOOPT=true USE_GLES2=true carla deps dgl plugins resources -j $(nproc) + # single job for final build stage, otherwise we might killed due to OOM + make CIBUILD=true NOOPT=true USE_GLES2=true -j 1 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true id: slug1 From ac71bffae73f5bc2607078088c04c30b032ff9c1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 8 Sep 2022 10:36:24 +0100 Subject: [PATCH 017/451] Comment out wasm builds for now Signed-off-by: falkTX --- .github/workflows/build.yml | 131 ++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b5a7c98..728d978a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -686,73 +686,70 @@ jobs: path: | *.tar.gz - wasm: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v2 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: wasm-v${{ env.CACHE_VERSION }} - - name: Set up dependencies - run: | - [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk - cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest - - name: Build extra dependencies - run: | - source ~/PawPawBuilds/emsdk/emsdk_env.sh - ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm - - name: Build wasm cross-compiled - run: | - source ~/PawPawBuilds/emsdk/emsdk_env.sh - pushd deps/PawPaw; source local.env wasm; popd - make features - # multiple jobs for building carla, deps and plugins - make CIBUILD=true NOOPT=true USE_GLES2=true carla deps dgl plugins resources -j $(nproc) - # single job for final build stage, otherwise we might killed due to OOM - make CIBUILD=true NOOPT=true USE_GLES2=true -j 1 - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - - name: Pack binaries - run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) - - uses: actions/upload-artifact@v2 - with: - name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} - path: | - *.zip - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.zip + #wasm: + #runs-on: ubuntu-20.04 + #steps: + #- uses: actions/checkout@v2 + #with: + #submodules: recursive + #- name: Set up cache + #id: cache + #uses: actions/cache@v2 + #with: + #path: | + #~/PawPawBuilds + #src/Rack/dep/bin + #src/Rack/dep/include + #src/Rack/dep/lib + #src/Rack/dep/share + #src/Rack/dep/jansson-2.12 + #src/Rack/dep/libarchive-3.4.3 + #src/Rack/dep/libsamplerate-0.1.9 + #src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + #src/Rack/dep/zstd-1.4.5 + #key: wasm-v${{ env.CACHE_VERSION }} + #- name: Set up dependencies + #run: | + #[ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk + #cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest + #- name: Build extra dependencies + #run: | + #source ~/PawPawBuilds/emsdk/emsdk_env.sh + #./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm + #- name: Build wasm cross-compiled + #run: | + #source ~/PawPawBuilds/emsdk/emsdk_env.sh + #pushd deps/PawPaw; source local.env wasm; popd + #make features + #make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc) + #- name: Set sha8 (non-release) + #if: startsWith(github.ref, 'refs/tags/') != true + #id: slug1 + #run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + #- name: Set sha8 (release) + #if: startsWith(github.ref, 'refs/tags/') + #id: slug2 + #run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" + #- name: Set sha8 + #id: slug + #run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + #- name: Pack binaries + #run: | + #cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) + #- uses: actions/upload-artifact@v2 + #with: + #name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + #path: | + #*.zip + #- uses: softprops/action-gh-release@v1 + #if: startsWith(github.ref, 'refs/tags/') + #with: + #tag_name: ${{ github.ref_name }} + #name: ${{ github.ref_name }} + #draft: false + #prerelease: false + #files: | + #*.zip wasm-mini: runs-on: ubuntu-20.04 From 7b242f1391584cad25bd7ded6572a4f192651128 Mon Sep 17 00:00:00 2001 From: dreamer Date: Sun, 14 Aug 2022 00:51:38 +0200 Subject: [PATCH 018/451] adding alef's bits --- .github/workflows/irc.yml | 2 +- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/Makefile | 17 ++++++++++++++++- plugins/alefsbits | 1 + plugins/plugins.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/custom/dep.cpp | 22 ++++++++++++++++++---- 8 files changed, 78 insertions(+), 6 deletions(-) create mode 160000 plugins/alefsbits diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml index 108c326b..73aa4584 100644 --- a/.github/workflows/irc.yml +++ b/.github/workflows/irc.yml @@ -10,7 +10,7 @@ jobs: - name: Format message id: message run: | - message="${{ github.actor }} pushed $(echo '${{ github.event.commits[0].message }}' | head -n 1) ${{ github.event.commits[0].url }}" + message="${{ github.actor }} pushed $(echo '${{ github.event.commits[0].message }}' | head -n 1 | tr -d "'") ${{ github.event.commits[0].url }}" echo ::set-output name=message::"${message}" - name: IRC notification uses: Gottox/irc-message-action@v2 diff --git a/.gitmodules b/.gitmodules index 8ed60c2e..83d5014f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -209,3 +209,6 @@ [submodule "plugins/myth-modules"] path = plugins/myth-modules url = https://github.com/Ahineya/vcv-myth-plugin.git +[submodule "plugins/alefsbits"] + path = plugins/alefsbits + url = https://github.com/alefnull/alefsbits.git diff --git a/README.md b/README.md index a992f999..44e95799 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ At the moment the following 3rd-party modules are provided: - 21kHz - 8Mode - Aaron Static +- alef's bits - AlgoritmArte - Amalgamated Harmonics - Animated Circuits diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 89fe81b2..90976fbf 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -16,6 +16,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | 21kHz | MIT | | | 8Mode | BSD-3-Clause | | | Aaron Static | MIT | | +| alef's bits | GPL-3.0-or-later | | | AlgoritmArte | GPL-3.0-or-later | | | Amalgamated Harmonics | BSD-3-Clause | | | Animated Circuits | GPL-3.0-or-later | | @@ -98,6 +99,7 @@ Below is a list of artwork licenses from plugins | 8Mode | BSD-3-Clause | No artwork specific license provided | | AaronStatic/* | MIT | No artwork specific license provided | | AaronStatic/fonts/PixelOperator.ttf | CC0-1.0 | | +| alefsbits/* | GPL-3.0-or-later | No artwork specific license provided | | Algoritmarte/* | GPL-3.0-or-later | No artwork specific license provided | | Algoritmarte/LEDSliderGreenHandle.svg | CC-BY-NC-4.0 | | | AmalgamatedHarmonics/* | BSD-3-Clause | No artwork specific license provided | diff --git a/plugins/Makefile b/plugins/Makefile index d526aa30..4199e5e0 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -308,6 +308,14 @@ PLUGIN_FILES += $(filter-out 21kHz/src/21kHz.cpp,$(wildcard 21kHz/src/*.cpp)) PLUGIN_FILES += $(filter-out 8Mode/src/8mode.cpp,$(wildcard 8Mode/src/*.cpp)) +# -------------------------------------------------------------- +# alefsbits + +PLUGIN_FILES += $(filter-out alefsbits/src/plugin.cpp,$(wildcard alefsbits/src/*.cpp)) + +# modules/types which are present in other plugins +ALEFSBITS_CUSTOM = Steps Logic + # -------------------------------------------------------------- # AlgoritmArte @@ -1082,7 +1090,7 @@ endif BUILD_C_FLAGS += -std=gnu11 BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing +BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi @@ -1416,6 +1424,13 @@ $(BUILD_DIR)/AaronStatic/%.cpp.o: AaronStatic/%.cpp -DpluginInstance=pluginInstance__AaronStatic \ -Dinit=init__AaronStatic +$(BUILD_DIR)/alefsbits/%.cpp.o: alefsbits/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(ALEFSBITS_CUSTOM),$(call custom_module_names,$(m),alefsbits)) \ + -DpluginInstance=pluginInstance__alefsbits + $(BUILD_DIR)/Algoritmarte/%.cpp.o: Algoritmarte/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/alefsbits b/plugins/alefsbits new file mode 160000 index 00000000..af534ff4 --- /dev/null +++ b/plugins/alefsbits @@ -0,0 +1 @@ +Subproject commit af534ff487db6689c3be527f5acb34ea90efc195 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 3df32c26..317336b0 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -39,6 +39,13 @@ // Aaron Static #include "AaronStatic/src/plugin.hpp" +// Alef's Bits +#define modelSteps modelalefsbitsSteps +#define modelLogic modelalefsbitsLogic +#include "alefsbits/src/plugin.hpp" +#undef modelSteps +#undef modelLogic + // Algoritmarte #include "Algoritmarte/src/plugin.hpp" @@ -723,6 +730,7 @@ Plugin* pluginInstance__ZamAudio; Plugin* pluginInstance__21kHz; Plugin* pluginInstance__8Mode; extern Plugin* pluginInstance__AaronStatic; +Plugin* pluginInstance__alefsbits; Plugin* pluginInstance__Algoritmarte; Plugin* pluginInstance__AmalgamatedHarmonics; Plugin* pluginInstance__ArableInstruments; @@ -1044,6 +1052,33 @@ static void initStatic__AaronStatic() } } +static void initStatic__alefsbits() +{ + Plugin* const p = new Plugin; + pluginInstance__alefsbits = p; + + const StaticPluginLoader spl(p, "alefsbits"); + if (spl.ok()) + { +#define modelSteps modelalefsbitsSteps +#define modelLogic modelalefsbitsLogic + p->addModel(modelSimplexandhold); + p->addModel(modelBlank6hp); + p->addModel(modelPolyrand); + p->addModel(modelNoize); + p->addModel(modelSteps); + p->addModel(modelFibb); + p->addModel(modelOctsclr); + p->addModel(modelShift); + p->addModel(modelMlt); + p->addModel(modelMath); + p->addModel(modelLogic); + p->addModel(modelProbablynot); +#undef modelSteps +#undef modelLogic + } +} + static void initStatic__Algoritmarte() { Plugin* const p = new Plugin; @@ -2725,6 +2760,7 @@ void initStaticPlugins() initStatic__21kHz(); initStatic__8Mode(); initStatic__AaronStatic(); + initStatic__alefsbits(); initStatic__Algoritmarte(); initStatic__AmalgamatedHarmonics(); initStatic__AnimatedCircuits(); diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 278368e1..52e7e62a 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -67,10 +67,24 @@ static const struct { { "/21kHz/res/Panels/PalmLoop.svg", {}, -1 }, { "/21kHz/res/Panels/TachyonEntangler.svg", {}, -1 }, // MIT - {"/AaronStatic/res/ChordCV.svg", {}, -1 }, - {"/AaronStatic/res/DiatonicCV.svg", {}, -1 }, - {"/AaronStatic/res/RandomNoteCV.svg", {}, -1 }, - {"/AaronStatic/res/ScaleCV.svg", {}, -1 }, + { "/AaronStatic/res/ChordCV.svg", {}, -1 }, + { "/AaronStatic/res/DiatonicCV.svg", {}, -1 }, + { "/AaronStatic/res/RandomNoteCV.svg", {}, -1 }, + { "/AaronStatic/res/ScaleCV.svg", {}, -1 }, + // GPL3.0-or-later + { "/alefsbits/res/blank6hp.svg", {}, -1 }, + { "/alefsbits/res/fibb.svg", {}, -1 }, + { "/alefsbits/res/logic.svg", {}, -1 }, + { "/alefsbits/res/math.svg", {}, -1 }, + { "/alefsbits/res/mlt.svg", {}, -1 }, + { "/alefsbits/res/noize.svg", {}, -1 }, + { "/alefsbits/res/octsclr.svg", {}, -1 }, + { "/alefsbits/res/polyrand.svg", {}, -1 }, + { "/alefsbits/res/shift.svg", {}, -1 }, + { "/alefsbits/res/simplexandhold.svg", {}, -1 }, + { "/alefsbits/res/simplexvco.svg", {}, -1 }, + { "/alefsbits/res/steps.svg", {}, -1 }, + { "/alefsbits/res/switch.svg", {}, -1 }, // GPL3.0-or-later { "/Algoritmarte/res/Clockkky.svg", {}, -1 }, { "/Algoritmarte/res/CyclicCA.svg", {}, -1 }, From 801a2cfad55ba9f32ecd2fdd8221513d032cd5c0 Mon Sep 17 00:00:00 2001 From: dreamer Date: Sun, 14 Aug 2022 18:08:23 +0200 Subject: [PATCH 019/451] add H4N4 Modules --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/Makefile | 14 +++++++++++++- plugins/h4n4-modules | 1 + plugins/plugins.cpp | 17 +++++++++++++++++ 6 files changed, 37 insertions(+), 1 deletion(-) create mode 160000 plugins/h4n4-modules diff --git a/.gitmodules b/.gitmodules index 83d5014f..50ea8786 100644 --- a/.gitmodules +++ b/.gitmodules @@ -212,3 +212,6 @@ [submodule "plugins/alefsbits"] path = plugins/alefsbits url = https://github.com/alefnull/alefsbits.git +[submodule "plugins/h4n4-modules"] + path = plugins/h4n4-modules + url = https://github.com/hannakoppelaar/h4n4-modules.git diff --git a/README.md b/README.md index 44e95799..f2efdea2 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ At the moment the following 3rd-party modules are provided: - Glue the Giant - GoodSheperd - Grande +- H4N4 Modules - Hampton Harmonics - HetrickCV - ihtsyn diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 90976fbf..b2f91577 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -43,6 +43,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Glue the Giant | GPL-3.0-or-later | | | GoodSheperd | GPL-3.0-or-later | | | Grande | GPL-3.0-or-later | | +| H4N4 Modules | GPL-3.0-or-later | | | Hampton Harmonics | MIT | | | HetrickCV | CC0-1.0 | | | ihtsyn | GPL-3.0-or-later | | @@ -154,6 +155,7 @@ Below is a list of artwork licenses from plugins | GlueTheGiant/fonts/DSEG7-* | OFL-1.1-RFN | | | GoodSheperd/* | GPL-3.0-or-later | No artwork specific license provided | | GrandeModular/* | CC-BY-NC-ND-4.0 | | +| h4n4-modules/* | GPL-3.0-or-later | No artwork specific license provided | | HamptonHarmonics/* | MIT | No artwork specific license provided | | HamptonHarmonics/PixelOperator.ttf | CC0-1.0 | | | HetrickCV/* | CC0-1.0 | | diff --git a/plugins/Makefile b/plugins/Makefile index 4199e5e0..246697c0 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -629,6 +629,11 @@ PLUGIN_FILES += $(filter-out GoodSheperd/src/plugin.cpp,$(wildcard GoodSheperd/s PLUGIN_FILES += $(filter-out GrandeModular/src/plugin.cpp,$(wildcard GrandeModular/src/*.cpp)) +# -------------------------------------------------------------- +# H4N4 Modules + +PLUGIN_FILES += $(filter-out h4n4-modules/src/plugin.cpp,$(wildcard h4n4-modules/src/*.cpp)) + # -------------------------------------------------------------- # Hampton Harmonics @@ -1631,7 +1636,7 @@ $(BUILD_DIR)/forsitan-modulare/%.cpp.o: forsitan-modulare/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ - $(foreach m,$(GLUETHEGIANT_CUSTOM),$(call custom_module_names,$(m),forsitan)) \ + $(foreach m,$(FORSITAN_CUSTOM),$(call custom_module_names,$(m),forsitan)) \ -DpluginInstance=pluginInstance__forsitan $(BUILD_DIR)/Fundamental/%.c.o: Fundamental/%.c @@ -1681,6 +1686,13 @@ $(BUILD_DIR)/GrandeModular/%.cpp.o: GrandeModular/%.cpp -Wno-narrowing \ -Wno-self-assign +$(BUILD_DIR)/h4n4-modules/%.cpp.o: h4n4-modules/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(H4N4_CUSTOM),$(call custom_module_names,$(m),H4N4)) \ + -DpluginInstance=pluginInstance__H4N4 + $(BUILD_DIR)/HamptonHarmonics/%.cpp.o: HamptonHarmonics/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/h4n4-modules b/plugins/h4n4-modules new file mode 160000 index 00000000..bb1b1587 --- /dev/null +++ b/plugins/h4n4-modules @@ -0,0 +1 @@ +Subproject commit bb1b15870d9dad4dd8a562957f45c2383506795d diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 317336b0..c5b8f91d 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -349,6 +349,9 @@ void saveGtgPluginDefault(const char*, int) {} // GrandeModular #include "GrandeModular/src/plugin.hpp" +// H4N4 Modules +#include "h4n4-modules/src/plugin.hpp" + // Hampton Harmonics #define modelArp modelHamptonHarmonicsArp #define modelProgress modelHamptonHarmonicsProgress @@ -756,6 +759,7 @@ Plugin* pluginInstance__forsitan; Plugin* pluginInstance__GlueTheGiant; Plugin* pluginInstance__GoodSheperd; Plugin* pluginInstance__GrandeModular; +Plugin* pluginInstance__H4N4; Plugin* pluginInstance__HamptonHarmonics; Plugin* pluginInstance__HetrickCV; extern Plugin* pluginInstance__ImpromptuModular; @@ -1893,6 +1897,18 @@ static void initStatic__GrandeModular() } } +static void initStatic__H4N4() +{ + Plugin* const p = new Plugin; + pluginInstance__H4N4 = p; + + const StaticPluginLoader spl(p, "h4n4-modules"); + if (spl.ok()) + { + p->addModel(modelXenQnt); + } +} + static void initStatic__HamptonHarmonics() { Plugin* const p = new Plugin; @@ -2786,6 +2802,7 @@ void initStaticPlugins() initStatic__GlueTheGiant(); initStatic__GoodSheperd(); initStatic__GrandeModular(); + initStatic__H4N4(); initStatic__HamptonHarmonics(); initStatic__HetrickCV(); initStatic__ImpromptuModular(); From 46dcb39eddebdbe5f85ab35aca23d15835c0fffe Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 8 Sep 2022 14:54:23 +0100 Subject: [PATCH 020/451] Add dBiz --- .gitmodules | 3 ++ README.md | 1 + docs/LICENSES.md | 4 +++ plugins/Makefile | 16 +++++++++++ plugins/dBiz | 1 + plugins/plugins.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 95 insertions(+) create mode 160000 plugins/dBiz diff --git a/.gitmodules b/.gitmodules index 50ea8786..384a28af 100644 --- a/.gitmodules +++ b/.gitmodules @@ -215,3 +215,6 @@ [submodule "plugins/h4n4-modules"] path = plugins/h4n4-modules url = https://github.com/hannakoppelaar/h4n4-modules.git +[submodule "plugins/dBiz"] + path = plugins/dBiz + url = https://github.com/dBiz/dBiz.git diff --git a/README.md b/README.md index f2efdea2..065d7052 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ At the moment the following 3rd-party modules are provided: - Catro/Modulo - cf - ChowDSP +- dBiz - DrumKit - E-Series - ExpertSleepers Encoders diff --git a/docs/LICENSES.md b/docs/LICENSES.md index b2f91577..898afb5b 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -33,6 +33,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Catro/Modulo | BSD-3-Clause | | | cf | BSD-3-Clause | | | ChowDSP | GPL-3.0-or-later | | +| dBiz | GPL-3.0-or-later | | | DrumKit | CC0-1.0 | | | E-Series | GPL-3.0-or-later | | | ExpertSleepers Encoders | MIT | | @@ -143,6 +144,9 @@ Below is a list of artwork licenses from plugins | cf/VT323-Regular.ttf | OFL-1.1-no-RFN | | | ChowDSP/* | GPL-3.0-or-later | Same license as source code | | ChowDSP/fonts/RobotoCondensed-*.ttf | Apache-2.0 | | +| dBiz/* | CC-BY-NC-ND-4.0 | | +| dBiz/DejaVuSansMono.ttf | Bitstream-Vera | | +| dBiz/ShareTechMono-Regular.ttf | OFL-1.1 | | | DrumKit/* | CC0-1.0 | | | DrumKit/component/NovaMono.ttf | OFL-1.1-RFN | | | E-Series/* | Custom | Copyright © Synthesis Technology, [used and distributed with permission](LICENSE-PERMISSIONS.md#eseries-paul-schreiber--synthtech) | diff --git a/plugins/Makefile b/plugins/Makefile index 246697c0..34bbb742 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -393,6 +393,14 @@ PLUGIN_FILES += AS/freeverb/revmodel.cpp AS_CUSTOM = ADSR BpmDisplayWidget LabelDisplayWidget LedLight LowFrequencyOscillator SigDisplayWidget VCA WaveShaper YellowRedLight allpass comb revmodel AS_CUSTOM_PER_FILE = NumberDisplayWidget +# -------------------------------------------------------------- +# dBiz + +PLUGIN_FILES += $(filter-out dBiz/src/plugin.cpp,$(wildcard dBiz/src/*.cpp)) + +# modules/types which are present in other plugins +DBIZ_CUSTOM = Chord DarkDefaultItem Divider OrangeLight VCA4 darkPanelID lightPanelID + # -------------------------------------------------------------- # AudibleInstruments @@ -1595,6 +1603,14 @@ $(BUILD_DIR)/ChowDSP/%.cpp.o: ChowDSP/%.cpp -IChowDSP/lib/chowdsp_utils/modules/chowdsp_dsp/WDF \ -Wno-deprecated-copy + +$(BUILD_DIR)/dBiz/src/%.cpp.o: dBiz/src/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(DBIZ_CUSTOM),$(call custom_module_names,$(m),dBiz)) \ + -DpluginInstance=pluginInstance__dBiz + $(BUILD_DIR)/DrumKit/%.cpp.o: DrumKit/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/dBiz b/plugins/dBiz new file mode 160000 index 00000000..88f1bd64 --- /dev/null +++ b/plugins/dBiz @@ -0,0 +1 @@ +Subproject commit 88f1bd64cff6e96a1a48566a1692de86b9a7de2a diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index c5b8f91d..9c624aa5 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -320,6 +320,23 @@ extern Model* modelTestVCF; #include "DrumKit/src/DrumKit.hpp" void setupSamples(); +// dBiz +#define darkPanelID dBizdarkPanelID +#define DarkDefaultItem dBizDarkDefaultItem +#define lightPanelID dBizlightPanelID +#define OrangeLight dBizOrangeLight +#define modelChord modeldBizChord +#define modelVCA4 modeldBizVCA4 +#define modelDivider modeldBizDivider +#include "dBiz/src/plugin.hpp" +#undef darkPanelID +#undef DarkDefaultItem +#undef lightPanelID +#undef OrangeLight +#undef modelChord +#undef modelVCA4 +#undef modelDivider + // ESeries #include "ESeries/src/plugin.hpp" @@ -719,6 +736,7 @@ std::vector hostTerminalModels; // stuff that reads config files, we dont want that int loadConsoleType() { return 0; } +bool loadDarkAsDefault() { return 1; } int loadDirectOutMode() { return 0; } void saveConsoleType(int) {} void saveDarkAsDefault(bool) {} @@ -750,6 +768,7 @@ Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__CatroModulo; Plugin* pluginInstance__cf; Plugin* pluginInstance__ChowDSP; +Plugin* pluginInstance__dBiz; extern Plugin* pluginInstance__DrumKit; Plugin* pluginInstance__ESeries; Plugin* pluginInstance__ExpertSleepersEncoders; @@ -1709,6 +1728,56 @@ static void initStatic__ChowDSP() } } +static void initStatic__dBiz() +{ + Plugin* const p = new Plugin; + pluginInstance__dBiz = p; + + const StaticPluginLoader spl(p, "dBiz"); + if (spl.ok()) + { +#define modelChord modeldBizChord +#define modelVCA4 modeldBizVCA4 +#define modelDivider modeldBizDivider + p->addModel(modelNavControl); + p->addModel(modelBench); + p->addModel(modelContorno); + //p->addModel(modelContornoMK2); + p->addModel(modelTranspose); + p->addModel(modelUtility); + p->addModel(modelChord); + p->addModel(modelBene); + p->addModel(modelBenePads); + p->addModel(modelPerfMixer); + p->addModel(modelDrMix); + p->addModel(modelPerfMixer4); + p->addModel(modelVCA4); + p->addModel(modelVCA530); + p->addModel(modelRemix); + p->addModel(modelSmixer); + p->addModel(modelVerbo); + p->addModel(modelDVCO); + p->addModel(modelDAOSC); + p->addModel(modelTROSC); + p->addModel(modelTROSCMK2); + p->addModel(modelSuHa); + p->addModel(modelSuHaMK2); + p->addModel(modelFourSeq); + p->addModel(modelDivider); + p->addModel(modelUtil2); + p->addModel(modelSmorph); + p->addModel(modelBigSmorph); + p->addModel(modelSPan); + p->addModel(modelQuePasa); + p->addModel(modelDualFilter); + p->addModel(modelOrder); + p->addModel(modelDualMatrix); +#undef modelChord +#undef modelVCA4 +#undef modelDivider + } +} + static void initStatic__DrumKit() { Plugin* const p = new Plugin; @@ -2793,6 +2862,7 @@ void initStaticPlugins() initStatic__CatroModulo(); initStatic__cf(); initStatic__ChowDSP(); + initStatic__dBiz(); initStatic__DrumKit(); initStatic__ESeries(); initStatic__ExpertSleepersEncoders(); From fad92579b9f9789d9d3be0cc55704fd0e1f30e19 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 8 Sep 2022 17:49:49 +0100 Subject: [PATCH 021/451] Tweak name conflicts for dBiz Signed-off-by: falkTX --- README.md | 3 ++- dpf | 2 +- plugins/Makefile | 19 ++++++++++--------- plugins/plugins.cpp | 28 ++++++++++++++++------------ 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 065d7052..90a12def 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ *Cardinal, the Rack!* Cardinal is a free and open-source virtual modular synthesizer plugin, -available as JACK standalone and AU, LV2, VST2, VST3 and CLAP audio plugin for FreeBSD, Linux, macOS and Windows. +available as CLAP, LV2, VST2 and VST3 audio plugin for FreeBSD, Linux, macOS and Windows. +Plus AU and JACK or Native audio standalone for some systems. It is based on the popular [VCV Rack](https://vcvrack.com/) but with a focus on being a fully self-contained plugin version. More specifically, this is a [DPF-based](https://github.com/DISTRHO/DPF/) diff --git a/dpf b/dpf index 8f664b4d..11a0877f 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 8f664b4d346ba8c40e6a5a0909ca813654721b1a +Subproject commit 11a0877fd5c289e8b2e770491c63548eca489d3b diff --git a/plugins/Makefile b/plugins/Makefile index 34bbb742..7e9682b4 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -393,14 +393,6 @@ PLUGIN_FILES += AS/freeverb/revmodel.cpp AS_CUSTOM = ADSR BpmDisplayWidget LabelDisplayWidget LedLight LowFrequencyOscillator SigDisplayWidget VCA WaveShaper YellowRedLight allpass comb revmodel AS_CUSTOM_PER_FILE = NumberDisplayWidget -# -------------------------------------------------------------- -# dBiz - -PLUGIN_FILES += $(filter-out dBiz/src/plugin.cpp,$(wildcard dBiz/src/*.cpp)) - -# modules/types which are present in other plugins -DBIZ_CUSTOM = Chord DarkDefaultItem Divider OrangeLight VCA4 darkPanelID lightPanelID - # -------------------------------------------------------------- # AudibleInstruments @@ -581,6 +573,15 @@ PLUGIN_FILES += $(filter-out cf/src/plugin.cpp,$(wildcard cf/src/*.cpp)) # modules/types which are present in other plugins CF_CUSTOM = $(DRWAV) +# -------------------------------------------------------------- +# dBiz + +PLUGIN_FILES += $(filter-out dBiz/src/plugin.cpp,$(wildcard dBiz/src/*.cpp)) + +# modules/types which are present in other plugins +DBIZ_CUSTOM = Chord DarkDefaultItem Divider FourSeq FourSeqWidget OrangeLight VCA4 Wavefolder darkPanelID lightPanelID +DBIZ_CUSTOM_PER_FILE = MultiFilter Oscillator calcOutput sineOsc subBank + # -------------------------------------------------------------- # DrumKit @@ -1512,7 +1513,6 @@ $(BUILD_DIR)/Autinn/%.cpp.o: Autinn/%.cpp -DpluginInstance=pluginInstance__Autinn \ -Dinit=init__Autinn - $(BUILD_DIR)/Axioma/%.cpp.o: Axioma/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" @@ -1609,6 +1609,7 @@ $(BUILD_DIR)/dBiz/src/%.cpp.o: dBiz/src/%.cpp @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(DBIZ_CUSTOM),$(call custom_module_names,$(m),dBiz)) \ + $(foreach m,$(DBIZ_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),dBiz_$(shell basename $*))) \ -DpluginInstance=pluginInstance__dBiz $(BUILD_DIR)/DrumKit/%.cpp.o: DrumKit/%.cpp diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 9c624aa5..65aa5f0a 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -316,26 +316,28 @@ extern Model* modelTestVCF; #include "ChowDSP/src/plugin.cpp" #undef init -// DrumKit -#include "DrumKit/src/DrumKit.hpp" -void setupSamples(); - // dBiz -#define darkPanelID dBizdarkPanelID #define DarkDefaultItem dBizDarkDefaultItem -#define lightPanelID dBizlightPanelID #define OrangeLight dBizOrangeLight +#define darkPanelID dBizdarkPanelID +#define lightPanelID dBizlightPanelID #define modelChord modeldBizChord -#define modelVCA4 modeldBizVCA4 #define modelDivider modeldBizDivider +#define modelFourSeq modeldBizFourSeq +#define modelVCA4 modeldBizVCA4 #include "dBiz/src/plugin.hpp" -#undef darkPanelID #undef DarkDefaultItem -#undef lightPanelID #undef OrangeLight +#undef darkPanelID +#undef lightPanelID #undef modelChord -#undef modelVCA4 #undef modelDivider +#undef modelFourSeq +#undef modelVCA4 + +// DrumKit +#include "DrumKit/src/DrumKit.hpp" +void setupSamples(); // ESeries #include "ESeries/src/plugin.hpp" @@ -1737,8 +1739,9 @@ static void initStatic__dBiz() if (spl.ok()) { #define modelChord modeldBizChord -#define modelVCA4 modeldBizVCA4 #define modelDivider modeldBizDivider +#define modelFourSeq modeldBizFourSeq +#define modelVCA4 modeldBizVCA4 p->addModel(modelNavControl); p->addModel(modelBench); p->addModel(modelContorno); @@ -1773,8 +1776,9 @@ static void initStatic__dBiz() p->addModel(modelOrder); p->addModel(modelDualMatrix); #undef modelChord -#undef modelVCA4 #undef modelDivider +#undef modelFourSeq +#undef modelVCA4 } } From ba760be01d17a4afb63465b7c9aebc53934817ae Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 9 Sep 2022 11:58:46 +0100 Subject: [PATCH 022/451] Add CLAP synth variant, WIP --- .github/workflows/build.yml | 2 +- dpf | 2 +- plugins/Makefile | 22 ++++++++++++++++------ src/Makefile.cardinal.mk | 7 +------ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 728d978a..76f77859 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'true' + WITH_LTO: 'false' jobs: linux-arm64: diff --git a/dpf b/dpf index 11a0877f..4d37a8e3 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 11a0877fd5c289e8b2e770491c63548eca489d3b +Subproject commit 4d37a8e3011b1d04f71edbff572454b103cbdabf diff --git a/plugins/Makefile b/plugins/Makefile index 7e9682b4..439d0ff6 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1249,7 +1249,9 @@ VST2_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.vst/Contents/Resources/Pl 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 += $(PLUGIN_LIST:%=../bin/CardinalSynth.clap/Contents/Resources/PluginManifests/%.json) CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.clap/Contents/Resources/%) +CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.clap/Contents/Resources/%) else VST2_RESOURCES = $(PLUGIN_LIST:%=../bin/Cardinal.vst/resources/PluginManifests/%.json) VST2_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.vst/resources/%) @@ -1335,15 +1337,23 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/CardinalFX.clap/Contents/Resources/%: % +../bin/CardinalSynth.vst/Contents/Resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/CardinalSynth.vst/Contents/Resources/%: % +../bin/CardinalFX.vst/Contents/Resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/CardinalFX.vst/Contents/Resources/PluginManifests/%.json: %/plugin.json +../bin/CardinalSynth.vst/Contents/Resources/PluginManifests/%.json: %/plugin.json + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + +../bin/CardinalFX.clap/Contents/Resources/%: % + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + +../bin/CardinalSynth.clap/Contents/Resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -1351,7 +1361,7 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/CardinalSynth.vst/Contents/Resources/PluginManifests/%.json: %/plugin.json +../bin/CardinalSynth.clap/Contents/Resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ else @@ -1359,11 +1369,11 @@ else -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/Cardinal.clap/resources/%: % +../bin/Cardinal.vst/resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -../bin/Cardinal.vst/resources/PluginManifests/%.json: %/plugin.json +../bin/Cardinal.clap/resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 19c12189..05901e32 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -360,12 +360,7 @@ endif else ifeq ($(CARDINAL_VARIANT),native) TARGETS = jack else -TARGETS = lv2 vst2 vst3 static -endif - -# TESTING -ifeq ($(CARDINAL_VARIANT),fx) -TARGETS += clap +TARGETS = lv2 vst2 vst3 clap static endif all: $(TARGETS) From 68e810c8f48d7b2aa20397e26621ebb018ae52c5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 9 Sep 2022 13:49:02 +0100 Subject: [PATCH 023/451] Do not use zamaudio modules for now, wait until 22.10 --- .github/workflows/build.yml | 2 ++ plugins/Makefile | 4 ++-- plugins/plugins.cpp | 10 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76f77859..40986167 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -465,6 +465,7 @@ jobs: id: slug run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Rename macOS bundle + if: steps.cache.outputs.cache-hit == 'true' run: | mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg - uses: actions/upload-artifact@v2 @@ -552,6 +553,7 @@ jobs: id: slug run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Rename macOS bundle + if: steps.cache.outputs.cache-hit == 'true' run: | mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg - uses: actions/upload-artifact@v2 diff --git a/plugins/Makefile b/plugins/Makefile index 439d0ff6..4e1c83c3 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -293,9 +293,9 @@ PLUGIN_FILES += Fundamental/src/dr_wav.c FUNDAMENTAL_CUSTOM = $(DRWAV) # -------------------------------------------------------------- -# ZamAudio (always enabled) +# ZamAudio (always enabled) - TODO -PLUGIN_FILES += $(wildcard ZamAudio/src/*.cpp) +# PLUGIN_FILES += $(wildcard ZamAudio/src/*.cpp) ifneq ($(NOPLUGINS),true) # -------------------------------------------------------------- diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 65aa5f0a..dc7220c1 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -26,8 +26,8 @@ // Fundamental (always enabled) #include "Fundamental/src/plugin.hpp" -// ZamAudio (always enabled) -#include "ZamAudio/src/plugin.hpp" +// ZamAudio (always enabled) - TODO +// #include "ZamAudio/src/plugin.hpp" #ifndef NOPLUGINS // 21kHz @@ -748,7 +748,7 @@ void saveHighQualityAsDefault(bool) {} // plugin instances Plugin* pluginInstance__Cardinal; Plugin* pluginInstance__Fundamental; -Plugin* pluginInstance__ZamAudio; +// Plugin* pluginInstance__ZamAudio; #ifndef NOPLUGINS Plugin* pluginInstance__21kHz; Plugin* pluginInstance__8Mode; @@ -1023,6 +1023,7 @@ static void initStatic__Fundamental() } } +/* static void initStatic__ZamAudio() { Plugin* const p = new Plugin; @@ -1034,6 +1035,7 @@ static void initStatic__ZamAudio() p->addModel(modelZamComp); } } +*/ #ifndef NOPLUGINS static void initStatic__21kHz() @@ -2844,7 +2846,7 @@ void initStaticPlugins() { initStatic__Cardinal(); initStatic__Fundamental(); - initStatic__ZamAudio(); + // initStatic__ZamAudio(); #ifndef NOPLUGINS initStatic__21kHz(); initStatic__8Mode(); From 7e4da65cf15157b56b779444761d80a7691162ed Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 9 Sep 2022 15:04:07 +0100 Subject: [PATCH 024/451] Update voxglitch (crash fix) Signed-off-by: falkTX --- dpf | 2 +- plugins/voxglitch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dpf b/dpf index 4d37a8e3..5a439e66 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 4d37a8e3011b1d04f71edbff572454b103cbdabf +Subproject commit 5a439e6686277e65a7bbe6a66cfd60482e52196c diff --git a/plugins/voxglitch b/plugins/voxglitch index c47c0a10..ef9e2ef1 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit c47c0a104c9ebd6814d8e8f616113a21ad97756f +Subproject commit ef9e2ef16fdcb283688dbf9732f1ff0b8fd35903 From 3fb77913abe9e3e14acfc663dbb61dc7f55d18cc Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 10 Sep 2022 00:48:22 +0100 Subject: [PATCH 025/451] Fix initial UI size in some hosts, make clap gui usable in Linux Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 5a439e66..34d1547e 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 5a439e6686277e65a7bbe6a66cfd60482e52196c +Subproject commit 34d1547e311ba675a59040d65128167cf8c48a24 From 17d1878a0b62c38e97bdd0ed51192ca81b08070e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 10 Sep 2022 01:05:37 +0100 Subject: [PATCH 026/451] Add new voxglitch resources Signed-off-by: falkTX --- plugins/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 4e1c83c3..167819d9 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1216,6 +1216,16 @@ 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/*) +RESOURCE_FILES += $(wildcard voxglitch/res/*.json) +RESOURCE_FILES += $(wildcard voxglitch/res/*/*.png) +RESOURCE_FILES += $(wildcard voxglitch/res/*/*.svg) +RESOURCE_FILES += $(wildcard voxglitch/res/components/*/*.png) +RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.png) +RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.jpg) +RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.svg) +RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.json) +RESOURCE_FILES += $(wildcard voxglitch/res/themes/*/*.png) +RESOURCE_FILES += $(wildcard voxglitch/res/themes/*/*.jpg) endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png From 69c1d63ef85a915291ab1351cb116b62663e0af5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 10 Sep 2022 16:01:02 +0100 Subject: [PATCH 027/451] CLAP state support; Ignore hosts which cannot supply time frame --- dpf | 2 +- src/CardinalPlugin.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dpf b/dpf index 34d1547e..e735e7ef 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 34d1547e311ba675a59040d65128167cf8c48a24 +Subproject commit e735e7efdcd2ee1d1c3e91db845c56581cc9d241 diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index d7e6f750..cfda583e 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -1270,7 +1270,11 @@ class CardinalPlugin : public CardinalBasePlugin { const TimePosition& timePos(getTimePosition()); - const bool reset = timePos.playing && (timePos.frame == 0 || d_isDiffHigherThanLimit(fNextExpectedFrame, timePos.frame, (uint64_t)2)); + bool reset = timePos.playing && (timePos.frame == 0 || d_isDiffHigherThanLimit(fNextExpectedFrame, timePos.frame, (uint64_t)2)); + + // ignore hosts which cannot supply time frame position + if (context->playing == timePos.playing && timePos.frame == 0 && context->frame == 0) + reset = false; context->playing = timePos.playing; context->bbtValid = timePos.bbt.valid; From 9169bb299c456296154cdedd16ec1c6a1afc9c95 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 11 Sep 2022 22:49:30 +0100 Subject: [PATCH 028/451] Revert to voxglitch version used in 22.07 for now Signed-off-by: falkTX --- plugins/Makefile | 10 ---------- plugins/voxglitch | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 167819d9..4e1c83c3 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1216,16 +1216,6 @@ 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/*) -RESOURCE_FILES += $(wildcard voxglitch/res/*.json) -RESOURCE_FILES += $(wildcard voxglitch/res/*/*.png) -RESOURCE_FILES += $(wildcard voxglitch/res/*/*.svg) -RESOURCE_FILES += $(wildcard voxglitch/res/components/*/*.png) -RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.png) -RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.jpg) -RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.svg) -RESOURCE_FILES += $(wildcard voxglitch/res/*/themes/default/*.json) -RESOURCE_FILES += $(wildcard voxglitch/res/themes/*/*.png) -RESOURCE_FILES += $(wildcard voxglitch/res/themes/*/*.jpg) endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png diff --git a/plugins/voxglitch b/plugins/voxglitch index ef9e2ef1..55186974 160000 --- a/plugins/voxglitch +++ b/plugins/voxglitch @@ -1 +1 @@ -Subproject commit ef9e2ef16fdcb283688dbf9732f1ff0b8fd35903 +Subproject commit 55186974eeb6c068f2687d7bb4f5c5e1884bf7da From d1f4bf48630a84ed59615f102b6cc463d8e75b94 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 11 Sep 2022 22:49:55 +0100 Subject: [PATCH 029/451] CLAP related improvements Signed-off-by: falkTX --- dpf | 2 +- src/Cardinal/DistrhoPluginInfo.h | 9 +++++---- src/CardinalFX/DistrhoPluginInfo.h | 5 +++-- src/CardinalSynth/DistrhoPluginInfo.h | 9 +++++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dpf b/dpf index e735e7ef..94f148a5 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit e735e7efdcd2ee1d1c3e91db845c56581cc9d241 +Subproject commit 94f148a575dc7a2282fc4de733cc97dfd41196f8 diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index f08793d0..df7f9554 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -26,10 +26,11 @@ #define CARDINAL_NUM_AUDIO_INPUTS 8 #define CARDINAL_NUM_AUDIO_OUTPUTS 8 -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "Cardinal" -#define DISTRHO_PLUGIN_LABEL "Cardinal" -#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "Cardinal" +#define DISTRHO_PLUGIN_LABEL "Cardinal" +#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal" #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index ca175203..9c702123 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -26,8 +26,9 @@ #define CARDINAL_NUM_AUDIO_INPUTS 2 #define CARDINAL_NUM_AUDIO_OUTPUTS 2 -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#fx" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#fx" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#fx" #if defined(__MOD_DEVICES__) # define DISTRHO_PLUGIN_NAME "Cardinal Mini" diff --git a/src/CardinalSynth/DistrhoPluginInfo.h b/src/CardinalSynth/DistrhoPluginInfo.h index 1d1ac1fc..42dfba83 100644 --- a/src/CardinalSynth/DistrhoPluginInfo.h +++ b/src/CardinalSynth/DistrhoPluginInfo.h @@ -26,10 +26,11 @@ #define CARDINAL_NUM_AUDIO_INPUTS 0 #define CARDINAL_NUM_AUDIO_OUTPUTS 2 -#define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "Cardinal Synth" -#define DISTRHO_PLUGIN_LABEL "CardinalSynth" -#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#synth" +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_NAME "Cardinal Synth" +#define DISTRHO_PLUGIN_LABEL "CardinalSynth" +#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#synth" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#synth" #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 From 495e6e5967ba2669739e9e8632c2cd5a69f03352 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 11 Sep 2022 23:19:25 +0100 Subject: [PATCH 030/451] reenable wasm build Signed-off-by: falkTX --- .github/workflows/build.yml | 128 ++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40986167..d8c86f45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -688,70 +688,70 @@ jobs: path: | *.tar.gz - #wasm: - #runs-on: ubuntu-20.04 - #steps: - #- uses: actions/checkout@v2 - #with: - #submodules: recursive - #- name: Set up cache - #id: cache - #uses: actions/cache@v2 - #with: - #path: | - #~/PawPawBuilds - #src/Rack/dep/bin - #src/Rack/dep/include - #src/Rack/dep/lib - #src/Rack/dep/share - #src/Rack/dep/jansson-2.12 - #src/Rack/dep/libarchive-3.4.3 - #src/Rack/dep/libsamplerate-0.1.9 - #src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - #src/Rack/dep/zstd-1.4.5 - #key: wasm-v${{ env.CACHE_VERSION }} - #- name: Set up dependencies - #run: | - #[ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk - #cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest - #- name: Build extra dependencies - #run: | - #source ~/PawPawBuilds/emsdk/emsdk_env.sh - #./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm - #- name: Build wasm cross-compiled - #run: | - #source ~/PawPawBuilds/emsdk/emsdk_env.sh - #pushd deps/PawPaw; source local.env wasm; popd - #make features - #make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc) - #- name: Set sha8 (non-release) - #if: startsWith(github.ref, 'refs/tags/') != true - #id: slug1 - #run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" - #- name: Set sha8 (release) - #if: startsWith(github.ref, 'refs/tags/') - #id: slug2 - #run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - #- name: Set sha8 - #id: slug - #run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - #- name: Pack binaries - #run: | - #cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) - #- uses: actions/upload-artifact@v2 - #with: - #name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} - #path: | - #*.zip - #- uses: softprops/action-gh-release@v1 - #if: startsWith(github.ref, 'refs/tags/') - #with: - #tag_name: ${{ github.ref_name }} - #name: ${{ github.ref_name }} - #draft: false - #prerelease: false - #files: | - #*.zip + wasm: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + id: cache + uses: actions/cache@v2 + with: + path: | + ~/PawPawBuilds + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 + key: wasm-v${{ env.CACHE_VERSION }} + - name: Set up dependencies + run: | + [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk + cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest + - name: Build extra dependencies + run: | + source ~/PawPawBuilds/emsdk/emsdk_env.sh + ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm + - name: Build wasm cross-compiled + run: | + source ~/PawPawBuilds/emsdk/emsdk_env.sh + pushd deps/PawPaw; source local.env wasm; popd + make features + make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc) + - name: Set sha8 (non-release) + if: startsWith(github.ref, 'refs/tags/') != true + id: slug1 + run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + - name: Set sha8 (release) + if: startsWith(github.ref, 'refs/tags/') + id: slug2 + run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" + - name: Set sha8 + id: slug + run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + - name: Pack binaries + run: | + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + path: | + *.zip + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: | + *.zip wasm-mini: runs-on: ubuntu-20.04 From b45ad4e52d904c36928f97f82ac20b70fbb5af9b Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Sep 2022 00:51:45 +0100 Subject: [PATCH 031/451] Fix wasm build Signed-off-by: falkTX --- plugins/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Makefile b/plugins/Makefile index 4e1c83c3..b848e610 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -580,7 +580,7 @@ PLUGIN_FILES += $(filter-out dBiz/src/plugin.cpp,$(wildcard dBiz/src/*.cpp)) # modules/types which are present in other plugins DBIZ_CUSTOM = Chord DarkDefaultItem Divider FourSeq FourSeqWidget OrangeLight VCA4 Wavefolder darkPanelID lightPanelID -DBIZ_CUSTOM_PER_FILE = MultiFilter Oscillator calcOutput sineOsc subBank +DBIZ_CUSTOM_PER_FILE = LERP MultiFilter Oscillator calcOutput sineOsc subBank # -------------------------------------------------------------- # DrumKit From f99e89bebdd257f3d7305bb211e14328c8cab069 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Sep 2022 11:25:44 +0100 Subject: [PATCH 032/451] Adjust dark mode for new modules from updated plugins Signed-off-by: falkTX --- src/custom/dep.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 52e7e62a..04911aa3 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -135,6 +135,8 @@ static const struct { { "/Bidoo/res/DUKE.svg", {}, -1 }, { "/Bidoo/res/EDSAROS.svg", {"rect959-3-7","rect959-3-7-8","rect959-3-7-8-1","rect959-3-7-8-1-4"}, -1 }, { "/Bidoo/res/EMILE.svg", {}, -1 }, + { "/Bidoo/res/ENCORE.svg", {}, -1 }, + { "/Bidoo/res/ENCOREExpander.svg", {}, -1 }, { "/Bidoo/res/FLAME.svg", {}, -1 }, { "/Bidoo/res/FORK.svg", {}, -1 }, { "/Bidoo/res/FREIN.svg", {}, -1 }, @@ -316,6 +318,7 @@ static const struct { { "/PathSet/res/GlassPane.svg", {}, -1 }, { "/PathSet/res/IceTray.svg", {}, -1 }, { "/PathSet/res/Nudge.svg", {}, -1 }, + { "/PathSet/res/OneShot.svg", {}, -1 }, { "/PathSet/res/ShiftyExpander.svg", {}, -1 }, { "/PathSet/res/ShiftyMod.svg", {}, -1 }, // BSD-3-Clause @@ -653,6 +656,8 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char { // main blue tone case 0xffdf7a1a: + case 0xffe78a31: + case 0xffc26a16: if (shape->opacity == 0.5f && std::strcmp(svgFileToInvert, "/PathSet/res/AstroVibe.svg") == 0) { shape->opacity = 0.2f; @@ -669,6 +674,13 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char return true; } break; + /* + // OneShot beverage + case 0xff021755: + case 0xff03299a: + case 0xff032ba2: + return false; + */ // pink step 2 (pink with 50% opacity on bg) case 0xffef73ea: paint.color = 0xff812d7d; From bf8740204027c82d0bb50b914f0f95741ef20b30 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Sep 2022 13:01:53 +0100 Subject: [PATCH 033/451] Adjust AnimatedCircuits for runtime light/dark mode change Signed-off-by: falkTX --- plugins/AnimatedCircuits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/AnimatedCircuits b/plugins/AnimatedCircuits index 76c2912f..bf78cd8e 160000 --- a/plugins/AnimatedCircuits +++ b/plugins/AnimatedCircuits @@ -1 +1 @@ -Subproject commit 76c2912fd6ebdd7c3e33fca88096bea9c67209a1 +Subproject commit bf78cd8ed22970fe9dc5ebff8e3907898904c747 From f237838d6a26ec3b45af51935264d8884ead439d Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Sep 2022 14:53:52 +0100 Subject: [PATCH 034/451] Make it easier and faster to check modules for color conversions Signed-off-by: falkTX --- src/custom/dep.cpp | 916 ++++++++++++++++++++++++--------------------- 1 file changed, 498 insertions(+), 418 deletions(-) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 04911aa3..4d0209ec 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -56,436 +56,520 @@ NVGcolor nvgRGBblank(const unsigned char r, const unsigned char g, const unsigne #undef nsvgParseFromFile #include +enum DarkMode { + kMode21kHz, + kModeAaronStatic, + kModeAlefsbits, + kModeAlgoritmarte, + kModeArableInstruments, + kModeAudibleInstruments, + kModeBidoo, + kModeCf, + kModeDrumKit, + kModeESeries, + kModeHetrickCV, + kModeJW, + kModeLilacLoop, + kModeLittleUtils, + kModeKocmoc, + kModeMyth, + kModeNonlinearcircuits, + kModeParableInstruments, + kModePathSet, + kModeVoxglitch, + kModeWhatTheRack, +}; + // Custom Cardinal filtering static const struct { + const DarkMode mode; const char* const filename; const char* shapeIdsToIgnore[5]; const int shapeNumberToIgnore; } svgFilesToInvertForDarkMode[] = { // MIT - { "/21kHz/res/Panels/D_Inf.svg", {}, -1 }, - { "/21kHz/res/Panels/PalmLoop.svg", {}, -1 }, - { "/21kHz/res/Panels/TachyonEntangler.svg", {}, -1 }, + { kMode21kHz, "/21kHz/res/Panels/D_Inf.svg", {}, -1 }, + { kMode21kHz, "/21kHz/res/Panels/PalmLoop.svg", {}, -1 }, + { kMode21kHz, "/21kHz/res/Panels/TachyonEntangler.svg", {}, -1 }, // MIT - { "/AaronStatic/res/ChordCV.svg", {}, -1 }, - { "/AaronStatic/res/DiatonicCV.svg", {}, -1 }, - { "/AaronStatic/res/RandomNoteCV.svg", {}, -1 }, - { "/AaronStatic/res/ScaleCV.svg", {}, -1 }, + { kModeAaronStatic, "/AaronStatic/res/ChordCV.svg", {}, -1 }, + { kModeAaronStatic, "/AaronStatic/res/DiatonicCV.svg", {}, -1 }, + { kModeAaronStatic, "/AaronStatic/res/RandomNoteCV.svg", {}, -1 }, + { kModeAaronStatic, "/AaronStatic/res/ScaleCV.svg", {}, -1 }, // GPL3.0-or-later - { "/alefsbits/res/blank6hp.svg", {}, -1 }, - { "/alefsbits/res/fibb.svg", {}, -1 }, - { "/alefsbits/res/logic.svg", {}, -1 }, - { "/alefsbits/res/math.svg", {}, -1 }, - { "/alefsbits/res/mlt.svg", {}, -1 }, - { "/alefsbits/res/noize.svg", {}, -1 }, - { "/alefsbits/res/octsclr.svg", {}, -1 }, - { "/alefsbits/res/polyrand.svg", {}, -1 }, - { "/alefsbits/res/shift.svg", {}, -1 }, - { "/alefsbits/res/simplexandhold.svg", {}, -1 }, - { "/alefsbits/res/simplexvco.svg", {}, -1 }, - { "/alefsbits/res/steps.svg", {}, -1 }, - { "/alefsbits/res/switch.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/blank6hp.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/fibb.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/logic.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/math.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/mlt.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/noize.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/octsclr.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/polyrand.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/shift.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/simplexandhold.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/simplexvco.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/steps.svg", {}, -1 }, + { kModeAlefsbits, "/alefsbits/res/switch.svg", {}, -1 }, // GPL3.0-or-later - { "/Algoritmarte/res/Clockkky.svg", {}, -1 }, - { "/Algoritmarte/res/CyclicCA.svg", {}, -1 }, - { "/Algoritmarte/res/HoldMeTight.svg", {}, -1 }, - { "/Algoritmarte/res/MusiFrog.svg", {}, -1 }, - { "/Algoritmarte/res/MusiMath.svg", {}, -1 }, - { "/Algoritmarte/res/Planetz.svg", {}, -1 }, - { "/Algoritmarte/res/Zefiro.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/Clockkky.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/CyclicCA.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/HoldMeTight.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/MusiFrog.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/MusiMath.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/Planetz.svg", {}, -1 }, + { kModeAlgoritmarte, "/Algoritmarte/res/Zefiro.svg", {}, -1 }, // Custom, runtime dark mode used with permission - { "/ArableInstruments/res/Joni.svg", {}, -1 }, + { kModeArableInstruments, "/ArableInstruments/res/Joni.svg", {}, -1 }, // Custom, runtime dark mode used with permission - { "/AudibleInstruments/res/Blinds.svg", {}, -1 }, - { "/AudibleInstruments/res/Braids.svg", {}, -1 }, - { "/AudibleInstruments/res/Branches.svg", {}, -1 }, - { "/AudibleInstruments/res/Clouds.svg", {}, -1 }, - { "/AudibleInstruments/res/Elements.svg", {}, -1 }, - { "/AudibleInstruments/res/Frames.svg", {}, -1 }, - { "/AudibleInstruments/res/Kinks.svg", {}, -1 }, - { "/AudibleInstruments/res/Links.svg", {}, -1 }, - { "/AudibleInstruments/res/Marbles.svg", {}, -1 }, - { "/AudibleInstruments/res/Peaks.svg", {}, -1 }, - { "/AudibleInstruments/res/Plaits.svg", {}, -1 }, - { "/AudibleInstruments/res/Rings.svg", {}, -1 }, - { "/AudibleInstruments/res/Ripples.svg", {}, -1 }, - { "/AudibleInstruments/res/Shades.svg", {}, -1 }, - { "/AudibleInstruments/res/Sheep.svg", {}, -1 }, - { "/AudibleInstruments/res/Shelves.svg", {}, -1 }, - { "/AudibleInstruments/res/Stages.svg", {}, -1 }, - { "/AudibleInstruments/res/Streams.svg", {}, -1 }, - { "/AudibleInstruments/res/Tides.svg", {}, -1 }, - { "/AudibleInstruments/res/Tides2.svg", {}, -1 }, - { "/AudibleInstruments/res/Veils.svg", {}, -1 }, - { "/AudibleInstruments/res/Warps.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Blinds.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Braids.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Branches.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Clouds.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Elements.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Frames.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Kinks.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Links.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Marbles.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Peaks.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Plaits.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Rings.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Ripples.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Shades.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Sheep.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Shelves.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Stages.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Streams.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Tides.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Tides2.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Veils.svg", {}, -1 }, + { kModeAudibleInstruments, "/AudibleInstruments/res/Warps.svg", {}, -1 }, // CC-BY-NC-ND-4.0, runtime dark mode used with permission - { "/Bidoo/res/ACNE.svg", {}, -1 }, - { "/Bidoo/res/ANTN.svg", {}, -1 }, - { "/Bidoo/res/BAFIS.svg", {}, -1 }, - { "/Bidoo/res/BANCAU.svg", {}, -1 }, - { "/Bidoo/res/BAR.svg", {"rect833"}, -1 }, - { "/Bidoo/res/BISTROT.svg", {}, -1 }, - { "/Bidoo/res/BORDL.svg", {"rect959-3-0-7-5","rect959-3-0-7","rect959-3-0","rect959-3"}, -1 }, - { "/Bidoo/res/CANARD.svg", {"rect959-3-7"}, -1 }, - { "/Bidoo/res/CHUTE.svg", {}, -1 }, - { "/Bidoo/res/DFUZE.svg", {}, -1 }, - { "/Bidoo/res/DIKTAT.svg", {"rect843","rect843-0","rect843-0-8"}, -1 }, - { "/Bidoo/res/DILEMO.svg", {}, -1 }, - { "/Bidoo/res/DTROY.svg", {"rect959-3"}, -1 }, - { "/Bidoo/res/DUKE.svg", {}, -1 }, - { "/Bidoo/res/EDSAROS.svg", {"rect959-3-7","rect959-3-7-8","rect959-3-7-8-1","rect959-3-7-8-1-4"}, -1 }, - { "/Bidoo/res/EMILE.svg", {}, -1 }, - { "/Bidoo/res/ENCORE.svg", {}, -1 }, - { "/Bidoo/res/ENCOREExpander.svg", {}, -1 }, - { "/Bidoo/res/FLAME.svg", {}, -1 }, - { "/Bidoo/res/FORK.svg", {}, -1 }, - { "/Bidoo/res/FREIN.svg", {}, -1 }, - { "/Bidoo/res/HCTIP.svg", {}, -1 }, - { "/Bidoo/res/HUITRE.svg", {}, -1 }, - { "/Bidoo/res/LAMBDA.svg", {}, -1 }, - { "/Bidoo/res/LATE.svg", {}, -1 }, - { "/Bidoo/res/LIMBO.svg", {}, -1 }, - { "/Bidoo/res/LIMONADE.svg", {"rect839","rect839-6"}, -1 }, - { "/Bidoo/res/LOURDE.svg", {"rect847","rect847-7","rect847-5","rect847-3"}, -1 }, - { "/Bidoo/res/MAGMA.svg", {}, -1 }, - { "/Bidoo/res/MINIBAR.svg", {"rect833"}, -1 }, - { "/Bidoo/res/MOIRE.svg", {"rect843","rect843-7"}, -1 }, - { "/Bidoo/res/MS.svg", {}, -1 }, - { "/Bidoo/res/MU.svg", {"rect864"}, -1 }, - { "/Bidoo/res/OAI.svg", {}, -1 }, - { "/Bidoo/res/OUAIVE.svg", {"rect959-3-7"}, -1 }, - { "/Bidoo/res/PERCO.svg", {}, -1 }, - { "/Bidoo/res/PILOT.svg", {"rect843-6-4-5","rect843","rect843-4","rect843-6-4","rect843-6-7"}, -1 }, - { "/Bidoo/res/POUPRE.svg", {}, -1 }, - { "/Bidoo/res/RABBIT.svg", {}, -1 }, - { "/Bidoo/res/REI.svg", {}, -1 }, - { "/Bidoo/res/SIGMA.svg", {}, -1 }, - { "/Bidoo/res/SPORE.svg", {}, -1 }, - { "/Bidoo/res/TIARE.svg", {}, -1 }, - { "/Bidoo/res/TOCANTE.svg", {"rect843"}, -1 }, - { "/Bidoo/res/VOID.svg", {}, -1 }, - { "/Bidoo/res/ZINC.svg", {}, -1 }, - { "/Bidoo/res/ZOUMAI.svg", {}, -1 }, - { "/Bidoo/res/ZOUMAIExpander.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ACNE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ANTN.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/BAFIS.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/BANCAU.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/BAR.svg", {"rect833"}, -1 }, + { kModeBidoo, "/Bidoo/res/BISTROT.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/BORDL.svg", {"rect959-3-0-7-5","rect959-3-0-7","rect959-3-0","rect959-3"}, -1 }, + { kModeBidoo, "/Bidoo/res/CANARD.svg", {"rect959-3-7"}, -1 }, + { kModeBidoo, "/Bidoo/res/CHUTE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/DFUZE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/DIKTAT.svg", {"rect843","rect843-0","rect843-0-8"}, -1 }, + { kModeBidoo, "/Bidoo/res/DILEMO.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/DTROY.svg", {"rect959-3"}, -1 }, + { kModeBidoo, "/Bidoo/res/DUKE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/EDSAROS.svg", {"rect959-3-7","rect959-3-7-8","rect959-3-7-8-1","rect959-3-7-8-1-4"}, -1 }, + { kModeBidoo, "/Bidoo/res/EMILE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ENCORE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ENCOREExpander.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/FLAME.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/FORK.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/FREIN.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/HCTIP.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/HUITRE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/LAMBDA.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/LATE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/LIMBO.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/LIMONADE.svg", {"rect839","rect839-6"}, -1 }, + { kModeBidoo, "/Bidoo/res/LOURDE.svg", {"rect847","rect847-7","rect847-5","rect847-3"}, -1 }, + { kModeBidoo, "/Bidoo/res/MAGMA.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/MINIBAR.svg", {"rect833"}, -1 }, + { kModeBidoo, "/Bidoo/res/MOIRE.svg", {"rect843","rect843-7"}, -1 }, + { kModeBidoo, "/Bidoo/res/MS.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/MU.svg", {"rect864"}, -1 }, + { kModeBidoo, "/Bidoo/res/OAI.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/OUAIVE.svg", {"rect959-3-7"}, -1 }, + { kModeBidoo, "/Bidoo/res/PERCO.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/PILOT.svg", {"rect843-6-4-5","rect843","rect843-4","rect843-6-4","rect843-6-7"}, -1 }, + { kModeBidoo, "/Bidoo/res/POUPRE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/RABBIT.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/REI.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/SIGMA.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/SPORE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/TIARE.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/TOCANTE.svg", {"rect843"}, -1 }, + { kModeBidoo, "/Bidoo/res/VOID.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ZINC.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ZOUMAI.svg", {}, -1 }, + { kModeBidoo, "/Bidoo/res/ZOUMAIExpander.svg", {}, -1 }, // BSD-3-Clause - { "/cf/res/ALGEBRA.svg", {}, -1 }, - { "/cf/res/BUFFER.svg", {}, -1 }, - { "/cf/res/CHOKE.svg", {}, -1 }, - { "/cf/res/CUBE.svg", {}, -1 }, - { "/cf/res/CUTS.svg", {}, -1 }, - { "/cf/res/DISTO.svg", {}, -1 }, - { "/cf/res/EACH.svg", {}, -1 }, - { "/cf/res/FOUR.svg", {}, -1 }, - { "/cf/res/FUNKTION.svg", {}, -1 }, - { "/cf/res/L3DS3Q.svg", {}, 3 }, - { "/cf/res/LABEL.svg", {}, -1 }, - { "/cf/res/LEDS.svg", {}, -1 }, - { "/cf/res/LEDSEQ.svg", {}, 3 }, - { "/cf/res/MASTER.svg", {}, -1 }, - { "/cf/res/METRO.svg", {}, -1 }, - { "/cf/res/MONO.svg", {}, -1 }, - { "/cf/res/PATCH.svg", {}, -1 }, - { "/cf/res/PEAK.svg", {}, -1 }, - { "/cf/res/PLAY.svg", {}, -1 }, - { "/cf/res/PLAYER.svg", {}, -1 }, - { "/cf/res/SLIDERSEQ.svg", {}, -1 }, - { "/cf/res/STEPS.svg", {}, -1 }, - { "/cf/res/STEREO.svg", {}, -1 }, - { "/cf/res/SUB.svg", {}, -1 }, - { "/cf/res/trSEQ.svg", {}, -1 }, - { "/cf/res/VARIABLE.svg", {}, -1 }, + { kModeCf, "/cf/res/ALGEBRA.svg", {}, -1 }, + { kModeCf, "/cf/res/BUFFER.svg", {}, -1 }, + { kModeCf, "/cf/res/CHOKE.svg", {}, -1 }, + { kModeCf, "/cf/res/CUBE.svg", {}, -1 }, + { kModeCf, "/cf/res/CUTS.svg", {}, -1 }, + { kModeCf, "/cf/res/DISTO.svg", {}, -1 }, + { kModeCf, "/cf/res/EACH.svg", {}, -1 }, + { kModeCf, "/cf/res/FOUR.svg", {}, -1 }, + { kModeCf, "/cf/res/FUNKTION.svg", {}, -1 }, + { kModeCf, "/cf/res/L3DS3Q.svg", {}, 3 }, + { kModeCf, "/cf/res/LABEL.svg", {}, -1 }, + { kModeCf, "/cf/res/LEDS.svg", {}, -1 }, + { kModeCf, "/cf/res/LEDSEQ.svg", {}, 3 }, + { kModeCf, "/cf/res/MASTER.svg", {}, -1 }, + { kModeCf, "/cf/res/METRO.svg", {}, -1 }, + { kModeCf, "/cf/res/MONO.svg", {}, -1 }, + { kModeCf, "/cf/res/PATCH.svg", {}, -1 }, + { kModeCf, "/cf/res/PEAK.svg", {}, -1 }, + { kModeCf, "/cf/res/PLAY.svg", {}, -1 }, + { kModeCf, "/cf/res/PLAYER.svg", {}, -1 }, + { kModeCf, "/cf/res/SLIDERSEQ.svg", {}, -1 }, + { kModeCf, "/cf/res/STEPS.svg", {}, -1 }, + { kModeCf, "/cf/res/STEREO.svg", {}, -1 }, + { kModeCf, "/cf/res/SUB.svg", {}, -1 }, + { kModeCf, "/cf/res/trSEQ.svg", {}, -1 }, + { kModeCf, "/cf/res/VARIABLE.svg", {}, -1 }, // CC0-1.0 - { "/DrumKit/res/Baronial.svg", {}, -1 }, - { "/DrumKit/res/BD9.svg", {}, -1 }, - { "/DrumKit/res/ClosedHH.svg", {}, -1 }, - { "/DrumKit/res/CR78.svg", {}, -1 }, - { "/DrumKit/res/DMX.svg", {}, -1 }, - { "/DrumKit/res/Gnome.svg", {}, -1 }, - { "/DrumKit/res/Marionette.svg", {}, -1 }, - { "/DrumKit/res/OpenHH.svg", {}, -1 }, - { "/DrumKit/res/SBD.svg", {}, -1 }, - { "/DrumKit/res/Sequencer.svg", {}, -1 }, - { "/DrumKit/res/Snare.svg", {}, -1 }, - { "/DrumKit/res/Tomi.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/Baronial.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/BD9.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/ClosedHH.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/CR78.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/DMX.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/Gnome.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/Marionette.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/OpenHH.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/SBD.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/Sequencer.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/Snare.svg", {}, -1 }, + { kModeDrumKit, "/DrumKit/res/Tomi.svg", {}, -1 }, // Custom, runtime dark mode used with permission - { "/ESeries/res/E340.svg", {}, -1 }, + { kModeESeries,"/ESeries/res/E340.svg", {}, -1 }, // CC0-1.0 - { "/HetrickCV/res/1OpChaos.svg", {}, -1}, - { "/HetrickCV/res/2OpChaos.svg", {}, -1}, - { "/HetrickCV/res/2To4.svg", {}, -1}, - { "/HetrickCV/res/3OpChaos.svg", {}, -1}, - { "/HetrickCV/res/ASR.svg", {}, -1}, - { "/HetrickCV/res/AToD.svg", {}, -1}, - { "/HetrickCV/res/BinaryGate.svg", {}, -1}, - { "/HetrickCV/res/BinaryNoise.svg", {}, -1}, - { "/HetrickCV/res/Bitshift.svg", {}, -1}, - { "/HetrickCV/res/Boolean3.svg", {}, -1}, - { "/HetrickCV/res/ChaoticAttractors.svg", {}, -1}, - { "/HetrickCV/res/ClockedNoise.svg", {}, -1}, - { "/HetrickCV/res/Comparator.svg", {}, -1}, - { "/HetrickCV/res/Contrast.svg", {}, -1}, - { "/HetrickCV/res/Crackle.svg", {}, -1}, - { "/HetrickCV/res/DataCompander.svg", {}, -1}, - { "/HetrickCV/res/Delta.svg", {}, -1}, - { "/HetrickCV/res/DToA.svg", {}, -1}, - { "/HetrickCV/res/Dust.svg", {}, -1}, - { "/HetrickCV/res/Exponent.svg", {}, -1}, - { "/HetrickCV/res/FBSineChaos.svg", {}, -1}, - { "/HetrickCV/res/FlipFlop.svg", {}, -1}, - { "/HetrickCV/res/FlipPan.svg", {}, -1}, - { "/HetrickCV/res/GateJunction.svg", {}, -1}, - { "/HetrickCV/res/Gingerbread.svg", {}, -1}, - { "/HetrickCV/res/LogicCombiner.svg", {}, -1}, - { "/HetrickCV/res/LogicInverter.svg", {}, -1}, - { "/HetrickCV/res/MidSide.svg", {}, -1}, - { "/HetrickCV/res/MinMax.svg", {}, -1}, - { "/HetrickCV/res/RandomGates.svg", {}, -1}, - { "/HetrickCV/res/Rotator.svg", {}, -1}, - { "/HetrickCV/res/Rungler.svg", {}, -1}, - { "/HetrickCV/res/Scanner.svg", {}, -1}, - { "/HetrickCV/res/TrigShaper.svg", {}, -1}, - { "/HetrickCV/res/Waveshape.svg", {}, -1}, - { "/HetrickCV/res/XYToPolar.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel1.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel2.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel3.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel5.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel6.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel7.svg", {}, -1}, - { "/HetrickCV/res/Blanks/BlankPanel8.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/1OpChaos.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/2OpChaos.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/2To4.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/3OpChaos.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/ASR.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/AToD.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/BinaryGate.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/BinaryNoise.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Bitshift.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Boolean3.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/ChaoticAttractors.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/ClockedNoise.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Comparator.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Contrast.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Crackle.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/DataCompander.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Delta.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/DToA.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Dust.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Exponent.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/FBSineChaos.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/FlipFlop.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/FlipPan.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/GateJunction.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Gingerbread.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/LogicCombiner.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/LogicInverter.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/MidSide.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/MinMax.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/RandomGates.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Rotator.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Rungler.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Scanner.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/TrigShaper.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Waveshape.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/XYToPolar.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel1.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel2.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel3.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel5.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel6.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel7.svg", {}, -1}, + { kModeHetrickCV, "/HetrickCV/res/Blanks/BlankPanel8.svg", {}, -1}, // BSD-3-Clause - { "/JW-Modules/res/Add5.svg", {}, -1 }, - { "/JW-Modules/res/BlankPanel1hp.svg", {}, -1 }, - { "/JW-Modules/res/BlankPanelLarge.svg", {}, -1 }, - { "/JW-Modules/res/BlankPanelMedium.svg", {}, -1 }, - { "/JW-Modules/res/BlankPanelSmall.svg", {}, -1 }, - { "/JW-Modules/res/BouncyBalls.svg", {}, -1 }, - { "/JW-Modules/res/D1v1de.svg", {}, -1 }, - { "/JW-Modules/res/DivSeq.svg", {}, -1 }, - { "/JW-Modules/res/EightSeq.svg", {}, -1 }, - { "/JW-Modules/res/GridSeq.svg", {}, -1 }, - { "/JW-Modules/res/MinMax.svg", {"path38411"}, -1 }, - { "/JW-Modules/res/NoteSeq.svg", {}, -1 }, - { "/JW-Modules/res/NoteSeq16.svg", {}, -1 }, - { "/JW-Modules/res/NoteSeqFu.svg", {}, -1 }, - { "/JW-Modules/res/OnePattern.svg", {}, -1 }, - { "/JW-Modules/res/Patterns.svg", {}, -1 }, - { "/JW-Modules/res/Pres1t.svg", {}, -1 }, - { "/JW-Modules/res/PT.svg", {}, -1 }, - { "/JW-Modules/res/Str1ker.svg", {"rect2094","rect995","rect169"}, -1 }, - { "/JW-Modules/res/Trigs.svg", {}, -1 }, - { "/JW-Modules/res/WavHeadPanel.svg", {}, -1 }, - { "/JW-Modules/res/XYPad.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/Add5.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/BlankPanel1hp.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/BlankPanelLarge.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/BlankPanelMedium.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/BlankPanelSmall.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/BouncyBalls.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/D1v1de.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/DivSeq.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/EightSeq.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/GridSeq.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/MinMax.svg", {"path38411"}, -1 }, + { kModeJW, "/JW-Modules/res/NoteSeq.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/NoteSeq16.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/NoteSeqFu.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/OnePattern.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/Patterns.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/Pres1t.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/PT.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/Str1ker.svg", {"rect2094","rect995","rect169"}, -1 }, + { kModeJW, "/JW-Modules/res/Trigs.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/WavHeadPanel.svg", {}, -1 }, + { kModeJW, "/JW-Modules/res/XYPad.svg", {}, -1 }, // GPL3.0-or-later - { "/LilacLoop/res/Looper.svg", {}, -1 }, + { kModeLilacLoop, "/LilacLoop/res/Looper.svg", {}, -1 }, // EUPL-1.2 - { "/LittleUtils/res/Bias_Semitone.svg", {}, -1 }, - { "/LittleUtils/res/ButtonModule.svg", {}, -1 }, - { "/LittleUtils/res/MulDiv.svg", {}, -1 }, - { "/LittleUtils/res/PulseGenerator.svg", {}, -1 }, - { "/LittleUtils/res/TeleportIn.svg", {}, -1 }, - { "/LittleUtils/res/TeleportOut.svg", {}, -1 }, + { kModeLittleUtils, "/LittleUtils/res/Bias_Semitone.svg", {}, -1 }, + { kModeLittleUtils, "/LittleUtils/res/ButtonModule.svg", {}, -1 }, + { kModeLittleUtils, "/LittleUtils/res/MulDiv.svg", {}, -1 }, + { kModeLittleUtils, "/LittleUtils/res/PulseGenerator.svg", {}, -1 }, + { kModeLittleUtils, "/LittleUtils/res/TeleportIn.svg", {}, -1 }, + { kModeLittleUtils, "/LittleUtils/res/TeleportOut.svg", {}, -1 }, // GPL-3.0-or-later - { "/kocmoc/res/DDLY.svg", {}, -1 }, - { "/kocmoc/res/LADR.svg", {}, -1 }, - { "/kocmoc/res/MUL.svg", {}, -1 }, - { "/kocmoc/res/OP.svg", {}, -1 }, - { "/kocmoc/res/PHASR.svg", {}, -1 }, - { "/kocmoc/res/SKF.svg", {}, -1 }, - { "/kocmoc/res/SVF.svg", {}, -1 }, - { "/kocmoc/res/TRG.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/DDLY.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/LADR.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/MUL.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/OP.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/PHASR.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/SKF.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/SVF.svg", {}, -1 }, + { kModeKocmoc, "/kocmoc/res/TRG.svg", {}, -1 }, // GPL-3.0-or-later - { "/myth-modules/res/Mavka.svg", {}, -1 }, - { "/myth-modules/res/Molphar.svg", {}, -1 }, + { kModeMyth, "/myth-modules/res/Mavka.svg", {}, -1 }, + { kModeMyth, "/myth-modules/res/Molphar.svg", {}, -1 }, // CC0-1.0 - { "/nonlinearcircuits/res/BOOLs2.svg", {}, -1 }, - { "/nonlinearcircuits/res/DoubleNeuronRef.svg", {}, -1 }, - { "/nonlinearcircuits/res/LetsSplosh.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - 4seq.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - 8 BIT CIPHER.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - DIVIDE & CONQUER.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - DIVINE CMOS.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - GENiE.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - NEURON.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - NUMBERWANG.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 }, - { "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 }, - { "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/BOOLs2.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/DoubleNeuronRef.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/LetsSplosh.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - 4seq.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - 8 BIT CIPHER.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - DIVIDE & CONQUER.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - DIVINE CMOS.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - GENiE.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - NEURON.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - NUMBERWANG.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 }, + { kModeNonlinearcircuits, "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 }, // Custom, runtime dark mode used with permission - { "/ParableInstruments/res/Neil.svg", {}, -1 }, + { kModeParableInstruments, "/ParableInstruments/res/Neil.svg", {}, -1 }, // GPL-3.0-or-later - { "/PathSet/res/AstroVibe.svg", {}, -1 }, - { "/PathSet/res/GlassPane.svg", {}, -1 }, - { "/PathSet/res/IceTray.svg", {}, -1 }, - { "/PathSet/res/Nudge.svg", {}, -1 }, - { "/PathSet/res/OneShot.svg", {}, -1 }, - { "/PathSet/res/ShiftyExpander.svg", {}, -1 }, - { "/PathSet/res/ShiftyMod.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/AstroVibe.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/GlassPane.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/IceTray.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/Nudge.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/OneShot.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/ShiftyExpander.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/ShiftyMod.svg", {}, -1 }, // BSD-3-Clause - { "/voxglitch/res/autobreak_front_panel.svg", {}, -1 }, - { "/voxglitch/res/bytebeat_front_panel.svg", {}, -1 }, - { "/voxglitch/res/digital_programmer_front_panel.svg", {}, -1 }, - { "/voxglitch/res/digital_sequencer_front_panel.svg", {}, -1 }, - { "/voxglitch/res/digital_sequencer_xp_front_panel.svg", {}, -1 }, - { "/voxglitch/res/ghosts_front_panel.svg", {}, -1 }, - { "/voxglitch/res/glitch_sequencer_front_panel.svg", {}, -1 }, - { "/voxglitch/res/goblins_front_panel.svg", {}, -1 }, - { "/voxglitch/res/grain_engine_mk2_expander_front_panel.svg", {}, -1 }, - { "/voxglitch/res/grain_engine_mk2_front_panel_r3.svg", {}, -1 }, - { "/voxglitch/res/grain_fx_front_panel.svg", {}, -1 }, - { "/voxglitch/res/hazumi_front_panel.svg", {}, -1 }, - { "/voxglitch/res/looper_front_panel.svg", {}, -1 }, - { "/voxglitch/res/repeater_front_panel.svg", {}, -1 }, - { "/voxglitch/res/samplerx8_front_panel.svg", {}, -1 }, - { "/voxglitch/res/satanonaut_front_panel.svg", {}, -1 }, - { "/voxglitch/res/wav_bank_front_panel.svg", {}, -1 }, - { "/voxglitch/res/wav_bank_mc_front_panel_v2.svg", {}, -1 }, - { "/voxglitch/res/xy_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/autobreak_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/bytebeat_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/digital_programmer_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/digital_sequencer_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/digital_sequencer_xp_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/ghosts_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/glitch_sequencer_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/goblins_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/grain_engine_mk2_expander_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/grain_engine_mk2_front_panel_r3.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/grain_fx_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/hazumi_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/looper_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/repeater_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/samplerx8_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/satanonaut_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/wav_bank_front_panel.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/wav_bank_mc_front_panel_v2.svg", {}, -1 }, + { kModeVoxglitch, "/voxglitch/res/xy_front_panel.svg", {}, -1 }, // WTFPL - { "/WhatTheRack/res/WhatTheJack.svg", {}, -1 }, - { "/WhatTheRack/res/WhatTheMod.svg", {}, -1 }, - { "/WhatTheRack/res/WhatTheRack.svg", {}, -1 }, + { kModeWhatTheRack, "/WhatTheRack/res/WhatTheJack.svg", {}, -1 }, + { kModeWhatTheRack, "/WhatTheRack/res/WhatTheMod.svg", {}, -1 }, + { kModeWhatTheRack, "/WhatTheRack/res/WhatTheRack.svg", {}, -1 }, +}; + +enum LightMode { + kModeAutinn, + kModeBefaco, + kModeCardinal, + kModeFehlerFabrik, + kModeForsitan, + kModeFundamental, // FIXME remove + kModeGoodSheperd, + kModeH4n4, + kModeHamptonHarmonics, + kModeLomas, + kModeSonusmodular, }; static const struct { + const LightMode mode; const char* const filename; const char* shapeIdsToIgnore[5]; const int shapeNumberToIgnore; } svgFilesToInvertForLightMode[] = { // GPLv3+ /* FIXME does not work very well - { "/Autinn/res/AmpModule.svg", {}, -1 }, - { "/Autinn/res/BassModule.svg", {}, -1 }, - { "/Autinn/res/CVConverterModule.svg", {}, -1 }, - { "/Autinn/res/ComponentLibrary", {}, -1 }, - { "/Autinn/res/DeadbandModule.svg", {}, -1 }, - { "/Autinn/res/DigiModule.svg", {}, -1 }, - { "/Autinn/res/DiseeModule.svg", {}, -1 }, - { "/Autinn/res/FilModule.svg", {}, -1 }, - { "/Autinn/res/FlopperModule.svg", {}, -1 }, - { "/Autinn/res/ImpModule.svg", {}, -1 }, - { "/Autinn/res/JetteModule.svg", {}, -1 }, - { "/Autinn/res/MelodyModule.svg", {}, -1 }, - { "/Autinn/res/MeraModule.svg", {}, -1 }, - { "/Autinn/res/Mixer6Module.svg", {}, -1 }, - { "/Autinn/res/NapModule.svg", {}, -1 }, - { "/Autinn/res/NonModule.svg", {}, -1 }, - { "/Autinn/res/OxcartModule.svg", {}, -1 }, - { "/Autinn/res/RebelModule.svg", {}, -1 }, - { "/Autinn/res/RetriModule.svg", {}, -1 }, - { "/Autinn/res/SawModule.svg", {}, -1 }, - { "/Autinn/res/SjipModule.svg", {}, -1 }, - { "/Autinn/res/SquareModule.svg", {}, -1 }, - { "/Autinn/res/VibratoModule.svg", {}, -1 }, - { "/Autinn/res/VxyModule.svg", {}, -1 }, - { "/Autinn/res/ZodModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/AmpModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/BassModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/CVConverterModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/ComponentLibrary", {}, -1 }, + { kModeAutinn, "/Autinn/res/DeadbandModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/DigiModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/DiseeModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/FilModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/FlopperModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/ImpModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/JetteModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/MelodyModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/MeraModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/Mixer6Module.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/NapModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/NonModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/OxcartModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/RebelModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/RetriModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/SawModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/SjipModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/SquareModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/VibratoModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/VxyModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/ZodModule.svg", {}, -1 }, */ - // ??? used for testing, might get turned off - { "/Befaco/res/components/Knurlie.svg", {}, -1 }, - { "/Befaco/res/panels/ABC.svg", {}, -1 }, - { "/Befaco/res/panels/ADSR.svg", {}, -1 }, - { "/Befaco/res/panels/ChoppingKinky.svg", {}, -1 }, - { "/Befaco/res/panels/DualAtenuverter.svg", {}, -1 }, - { "/Befaco/res/panels/EvenVCO.svg", {}, -1 }, - { "/Befaco/res/panels/HexmixVCA.svg", {}, -1 }, - { "/Befaco/res/panels/Kickall.svg", {}, -1 }, - { "/Befaco/res/panels/Mex.svg", {}, -1 }, - { "/Befaco/res/panels/Mixer.svg", {}, -1 }, - { "/Befaco/res/panels/Morphader.svg", {}, -1 }, - { "/Befaco/res/panels/Muxlicer.svg", {}, -1 }, - { "/Befaco/res/panels/NoisePlethora.svg", {}, -1 }, - { "/Befaco/res/panels/Percall.svg", {}, -1 }, - { "/Befaco/res/panels/Rampage.svg", {}, -1 }, - { "/Befaco/res/panels/STMix.svg", {}, -1 }, - { "/Befaco/res/panels/SamplingModulator.svg", {}, -1 }, - { "/Befaco/res/panels/SlewLimiter.svg", {}, -1 }, - { "/Befaco/res/panels/SpringReverb.svg", {}, -1 }, - { "/Befaco/res/panels/StereoStrip.svg", {}, -1 }, + // Custom, runtime light mode used with permission + { kModeBefaco, "/Befaco/res/components/Knurlie.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/ABC.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/ADSR.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/ChoppingKinky.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/DualAtenuverter.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/EvenVCO.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/HexmixVCA.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Kickall.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Mex.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Mixer.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Morphader.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Muxlicer.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/NoisePlethora.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Percall.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/Rampage.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/STMix.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/SamplingModulator.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/SlewLimiter.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/SpringReverb.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/panels/StereoStrip.svg", {}, -1 }, + // GPLv3+ + { kModeCardinal, "/Cardinal/res/AudioFile.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/AudioToCVPitch.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/Carla.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/ExpanderMIDI.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/glBars.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostAudio.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostCV.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostMIDI.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostMIDICC.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostMIDIGate.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostMIDIMap.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostParameters.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostParamsMap.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/HostTime.svg", {}, -1 }, + { kModeCardinal, "/Cardinal/res/Ildaeil.svg", {}, -1 }, + // TODO chowdsp // GPLv3+ - { "/Cardinal/res/AudioFile.svg", {}, -1 }, - { "/Cardinal/res/AudioToCVPitch.svg", {}, -1 }, - { "/Cardinal/res/Carla.svg", {}, -1 }, - { "/Cardinal/res/ExpanderMIDI.svg", {}, -1 }, - { "/Cardinal/res/glBars.svg", {}, -1 }, - { "/Cardinal/res/HostAudio.svg", {}, -1 }, - { "/Cardinal/res/HostCV.svg", {}, -1 }, - { "/Cardinal/res/HostMIDI.svg", {}, -1 }, - { "/Cardinal/res/HostMIDICC.svg", {}, -1 }, - { "/Cardinal/res/HostMIDIGate.svg", {}, -1 }, - { "/Cardinal/res/HostMIDIMap.svg", {}, -1 }, - { "/Cardinal/res/HostParameters.svg", {}, -1 }, - { "/Cardinal/res/HostParamsMap.svg", {}, -1 }, - { "/Cardinal/res/HostTime.svg", {}, -1 }, - { "/Cardinal/res/Ildaeil.svg", {}, -1 }, + /* FIXME needs color adjustments + { kModeFehlerFabrik, "/FehlerFabrik/res/Arpanet.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Aspect.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Botzinger.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Chi.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Components", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Fax.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Lilt.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Luigi.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Monte.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Nova.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Planck.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/PSIOP.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Rasoir.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Sigma.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Components/FFHexScrew.svg", {}, -1 }, + */ // GPLv3+ - { "/forsitan-modulare/res/alea.svg", {}, -1 }, - { "/forsitan-modulare/res/cumuli.svg", {}, -1 }, - { "/forsitan-modulare/res/deinde.svg", {}, -1 }, - { "/forsitan-modulare/res/interea.svg", {}, -1 }, - { "/forsitan-modulare/res/palette.svg", {}, -1 }, - { "/forsitan-modulare/res/pavo.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/alea.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/cumuli.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/deinde.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/interea.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/palette.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/pavo.svg", {}, -1 }, // GPLv3+ - { "/Fundamental/res/8vert.svg", {}, -1 }, - { "/Fundamental/res/ADSR.svg", {}, -1 }, - { "/Fundamental/res/Delay.svg", {}, -1 }, - { "/Fundamental/res/LFO.svg", {}, -1 }, - { "/Fundamental/res/Merge.svg", {}, -1 }, - { "/Fundamental/res/MidSide.svg", {}, -1 }, - { "/Fundamental/res/Mixer.svg", {}, -1 }, - { "/Fundamental/res/Mutes.svg", {}, -1 }, - { "/Fundamental/res/Noise.svg", {}, -1 }, - { "/Fundamental/res/Octave.svg", {}, -1 }, - { "/Fundamental/res/Pulses.svg", {}, -1 }, - { "/Fundamental/res/Quantizer.svg", {}, -1 }, - { "/Fundamental/res/Random.svg", {}, -1 }, - { "/Fundamental/res/SEQ3.svg", {}, -1 }, - { "/Fundamental/res/Scope.svg", {}, -1 }, - { "/Fundamental/res/SequentialSwitch1.svg", {}, -1 }, - { "/Fundamental/res/SequentialSwitch2.svg", {}, -1 }, - { "/Fundamental/res/Split.svg", {}, -1 }, - { "/Fundamental/res/Sum.svg", {}, -1 }, - { "/Fundamental/res/VCA-1.svg", {}, -1 }, - { "/Fundamental/res/VCA.svg", {}, -1 }, - { "/Fundamental/res/VCF.svg", {}, -1 }, - { "/Fundamental/res/VCMixer.svg", {}, -1 }, - { "/Fundamental/res/VCO.svg", {}, -1 }, - { "/Fundamental/res/WTLFO.svg", {}, -1 }, - { "/Fundamental/res/WTVCO.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/8vert.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/ADSR.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Delay.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/LFO.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Merge.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/MidSide.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Mixer.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Mutes.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Noise.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Octave.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Pulses.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Quantizer.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Random.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/SEQ3.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Scope.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/SequentialSwitch1.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/SequentialSwitch2.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Split.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/Sum.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/VCA-1.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/VCA.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/VCF.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/VCMixer.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/VCO.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/WTLFO.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/WTVCO.svg", {}, -1 }, + // GPLv3+ + /* FIXME needs color adjustments + { kModeGoodSheperd, "/GoodSheperd/res/Holzschnabel.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/Hurdle.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/SEQ3st.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/Seqtrol.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/Stable16.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/Stall.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/Switch1.svg", {}, -1 }, + */ + // GPLv3+ + /* FIXME needs color adjustments + { kModeH4n4, "/h4n4-modules/res/XenQnt.svg", {}, -1 }, + */ // MIT - { "/HamptonHarmonics/res/Arp.svg", {}, -1 }, - { "/HamptonHarmonics/res/Progress.svg", {}, -1 }, + { kModeHamptonHarmonics, "/HamptonHarmonics/res/Arp.svg", {}, -1 }, + { kModeHamptonHarmonics, "/HamptonHarmonics/res/Progress.svg", {}, -1 }, // GPLv3+ - { "/LomasModules/res/AdvancedSampler.svg", {}, -1 }, - { "/LomasModules/res/GateSequencer.svg", {}, -1 }, + { kModeLomas, "/LomasModules/res/AdvancedSampler.svg", {}, -1 }, + { kModeLomas, "/LomasModules/res/GateSequencer.svg", {}, -1 }, + // MIT + // TODO Mockba + // CC0 + // TODO Mog + // CC-BY-NC-ND-4.0 + // TODO Orbits - non compat license + // CC-BY-SA-4.0 + // TODO Prism + // CC-BY-SA-4.0 + // TODO repelzen // GPLv3+ - { "/sonusmodular/res/addiction.svg", {}, -1 }, - { "/sonusmodular/res/bitter.svg", {}, -1 }, - { "/sonusmodular/res/bymidside.svg", {}, -1 }, - { "/sonusmodular/res/campione.svg", {}, -1 }, - { "/sonusmodular/res/chainsaw.svg", {}, -1 }, - { "/sonusmodular/res/ctrl.svg", {}, -1 }, - { "/sonusmodular/res/deathcrush.svg", {}, -1 }, - { "/sonusmodular/res/fraction.svg", {}, -1 }, - { "/sonusmodular/res/harmony.svg", {}, -1 }, - { "/sonusmodular/res/ladrone.svg", {}, -1 }, - { "/sonusmodular/res/luppolo.svg", {}, -1 }, - { "/sonusmodular/res/luppolo3.svg", {}, -1 }, - { "/sonusmodular/res/micromacro.svg", {}, -1 }, - { "/sonusmodular/res/mrcheb.svg", {}, -1 }, - { "/sonusmodular/res/multimulti.svg", {}, -1 }, - { "/sonusmodular/res/neurosc.svg", {}, -1 }, - { "/sonusmodular/res/oktagon.svg", {}, -1 }, - { "/sonusmodular/res/osculum.svg", {}, -1 }, - { "/sonusmodular/res/paramath.svg", {}, -1 }, - { "/sonusmodular/res/piconoise.svg", {}, -1 }, - { "/sonusmodular/res/pith.svg", {}, -1 }, - { "/sonusmodular/res/pusher.svg", {}, -1 }, - { "/sonusmodular/res/ringo.svg", {}, -1 }, - { "/sonusmodular/res/scramblase.svg", {}, -1 }, - { "/sonusmodular/res/tropicana.svg", {}, -1 }, - { "/sonusmodular/res/twoff.svg", {}, -1 }, - { "/sonusmodular/res/yabp.svg", {}, -1 }, - // TODO bacon, chowdsp, ??? + { kModeSonusmodular, "/sonusmodular/res/addiction.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/bitter.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/bymidside.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/campione.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/chainsaw.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/ctrl.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/deathcrush.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/fraction.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/harmony.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/ladrone.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/luppolo.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/luppolo3.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/micromacro.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/mrcheb.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/multimulti.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/neurosc.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/oktagon.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/osculum.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/paramath.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/piconoise.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/pith.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/pusher.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/ringo.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/scramblase.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/tropicana.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/twoff.svg", {}, -1 }, + { kModeSonusmodular, "/sonusmodular/res/yabp.svg", {}, -1 }, + // TODO xtrnt + // TODO zzc, needs permission }; static inline @@ -498,24 +582,25 @@ unsigned int invertColor(const unsigned int color) noexcept } static inline -bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char* const svgFileToInvert = nullptr) +bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpaint& paint, const char* const svgFileToInvert) { - if (paint.type == NSVG_PAINT_LINEAR_GRADIENT && svgFileToInvert != nullptr) + if (paint.type == NSVG_PAINT_LINEAR_GRADIENT) { - // Special case for DrumKit background gradient - if (std::strncmp(svgFileToInvert, "/DrumKit/", 9) == 0) + switch (mode) { + // Special case for DrumKit background gradient + case kModeDrumKit: std::free(paint.gradient); paint.type = NSVG_PAINT_COLOR; paint.color = 0xff191919; return true; - } // Special case for PathSet shifty gradient - if (std::strncmp(svgFileToInvert, "/PathSet/", 9) == 0) - { + case kModePathSet: paint.gradient->stops[0].color = 0xff7c4919; // 50% darker than main blue paint.gradient->stops[1].color = 0xff5b3a1a; // 33.3% darker than main blue return false; + default: + break; } } @@ -524,9 +609,10 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char if (paint.type != NSVG_PAINT_COLOR) return false; - // Special case for Bidoo red color - if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/Bidoo/", 7) == 0) + switch (mode) { + // Special case for Bidoo red color + case kModeBidoo: if (paint.color == 0xff001fcd) { paint.color = 0xcf8b94c4; @@ -544,11 +630,9 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char return false; } } - } - + break; // Special case for JW-Modules colors - if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/JW-Modules/", 12) == 0) - { + case kModeJW: switch (paint.color) { // do nothing @@ -582,11 +666,9 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char paint.color = 0xffc0c0c0; return true; } - } - + break; // Special case for Lilac - if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/LilacLoop/", 11) == 0) - { + case kModeLilacLoop: switch (paint.color) { // main bg (custom) @@ -606,11 +688,9 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char paint.color = 0x00000000; return true; } - } - + break; // Special case for Nonlinear Circuits - if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/nonlinearcircuits/", 19) == 0) - { + case kModeNonlinearcircuits: switch (paint.color) { case 0xff9a7900: @@ -629,11 +709,9 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char paint.color = 0x00000000; return true; } - } - + break; // Special case for PathSet colors - if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/PathSet/", 9) == 0) - { + case kModePathSet: // only invert main colors for Nudge.svg if (std::strcmp(svgFileToInvert, "/PathSet/res/Nudge.svg") == 0) { @@ -716,11 +794,9 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char return true; } } - } - + break; // Special case for voxglitch colors - if (svgFileToInvert != nullptr && std::strncmp(svgFileToInvert, "/voxglitch/", 11) == 0) - { + case kModeVoxglitch: switch (paint.color) { // wavbank blue @@ -734,6 +810,9 @@ bool invertPaintForDarkMode(NSVGshape* const shape, NSVGpaint& paint, const char paint.color = 0x7f3219ac; return true; } + break; + default: + break; } switch (paint.color) @@ -952,6 +1031,7 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con if (std::strncmp(filename + (filenamelen-filterlen), svgFileToInvert, filterlen) != 0) continue; + const DarkMode mode = svgFilesToInvertForDarkMode[i].mode; const char* const* const shapeIdsToIgnore = svgFilesToInvertForDarkMode[i].shapeIdsToIgnore; const int shapeNumberToIgnore = svgFilesToInvertForDarkMode[i].shapeNumberToIgnore; int shapeCounter = 0; @@ -979,8 +1059,8 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con if (ignore) continue; - if (invertPaintForDarkMode(shape, shape->fill, svgFileToInvert)) - invertPaintForDarkMode(shape, shape->stroke, svgFileToInvert); + if (invertPaintForDarkMode(mode, shape, shape->fill, svgFileToInvert)) + invertPaintForDarkMode(mode, shape, shape->stroke, svgFileToInvert); } goto postparse; From d5e6f50a50e407a080efa186b928d4fa6397a1c1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Sep 2022 19:58:05 +0100 Subject: [PATCH 035/451] Light mode for a few more modules Signed-off-by: falkTX --- src/custom/dep.cpp | 118 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 106 insertions(+), 12 deletions(-) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 4d0209ec..57a97195 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -393,7 +393,6 @@ static const struct { const int shapeNumberToIgnore; } svgFilesToInvertForLightMode[] = { // GPLv3+ - /* FIXME does not work very well { kModeAutinn, "/Autinn/res/AmpModule.svg", {}, -1 }, { kModeAutinn, "/Autinn/res/BassModule.svg", {}, -1 }, { kModeAutinn, "/Autinn/res/CVConverterModule.svg", {}, -1 }, @@ -419,7 +418,6 @@ static const struct { { kModeAutinn, "/Autinn/res/VibratoModule.svg", {}, -1 }, { kModeAutinn, "/Autinn/res/VxyModule.svg", {}, -1 }, { kModeAutinn, "/Autinn/res/ZodModule.svg", {}, -1 }, - */ // Custom, runtime light mode used with permission { kModeBefaco, "/Befaco/res/components/Knurlie.svg", {}, -1 }, { kModeBefaco, "/Befaco/res/panels/ABC.svg", {}, -1 }, @@ -459,7 +457,6 @@ static const struct { { kModeCardinal, "/Cardinal/res/Ildaeil.svg", {}, -1 }, // TODO chowdsp // GPLv3+ - /* FIXME needs color adjustments { kModeFehlerFabrik, "/FehlerFabrik/res/Arpanet.svg", {}, -1 }, { kModeFehlerFabrik, "/FehlerFabrik/res/Aspect.svg", {}, -1 }, { kModeFehlerFabrik, "/FehlerFabrik/res/Botzinger.svg", {}, -1 }, @@ -475,7 +472,6 @@ static const struct { { kModeFehlerFabrik, "/FehlerFabrik/res/Rasoir.svg", {}, -1 }, { kModeFehlerFabrik, "/FehlerFabrik/res/Sigma.svg", {}, -1 }, { kModeFehlerFabrik, "/FehlerFabrik/res/Components/FFHexScrew.svg", {}, -1 }, - */ // GPLv3+ { kModeForsitan, "/forsitan-modulare/res/alea.svg", {}, -1 }, { kModeForsitan, "/forsitan-modulare/res/cumuli.svg", {}, -1 }, @@ -511,7 +507,6 @@ static const struct { { kModeFundamental, "/Fundamental/res/WTLFO.svg", {}, -1 }, { kModeFundamental, "/Fundamental/res/WTVCO.svg", {}, -1 }, // GPLv3+ - /* FIXME needs color adjustments { kModeGoodSheperd, "/GoodSheperd/res/Holzschnabel.svg", {}, -1 }, { kModeGoodSheperd, "/GoodSheperd/res/Hurdle.svg", {}, -1 }, { kModeGoodSheperd, "/GoodSheperd/res/SEQ3st.svg", {}, -1 }, @@ -519,11 +514,10 @@ static const struct { { kModeGoodSheperd, "/GoodSheperd/res/Stable16.svg", {}, -1 }, { kModeGoodSheperd, "/GoodSheperd/res/Stall.svg", {}, -1 }, { kModeGoodSheperd, "/GoodSheperd/res/Switch1.svg", {}, -1 }, - */ + { kModeGoodSheperd, "/GoodSheperd/res/components/SquareSwitch_0.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/components/SquareSwitch_1.svg", {}, -1 }, // GPLv3+ - /* FIXME needs color adjustments { kModeH4n4, "/h4n4-modules/res/XenQnt.svg", {}, -1 }, - */ // MIT { kModeHamptonHarmonics, "/HamptonHarmonics/res/Arp.svg", {}, -1 }, { kModeHamptonHarmonics, "/HamptonHarmonics/res/Progress.svg", {}, -1 }, @@ -856,9 +850,107 @@ bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpai } static inline -bool invertPaintForLightMode(NSVGshape* const shape, NSVGpaint& paint) +bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGpaint& paint) { - switch(paint.type) + switch (paint.type) + { + case NSVG_PAINT_NONE: + return true; + case NSVG_PAINT_LINEAR_GRADIENT: + for (int i=0; instops; ++i) + paint.gradient->stops[i].color = invertColor(paint.gradient->stops[i].color); + return true; + case NSVG_PAINT_COLOR: + break; + default: + return false; + } + + switch (mode) + { + case kModeAutinn: + switch (paint.color) + { + // red stripe + case 0xff0a115e: + paint.color = 0xffa1a8f5; + return true; + // logo + case 0xff00d7ff: + paint.color = 0xff005868; + return true; + } + break; + case kModeFehlerFabrik: + switch (paint.color) + { + // make a few colors reverse in luminance/lightness + case 0xff3edcfc: paint.color = 0xff039fbf; return true; + case 0xff4a6fff: paint.color = 0xff0024b2; return true; + case 0xff5c49fd: paint.color = 0xff1502b6; return true; + case 0xff61a6ff: paint.color = 0xff00459e; return true; + case 0xff6e97ad: paint.color = 0xff537c93; return true; + case 0xff78ffb1: paint.color = 0xff008739; return true; + case 0xffb5cf00: paint.color = 0xff627000; return true; + case 0xffbfa463: paint.color = 0xff9c8140; return true; + case 0xffcba5e4: paint.color = 0xff411b5a; return true; + case 0xffce86ef: paint.color = 0xff58107a; return true; + case 0xffcf7685: paint.color = 0xff8a303e; return true; + case 0xffd1e471: paint.color = 0xff798c1b; return true; + // screw core + case 0xff1a1a1a: paint.color = 0xffcccccc; return true; + // keep already darkish colors + case 0xff6a8800: + case 0xff7cce00: + return false; + } + break; + case kModeGoodSheperd: + switch (paint.color) + { + // background + case 0xff332e21: paint.color = 0xffdfdacd; return true; + case 0xff462f17: paint.color = 0xffe8d2ba; return true; + // jack box overlays + case 0xff56534a: paint.color = 0xffb6b3aa; return true; + case 0xffbc9d8e: paint.color = 0xff705142; return true; + case 0xfeede9e2: paint.color = 0xff1c1812; return true; + // colors to keep the same + case 0xff2400fe: + case 0xffcab39b: + return false; + } + break; + case kModeH4n4: + switch (paint.color) + { + case 0xffffb380: + return false; + case 0xffffccaa: + paint.color = 0xff572300; + return true; + } + break; + case kModeSonusmodular: + switch (paint.color) + { + case 0xff2a2aff: + case 0xff87cdde: + case 0xffe9afaf: + case 0xff4e4ed3: + case 0xff55ddff: + case 0xffdbdbe3: + return false; + case 0xff0a1284: + paint.color = 0xff7a82f5; + return true; + } + break; + default: + break; + } + + switch (paint.type) { case NSVG_PAINT_NONE: return true; @@ -1082,11 +1174,13 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con shapesOrig = handle->shapes; shapesMOD = nsvg__duplicateShapes(shapesOrig); + const LightMode mode = svgFilesToInvertForLightMode[i].mode; + // shape paint inversion for (NSVGshape* shape = shapesMOD; shape != nullptr; shape = shape->next) { - if (invertPaintForLightMode(shape, shape->fill)) - invertPaintForLightMode(shape, shape->stroke); + if (invertPaintForLightMode(mode, shape, shape->fill)) + invertPaintForLightMode(mode, shape, shape->stroke); } goto postparse; From 0565a015fbdf806ef6d8d25900ea5367c00777cb Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 13 Sep 2022 13:14:15 +0100 Subject: [PATCH 036/451] Switch ML_modules back to upstream, with fixed freeverb --- plugins/ML_modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ML_modules b/plugins/ML_modules index 66527f10..31104227 160000 --- a/plugins/ML_modules +++ b/plugins/ML_modules @@ -1 +1 @@ -Subproject commit 66527f10d0ad18d03aca3bbabceb198396da5d81 +Subproject commit 311042275900650c0b0cc57fcd2b57333820adde From 6e5605e20029ebf6bc527461a79b39229d44c5dd Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 13 Sep 2022 21:06:52 +0100 Subject: [PATCH 037/451] Fix black UI on init under some hosts --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 94f148a5..73a855c3 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 94f148a575dc7a2282fc4de733cc97dfd41196f8 +Subproject commit 73a855c3a8d3321f06fdeae9174e3eb50ad005b3 From a5d28c2707bde032f056d90741fdcfcb9d96a578 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 13 Sep 2022 21:33:31 +0100 Subject: [PATCH 038/451] Enable linux-riscv64 builds Signed-off-by: falkTX --- .github/workflows/build.yml | 86 +++++++++++++++++++++++++++++++++ .gitmodules | 3 ++ carla | 2 +- deps/Makefile | 3 ++ deps/PawPaw | 2 +- dpf | 2 +- include/simd-compat/mmintrin.h | 5 +- include/simd-compat/pmmintrin.h | 8 ++- include/simde | 1 + 9 files changed, 107 insertions(+), 5 deletions(-) create mode 160000 include/simde diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8c86f45..f4a916b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -260,6 +260,92 @@ jobs: files: | *.tar.gz + linux-riscv64: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + id: cache + uses: actions/cache@v2 + with: + path: | + ~/PawPawBuilds + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 + key: linux-riscv64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + - name: Fix GitHub's mess + run: | + sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list + sudo apt-get update -qq + sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 + - name: Set up dependencies + run: | + sudo dpkg --add-architecture riscv64 + sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list + echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-riscv64.list + echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list + echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list + sudo apt-get update -qq + sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libpulse-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static + - name: Set up ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ccache-linux-riscv64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + - name: Build extra dependencies + env: + PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig + run: | + if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi + export PATH="/usr/lib/ccache:${PATH}" + ./deps/PawPaw/bootstrap-cardinal.sh linux-riscv64 && ./deps/PawPaw/.cleanup.sh linux-riscv64 + - name: Build linux riscv64 cross-compiled + run: | + if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi + pushd deps/PawPaw; source local.env linux-riscv64; popd + export PATH="/usr/lib/ccache:${PATH}" + export PKG_CONFIG_PATH+=:/usr/lib/riscv64-linux-gnu/pkgconfig + make features + make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make unzipfx + - name: Set sha8 (non-release) + if: startsWith(github.ref, 'refs/tags/') != true + id: slug1 + run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + - name: Set sha8 (release) + if: startsWith(github.ref, 'refs/tags/') + id: slug2 + run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" + - name: Set sha8 + id: slug + run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + - name: Pack binaries + run: | + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + path: | + *.tar.gz + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: | + *.tar.gz + linux-x86_64: runs-on: ubuntu-20.04 steps: diff --git a/.gitmodules b/.gitmodules index 384a28af..5057d404 100644 --- a/.gitmodules +++ b/.gitmodules @@ -218,3 +218,6 @@ [submodule "plugins/dBiz"] path = plugins/dBiz url = https://github.com/dBiz/dBiz.git +[submodule "include/simde"] + path = include/simde + url = https://github.com/simd-everywhere/simde.git diff --git a/carla b/carla index 963f194b..c9fc68aa 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 963f194b0ed93829188ffda23320b1dc848f07d8 +Subproject commit c9fc68aaa370088b588ad6aea7af60efbc16530c diff --git a/deps/Makefile b/deps/Makefile index 28e4f39b..f458eebc 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -72,6 +72,9 @@ MACHINE = i686-the-rack else ifeq ($(CPU_ARM64),true) ARCH_NAME = arm64 MACHINE = x86_64-the-rack +else ifeq ($(CPU_RISCV64),true) +ARCH_NAME = riscv64 +MACHINE = x86_64-the-rack else ifeq ($(WASM),true) MACHINE = i686-wasm else diff --git a/deps/PawPaw b/deps/PawPaw index 4f7f9eb6..75d86db5 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 4f7f9eb6ff1677606a85fe701bbb535f8fe7086c +Subproject commit 75d86db5d171228247e1297d13090cb11220fe92 diff --git a/dpf b/dpf index 73a855c3..fbc9ffdf 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 73a855c3a8d3321f06fdeae9174e3eb50ad005b3 +Subproject commit fbc9ffdfaaf42a4dac4bc946888971d1ab9f2fbc diff --git a/include/simd-compat/mmintrin.h b/include/simd-compat/mmintrin.h index ce019805..9058d65f 100644 --- a/include/simd-compat/mmintrin.h +++ b/include/simd-compat/mmintrin.h @@ -21,6 +21,9 @@ # include_next #elif defined(__EMSCRIPTEN__) # include -#else +#elif defined(__ARM_NEON) # include "../sse2neon/sse2neon.h" +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/mmx.h" #endif diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 45fa3fb1..6b570554 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -29,7 +29,7 @@ __m64 _mm_set1_pi16(short w) return __extension__ (__m64){ static_cast(w), static_cast(w) }; } -#else +#elif defined(__ARM_NEON) # include "../sse2neon/sse2neon.h" static inline @@ -44,4 +44,10 @@ __m64 _mm_set1_pi16(short w) return vreinterpret_s64_s16(vdup_n_s16(w)); } +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/sse.h" +# include "../simde/simde/x86/sse2.h" +// # include "../simde/simde/x86/sse3.h" + #endif diff --git a/include/simde b/include/simde new file mode 160000 index 00000000..12069d72 --- /dev/null +++ b/include/simde @@ -0,0 +1 @@ +Subproject commit 12069d720f43830ae9791e8b0f4c4fa3c88012a0 From f3a31774879248071c9d58c795e41bf27bc720ea Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Sep 2022 02:44:31 +0100 Subject: [PATCH 039/451] Fix native audio linux builds Signed-off-by: falkTX --- .github/workflows/build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4a916b6..c338bd6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,8 +62,9 @@ jobs: - name: Build linux arm64 cross-compiled run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env linux-aarch64; popd + export PATH="/usr/lib/ccache:${PATH}" + export PKG_CONFIG_PATH+=:/usr/lib/aarch64-linux-gnu/pkgconfig make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx @@ -146,8 +147,9 @@ jobs: - name: Build linux armhf cross-compiled run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env linux-armhf; popd + export PATH="/usr/lib/ccache:${PATH}" + export PKG_CONFIG_PATH+=:/usr/lib/arm-linux-gnueabihf/pkgconfig make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx @@ -226,8 +228,9 @@ jobs: - name: Build linux i686 run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env linux-i686; popd + export PATH="/usr/lib/ccache:${PATH}" + export PKG_CONFIG_PATH+=:/usr/lib/i386-linux-gnu/pkgconfig make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx @@ -384,8 +387,9 @@ jobs: - name: Build linux x86_64 run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env linux; popd + export PATH="/usr/lib/ccache:${PATH}" + export PKG_CONFIG_PATH+=:/usr/lib/x86_64-linux-gnu/pkgconfig make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx From cd68d0681daa1e36e76ecd8749fa16055fe928df Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Sep 2022 11:06:57 +0100 Subject: [PATCH 040/451] Dont use pulseaudio in linux audio native builds, ABI not stable Signed-off-by: falkTX --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c338bd6a..663ba90d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libpulse-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static + sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -66,7 +66,7 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/aarch64-linux-gnu/pkgconfig make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -132,7 +132,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq - sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libpulse-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static + sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -151,7 +151,7 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/arm-linux-gnueabihf/pkgconfig make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -213,7 +213,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-multilib libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libpulse-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + sudo apt-get install -yqq g++-multilib libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -232,7 +232,7 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/i386-linux-gnu/pkgconfig make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -299,7 +299,7 @@ jobs: echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libpulse-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static + sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -318,7 +318,7 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/riscv64-linux-gnu/pkgconfig make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -374,7 +374,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libpulse-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -391,7 +391,7 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/x86_64-linux-gnu/pkgconfig make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -431,7 +431,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev - name: Build linux x86_64 (debug) env: LDFLAGS: -static-libgcc -static-libstdc++ @@ -440,7 +440,7 @@ jobs: # multiple jobs for building carla, deps and plugins make DEBUG=true carla deps dgl plugins resources -j $(nproc) # single job for final build stage, otherwise we might killed due to OOM - make DEBUG=true -j 1 + make DEBUG=true HAVE_PULSEAUDIO=false -j 1 - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" From 2472b06f5967a34843edba8b4178f51ae4842751 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Sep 2022 11:10:20 +0100 Subject: [PATCH 041/451] Mention riscv in some docs Signed-off-by: falkTX --- README.md | 2 +- docs/DIFFERENCES.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 90a12def..21430add 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Currently the following should be noted: Cardinal releases have official builds for Linux, macOS and Windows. You can find these under https://github.com/DISTRHO/Cardinal/releases. -There are Linux builds for various architectures (armhf, arm64, i686 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. +There are Linux builds for various architectures (armhf, arm64, i686, riscv64 and x86_64), macOS "universal" (arm64 + intel) and Windows 32 and 64bit builds. Both macOS and Windows builds have an installer. Install instructions are available [here](https://github.com/DISTRHO/Cardinal/wiki/Install). diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index cbf1bb33..8ba03e03 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -30,6 +30,7 @@ Bellow follows a list of features comparing the official plugin to Cardinal. | 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 | | Supports BSD systems | No | Yes | Available as FreeBSD port | +| Supports RISC-V systems | No | Yes | | | Synth plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | FX plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | Raw-CV plugin variant | Unsupported | 8 audio IO + 10 CV IO | Available in JACK, LV2 and VST3 formats, not possible in AU and VST2 | From 9116eb61fb80695bb2cbc22d8a34705394c34d76 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Sep 2022 14:48:52 +0100 Subject: [PATCH 042/451] A few more light mode modules --- plugins/Makefile | 4 ++ plugins/Prism | 2 +- src/Makefile.cardinal.mk | 4 ++ src/custom/dep.cpp | 144 ++++++++++++++++++++++++++++++--------- 4 files changed, 121 insertions(+), 33 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index b848e610..639061fc 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1155,7 +1155,11 @@ endif # -------------------------------------------------------------- # Build targets +ifeq ($(NOPLUGINS),true) +TARGET = noplugins.a +else TARGET = plugins.a +endif all: $(TARGET) diff --git a/plugins/Prism b/plugins/Prism index 4d95ace8..8d2796da 160000 --- a/plugins/Prism +++ b/plugins/Prism @@ -1 +1 @@ -Subproject commit 4d95ace8b073e9e8e30b8671ecdb04101d943905 +Subproject commit 8d2796da76e5d7f79bbf461c95a7858035bb0736 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 05901e32..40d3351f 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -110,7 +110,11 @@ endif # -------------------------------------------------------------- # Extra libraries to link against +ifeq ($(NOPLUGINS),true) +RACK_EXTRA_LIBS = ../../plugins/noplugins.a +else RACK_EXTRA_LIBS = ../../plugins/plugins.a +endif RACK_EXTRA_LIBS += ../rack.a RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libquickjs.a diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 57a97195..a458701d 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -378,11 +378,15 @@ enum LightMode { kModeCardinal, kModeFehlerFabrik, kModeForsitan, - kModeFundamental, // FIXME remove + kModeFundamental, kModeGoodSheperd, kModeH4n4, kModeHamptonHarmonics, kModeLomas, + kModeMockba, + kModeMog, + kModePrism, + kModeRepelzen, kModeSonusmodular, }; @@ -525,15 +529,31 @@ static const struct { { kModeLomas, "/LomasModules/res/AdvancedSampler.svg", {}, -1 }, { kModeLomas, "/LomasModules/res/GateSequencer.svg", {}, -1 }, // MIT - // TODO Mockba + { kModeMockba, "/MockbaModular/res/Blank.svg", {}, -1 }, + // TODO // CC0 - // TODO Mog + { kModeMog, "/Mog/res/Network.svg", {}, -1 }, + { kModeMog, "/Mog/res/Nexus.svg", {}, -1 }, // CC-BY-NC-ND-4.0 // TODO Orbits - non compat license // CC-BY-SA-4.0 - // TODO Prism + { kModePrism, "/Prism/res/prism_Droplet.svg", {}, -1 }, + { kModePrism, "/Prism/res/prism_Rainbow.svg", {}, -1 }, + { kModePrism, "/Prism/res/RainbowScaleExpander.svg", {}, -1 }, // CC-BY-SA-4.0 - // TODO repelzen + { kModeRepelzen, "/repelzen/res/reface/reburst_bg.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/refold_bg.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg1.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg2.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg3.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg4.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg5.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg6.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg7.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg8.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/retrig_bg.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/rewin_bg.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/rexmix_bg.svg", {}, -1 }, // GPLv3+ { kModeSonusmodular, "/sonusmodular/res/addiction.svg", {}, -1 }, { kModeSonusmodular, "/sonusmodular/res/bitter.svg", {}, -1 }, @@ -852,19 +872,33 @@ bool invertPaintForDarkMode(const DarkMode mode, NSVGshape* const shape, NSVGpai static inline bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGpaint& paint) { - switch (paint.type) + if (paint.type == NSVG_PAINT_LINEAR_GRADIENT) + { + switch (mode) + { + case kModeFundamental: + paint.gradient->stops[0].color = 0xffffffff; + paint.gradient->stops[1].color = 0xffe6d6d6; + return true; + default: + for (int i=0; instops; ++i) + paint.gradient->stops[i].color = invertColor(paint.gradient->stops[i].color); + return true; + } + } + + if (paint.type == NSVG_PAINT_RADIAL_GRADIENT && mode == kModeMog) { - case NSVG_PAINT_NONE: + std::free(paint.gradient); + paint.type = NSVG_PAINT_COLOR; + paint.color = 0xffe5e5e5; return true; - case NSVG_PAINT_LINEAR_GRADIENT: - for (int i=0; instops; ++i) - paint.gradient->stops[i].color = invertColor(paint.gradient->stops[i].color); + } + + if (paint.type == NSVG_PAINT_NONE) return true; - case NSVG_PAINT_COLOR: - break; - default: + if (paint.type != NSVG_PAINT_COLOR) return false; - } switch (mode) { @@ -931,15 +965,73 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp return true; } break; + case kModeMog: + switch (paint.color) + { + case 0xff442499: + case 0xff587ee2: + case 0xff1ecae8: + case 0xff2dd6ac: + case 0xffcf924c: + case 0xffd8b3bb: + case 0xff29165d: + case 0xff354d89: + case 0xff127b8d: + case 0xff1b8269: + case 0xff7e592e: + case 0xff836d72: + return false; + } + break; + case kModePrism: + switch (paint.color) + { + case 0xff000000: + case 0xff505770: + case 0xff657c9b: + case 0xff7ba357: + case 0xff7f64f2: + case 0xff99e4ff: + case 0xffa7ff6c: + case 0xffc279e2: + case 0xffe079c4: + case 0xffe5ff66: + case 0xffff88d0: + case 0xffffa369: + return false; + case 0xff0f0f0f: + if (std::strcmp(shape->id, "path10") == 0 || std::strcmp(shape->id, "circle506") == 0) + { + paint.color = 0xffffffff; + return true; + } + return false; + case 0xffbababa: + paint.color = 0xff000000; + return true; + } + break; + case kModeRepelzen: + switch (paint.color) + { + case 0xff4c4ccc: + case 0xff87a610: + case 0xffb78e09: + return false; + case 0xff44bbd8: + paint.color = 0xff228ba5; + return true; + } + break; case kModeSonusmodular: switch (paint.color) { case 0xff2a2aff: - case 0xff87cdde: - case 0xffe9afaf: case 0xff4e4ed3: case 0xff55ddff: + case 0xff87cdde: case 0xffdbdbe3: + case 0xffe9afaf: return false; case 0xff0a1284: paint.color = 0xff7a82f5; @@ -950,20 +1042,8 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp break; } - switch (paint.type) - { - case NSVG_PAINT_NONE: - return true; - case NSVG_PAINT_LINEAR_GRADIENT: - for (int i=0; instops; ++i) - paint.gradient->stops[i].color = invertColor(paint.gradient->stops[i].color); - return true; - case NSVG_PAINT_COLOR: - paint.color = invertColor(paint.color); - return true; - default: - return false; - } + paint.color = invertColor(paint.color); + return true; } extern "C" { @@ -1169,13 +1249,13 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con if (std::strncmp(filename + (filenamelen-filterlen), svgFileToInvert, filterlen) != 0) continue; + const LightMode mode = svgFilesToInvertForLightMode[i].mode; + hasLightMode = true; handleMOD = nullptr; shapesOrig = handle->shapes; shapesMOD = nsvg__duplicateShapes(shapesOrig); - const LightMode mode = svgFilesToInvertForLightMode[i].mode; - // shape paint inversion for (NSVGshape* shape = shapesMOD; shape != nullptr; shape = shape->next) { From 9442c9b620d1b1823cb4e581093d0836006eb6e7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 14 Sep 2022 17:49:59 +0100 Subject: [PATCH 043/451] Adjust fundamental for light mode --- plugins/Fundamental | 2 +- src/custom/dep.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/plugins/Fundamental b/plugins/Fundamental index 9ac0cdb9..63d54b65 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 9ac0cdb93938c3f01aba58ec01fdd01257abf353 +Subproject commit 63d54b6575657c8bd8d221178253c750baf0ed3b diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index a458701d..24ec19be 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -510,6 +510,8 @@ static const struct { { kModeFundamental, "/Fundamental/res/VCO.svg", {}, -1 }, { kModeFundamental, "/Fundamental/res/WTLFO.svg", {}, -1 }, { kModeFundamental, "/Fundamental/res/WTVCO.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/components/ADSR-bg.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/components/Scope-bg.svg", {}, -1 }, // GPLv3+ { kModeGoodSheperd, "/GoodSheperd/res/Holzschnabel.svg", {}, -1 }, { kModeGoodSheperd, "/GoodSheperd/res/Hurdle.svg", {}, -1 }, @@ -939,6 +941,24 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp return false; } break; + case kModeFundamental: + switch (paint.color) + { + case 0xc0000000: + paint.color = 0xe6000000; + return true; + case 0xff909092: + paint.color = 0xff000000; + return true; + case 0xff000000: + if (shape->opacity == 0.5f) + { + shape->opacity = 0.9f; + return false; + } + break; + } + break; case kModeGoodSheperd: switch (paint.color) { From 0aa7c9ab289e6b77a95195e2a4984564450777e7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 15 Sep 2022 12:01:03 +0100 Subject: [PATCH 044/451] Fix VST2 crash when removing 1 of many similar instances Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index c9fc68aa..8c58d099 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit c9fc68aaa370088b588ad6aea7af60efbc16530c +Subproject commit 8c58d0994cd512263e34db1c8f45c1f1a9689a58 diff --git a/dpf b/dpf index fbc9ffdf..ac803f59 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit fbc9ffdfaaf42a4dac4bc946888971d1ab9f2fbc +Subproject commit ac803f5991e1adac6581658a346250d4246e59b6 From 24bed60b3704084b4199624a9f0af1e8935fbc97 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 15 Sep 2022 12:17:37 +0100 Subject: [PATCH 045/451] Add readme and license to zip/tar CI artifacts Signed-off-by: falkTX --- .github/workflows/build.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 663ba90d..5c4833bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -166,7 +166,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -247,7 +247,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -333,7 +333,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -406,7 +406,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -446,7 +446,7 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -984,7 +984,10 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + pushd bin + zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + popd + zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip LICENSE README.md docs/*.* - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} @@ -1076,7 +1079,10 @@ jobs: run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + pushd bin + zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + popd + zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip LICENSE README.md docs/*.* - uses: actions/upload-artifact@v2 with: name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} From 46b510e898a0a716905fbc2d15d077e4688f51e7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 15 Sep 2022 17:54:16 +0100 Subject: [PATCH 046/451] Light mode in even more modules Signed-off-by: falkTX --- plugins/ArableInstruments | 2 +- plugins/MindMeldModular | 2 +- plugins/ValleyAudio | 2 +- src/custom/dep.cpp | 22 ++++++++++++++++++---- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/plugins/ArableInstruments b/plugins/ArableInstruments index 6f09e9d3..f93a357f 160000 --- a/plugins/ArableInstruments +++ b/plugins/ArableInstruments @@ -1 +1 @@ -Subproject commit 6f09e9d3e6a1c9b862ca2421227d33fdc4834e2d +Subproject commit f93a357f1643b831d60e28a3ac51575007aa4c5f diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index f526208d..8e413a44 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit f526208d9b54f9fc8950919ed3f9d9793c6e54e2 +Subproject commit 8e413a445c1c307f356ee96633b7f6f2b4c4749e diff --git a/plugins/ValleyAudio b/plugins/ValleyAudio index 9745a4c6..b2ed19ad 160000 --- a/plugins/ValleyAudio +++ b/plugins/ValleyAudio @@ -1 +1 @@ -Subproject commit 9745a4c63747a2225a31da69b085e6185b4c8407 +Subproject commit b2ed19ad46e91c650d0ba3e18eae9a1bbecb1f3c diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 24ec19be..0fe760eb 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -119,8 +119,6 @@ static const struct { { kModeAlgoritmarte, "/Algoritmarte/res/Planetz.svg", {}, -1 }, { kModeAlgoritmarte, "/Algoritmarte/res/Zefiro.svg", {}, -1 }, // Custom, runtime dark mode used with permission - { kModeArableInstruments, "/ArableInstruments/res/Joni.svg", {}, -1 }, - // Custom, runtime dark mode used with permission { kModeAudibleInstruments, "/AudibleInstruments/res/Blinds.svg", {}, -1 }, { kModeAudibleInstruments, "/AudibleInstruments/res/Braids.svg", {}, -1 }, { kModeAudibleInstruments, "/AudibleInstruments/res/Branches.svg", {}, -1 }, @@ -336,8 +334,6 @@ static const struct { { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - SEGUE.svg", {}, -1 }, { kModeNonlinearcircuits, "/nonlinearcircuits/res/NLC - STATUES.svg", {}, -1 }, { kModeNonlinearcircuits, "/nonlinearcircuits/res/squid-axon-papernoise-panel2.svg", {}, -1 }, - // Custom, runtime dark mode used with permission - { kModeParableInstruments, "/ParableInstruments/res/Neil.svg", {}, -1 }, // GPL-3.0-or-later { kModePathSet, "/PathSet/res/AstroVibe.svg", {}, -1 }, { kModePathSet, "/PathSet/res/GlassPane.svg", {}, -1 }, @@ -373,6 +369,7 @@ static const struct { }; enum LightMode { + kMode8Mode, kModeAutinn, kModeBefaco, kModeCardinal, @@ -396,6 +393,8 @@ static const struct { const char* shapeIdsToIgnore[5]; const int shapeNumberToIgnore; } svgFilesToInvertForLightMode[] = { + // BSD + { kMode8Mode, "/8Mode/res/SNsoft_Panel.svg", {}, -1 }, // GPLv3+ { kModeAutinn, "/Autinn/res/AmpModule.svg", {}, -1 }, { kModeAutinn, "/Autinn/res/BassModule.svg", {}, -1 }, @@ -904,6 +903,21 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp switch (mode) { + case kMode8Mode: + switch (paint.color) + { + case 0xff000000: + if (std::strcmp(shape->id, "rect1211") == 0) + break; + return false; + case 0xff1a1a1a: + if (std::strcmp(shape->id, "rect1523") != 0) + break; + return false; + default: + return false; + } + break; case kModeAutinn: switch (paint.color) { From 57544f9bafab008b13eefa5bbe80068e3f66e6d2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 16 Sep 2022 00:05:23 +0100 Subject: [PATCH 047/451] Even more light mode modules Signed-off-by: falkTX --- src/custom/dep.cpp | 390 ++++++++++++++++++++++++--------------------- 1 file changed, 212 insertions(+), 178 deletions(-) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 0fe760eb..53a5e2a7 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -373,6 +373,7 @@ enum LightMode { kModeAutinn, kModeBefaco, kModeCardinal, + kModeExtratone, kModeFehlerFabrik, kModeForsitan, kModeFundamental, @@ -390,201 +391,207 @@ enum LightMode { static const struct { const LightMode mode; const char* const filename; - const char* shapeIdsToIgnore[5]; - const int shapeNumberToIgnore; } svgFilesToInvertForLightMode[] = { // BSD - { kMode8Mode, "/8Mode/res/SNsoft_Panel.svg", {}, -1 }, + { kMode8Mode, "/8Mode/res/SNsoft_Panel.svg" }, // GPLv3+ - { kModeAutinn, "/Autinn/res/AmpModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/BassModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/CVConverterModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/ComponentLibrary", {}, -1 }, - { kModeAutinn, "/Autinn/res/DeadbandModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/DigiModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/DiseeModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/FilModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/FlopperModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/ImpModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/JetteModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/MelodyModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/MeraModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/Mixer6Module.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/NapModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/NonModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/OxcartModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/RebelModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/RetriModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/SawModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/SjipModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/SquareModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/VibratoModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/VxyModule.svg", {}, -1 }, - { kModeAutinn, "/Autinn/res/ZodModule.svg", {}, -1 }, + { kModeAutinn, "/Autinn/res/AmpModule.svg" }, + { kModeAutinn, "/Autinn/res/BassModule.svg" }, + { kModeAutinn, "/Autinn/res/CVConverterModule.svg" }, + { kModeAutinn, "/Autinn/res/ComponentLibrary" }, + { kModeAutinn, "/Autinn/res/DeadbandModule.svg" }, + { kModeAutinn, "/Autinn/res/DigiModule.svg" }, + { kModeAutinn, "/Autinn/res/DiseeModule.svg" }, + { kModeAutinn, "/Autinn/res/FilModule.svg" }, + { kModeAutinn, "/Autinn/res/FlopperModule.svg" }, + { kModeAutinn, "/Autinn/res/ImpModule.svg" }, + { kModeAutinn, "/Autinn/res/JetteModule.svg" }, + { kModeAutinn, "/Autinn/res/MelodyModule.svg" }, + { kModeAutinn, "/Autinn/res/MeraModule.svg" }, + { kModeAutinn, "/Autinn/res/Mixer6Module.svg" }, + { kModeAutinn, "/Autinn/res/NapModule.svg" }, + { kModeAutinn, "/Autinn/res/NonModule.svg" }, + { kModeAutinn, "/Autinn/res/OxcartModule.svg" }, + { kModeAutinn, "/Autinn/res/RebelModule.svg" }, + { kModeAutinn, "/Autinn/res/RetriModule.svg" }, + { kModeAutinn, "/Autinn/res/SawModule.svg" }, + { kModeAutinn, "/Autinn/res/SjipModule.svg" }, + { kModeAutinn, "/Autinn/res/SquareModule.svg" }, + { kModeAutinn, "/Autinn/res/VibratoModule.svg" }, + { kModeAutinn, "/Autinn/res/VxyModule.svg" }, + { kModeAutinn, "/Autinn/res/ZodModule.svg" }, // Custom, runtime light mode used with permission - { kModeBefaco, "/Befaco/res/components/Knurlie.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/ABC.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/ADSR.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/ChoppingKinky.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/DualAtenuverter.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/EvenVCO.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/HexmixVCA.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Kickall.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Mex.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Mixer.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Morphader.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Muxlicer.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/NoisePlethora.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Percall.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/Rampage.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/STMix.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/SamplingModulator.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/SlewLimiter.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/SpringReverb.svg", {}, -1 }, - { kModeBefaco, "/Befaco/res/panels/StereoStrip.svg", {}, -1 }, + { kModeBefaco, "/Befaco/res/components/Knurlie.svg" }, + { kModeBefaco, "/Befaco/res/panels/ABC.svg" }, + { kModeBefaco, "/Befaco/res/panels/ADSR.svg" }, + { kModeBefaco, "/Befaco/res/panels/ChoppingKinky.svg" }, + { kModeBefaco, "/Befaco/res/panels/DualAtenuverter.svg" }, + { kModeBefaco, "/Befaco/res/panels/EvenVCO.svg" }, + { kModeBefaco, "/Befaco/res/panels/HexmixVCA.svg" }, + { kModeBefaco, "/Befaco/res/panels/Kickall.svg" }, + { kModeBefaco, "/Befaco/res/panels/Mex.svg" }, + { kModeBefaco, "/Befaco/res/panels/Mixer.svg" }, + { kModeBefaco, "/Befaco/res/panels/Morphader.svg" }, + { kModeBefaco, "/Befaco/res/panels/Muxlicer.svg" }, + { kModeBefaco, "/Befaco/res/panels/NoisePlethora.svg" }, + { kModeBefaco, "/Befaco/res/panels/Percall.svg" }, + { kModeBefaco, "/Befaco/res/panels/Rampage.svg" }, + { kModeBefaco, "/Befaco/res/panels/STMix.svg" }, + { kModeBefaco, "/Befaco/res/panels/SamplingModulator.svg" }, + { kModeBefaco, "/Befaco/res/panels/SlewLimiter.svg" }, + { kModeBefaco, "/Befaco/res/panels/SpringReverb.svg" }, + { kModeBefaco, "/Befaco/res/panels/StereoStrip.svg" }, + // GPLv3+ + { kModeCardinal, "/Cardinal/res/AudioFile.svg" }, + { kModeCardinal, "/Cardinal/res/AudioToCVPitch.svg" }, + { kModeCardinal, "/Cardinal/res/Carla.svg" }, + { kModeCardinal, "/Cardinal/res/ExpanderMIDI.svg" }, + { kModeCardinal, "/Cardinal/res/glBars.svg" }, + { kModeCardinal, "/Cardinal/res/HostAudio.svg" }, + { kModeCardinal, "/Cardinal/res/HostCV.svg" }, + { kModeCardinal, "/Cardinal/res/HostMIDI.svg" }, + { kModeCardinal, "/Cardinal/res/HostMIDICC.svg" }, + { kModeCardinal, "/Cardinal/res/HostMIDIGate.svg" }, + { kModeCardinal, "/Cardinal/res/HostMIDIMap.svg" }, + { kModeCardinal, "/Cardinal/res/HostParameters.svg" }, + { kModeCardinal, "/Cardinal/res/HostParamsMap.svg" }, + { kModeCardinal, "/Cardinal/res/HostTime.svg" }, + { kModeCardinal, "/Cardinal/res/Ildaeil.svg" }, // GPLv3+ - { kModeCardinal, "/Cardinal/res/AudioFile.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/AudioToCVPitch.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/Carla.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/ExpanderMIDI.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/glBars.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostAudio.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostCV.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostMIDI.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostMIDICC.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostMIDIGate.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostMIDIMap.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostParameters.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostParamsMap.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/HostTime.svg", {}, -1 }, - { kModeCardinal, "/Cardinal/res/Ildaeil.svg", {}, -1 }, - // TODO chowdsp + { kModeExtratone, "/Extratone/res/Darwinism.svg" }, + // { kModeExtratone, "/Extratone/res/HalluciMemory.svg" }, + { kModeExtratone, "/Extratone/res/Ichneumonid.svg" }, + { kModeExtratone, "/Extratone/res/Meganeura.svg" }, + { kModeExtratone, "/Extratone/res/Mesoglea.svg" }, + { kModeExtratone, "/Extratone/res/Mesoglea2.svg" }, + { kModeExtratone, "/Extratone/res/Mesohyl.svg" }, + { kModeExtratone, "/Extratone/res/Modulo.svg" }, + { kModeExtratone, "/Extratone/res/Opabinia.svg" }, + { kModeExtratone, "/Extratone/res/Pureneura.svg" }, + { kModeExtratone, "/Extratone/res/Puzzlebox.svg" }, + { kModeExtratone, "/Extratone/res/Splitterburst.svg" }, + { kModeExtratone, "/Extratone/res/XtrtnBlank.svg" }, // GPLv3+ - { kModeFehlerFabrik, "/FehlerFabrik/res/Arpanet.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Aspect.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Botzinger.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Chi.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Components", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Fax.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Lilt.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Luigi.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Monte.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Nova.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Planck.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/PSIOP.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Rasoir.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Sigma.svg", {}, -1 }, - { kModeFehlerFabrik, "/FehlerFabrik/res/Components/FFHexScrew.svg", {}, -1 }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Arpanet.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Aspect.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Botzinger.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Chi.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Components" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Fax.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Lilt.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Luigi.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Monte.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Nova.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Planck.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/PSIOP.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Rasoir.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Sigma.svg" }, + { kModeFehlerFabrik, "/FehlerFabrik/res/Components/FFHexScrew.svg" }, // GPLv3+ - { kModeForsitan, "/forsitan-modulare/res/alea.svg", {}, -1 }, - { kModeForsitan, "/forsitan-modulare/res/cumuli.svg", {}, -1 }, - { kModeForsitan, "/forsitan-modulare/res/deinde.svg", {}, -1 }, - { kModeForsitan, "/forsitan-modulare/res/interea.svg", {}, -1 }, - { kModeForsitan, "/forsitan-modulare/res/palette.svg", {}, -1 }, - { kModeForsitan, "/forsitan-modulare/res/pavo.svg", {}, -1 }, + { kModeForsitan, "/forsitan-modulare/res/alea.svg" }, + { kModeForsitan, "/forsitan-modulare/res/cumuli.svg" }, + { kModeForsitan, "/forsitan-modulare/res/deinde.svg" }, + { kModeForsitan, "/forsitan-modulare/res/interea.svg" }, + { kModeForsitan, "/forsitan-modulare/res/palette.svg" }, + { kModeForsitan, "/forsitan-modulare/res/pavo.svg" }, // GPLv3+ - { kModeFundamental, "/Fundamental/res/8vert.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/ADSR.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Delay.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/LFO.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Merge.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/MidSide.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Mixer.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Mutes.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Noise.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Octave.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Pulses.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Quantizer.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Random.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/SEQ3.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Scope.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/SequentialSwitch1.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/SequentialSwitch2.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Split.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/Sum.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/VCA-1.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/VCA.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/VCF.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/VCMixer.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/VCO.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/WTLFO.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/WTVCO.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/components/ADSR-bg.svg", {}, -1 }, - { kModeFundamental, "/Fundamental/res/components/Scope-bg.svg", {}, -1 }, + { kModeFundamental, "/Fundamental/res/8vert.svg" }, + { kModeFundamental, "/Fundamental/res/ADSR.svg" }, + { kModeFundamental, "/Fundamental/res/Delay.svg" }, + { kModeFundamental, "/Fundamental/res/LFO.svg" }, + { kModeFundamental, "/Fundamental/res/Merge.svg" }, + { kModeFundamental, "/Fundamental/res/MidSide.svg" }, + { kModeFundamental, "/Fundamental/res/Mixer.svg" }, + { kModeFundamental, "/Fundamental/res/Mutes.svg" }, + { kModeFundamental, "/Fundamental/res/Noise.svg" }, + { kModeFundamental, "/Fundamental/res/Octave.svg" }, + { kModeFundamental, "/Fundamental/res/Pulses.svg" }, + { kModeFundamental, "/Fundamental/res/Quantizer.svg" }, + { kModeFundamental, "/Fundamental/res/Random.svg" }, + { kModeFundamental, "/Fundamental/res/SEQ3.svg" }, + { kModeFundamental, "/Fundamental/res/Scope.svg" }, + { kModeFundamental, "/Fundamental/res/SequentialSwitch1.svg" }, + { kModeFundamental, "/Fundamental/res/SequentialSwitch2.svg" }, + { kModeFundamental, "/Fundamental/res/Split.svg" }, + { kModeFundamental, "/Fundamental/res/Sum.svg" }, + { kModeFundamental, "/Fundamental/res/VCA-1.svg" }, + { kModeFundamental, "/Fundamental/res/VCA.svg" }, + { kModeFundamental, "/Fundamental/res/VCF.svg" }, + { kModeFundamental, "/Fundamental/res/VCMixer.svg" }, + { kModeFundamental, "/Fundamental/res/VCO.svg" }, + { kModeFundamental, "/Fundamental/res/WTLFO.svg" }, + { kModeFundamental, "/Fundamental/res/WTVCO.svg" }, + { kModeFundamental, "/Fundamental/res/components/ADSR-bg.svg" }, + { kModeFundamental, "/Fundamental/res/components/Scope-bg.svg" }, // GPLv3+ - { kModeGoodSheperd, "/GoodSheperd/res/Holzschnabel.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/Hurdle.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/SEQ3st.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/Seqtrol.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/Stable16.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/Stall.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/Switch1.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/components/SquareSwitch_0.svg", {}, -1 }, - { kModeGoodSheperd, "/GoodSheperd/res/components/SquareSwitch_1.svg", {}, -1 }, + { kModeGoodSheperd, "/GoodSheperd/res/Holzschnabel.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/Hurdle.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/SEQ3st.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/Seqtrol.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/Stable16.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/Stall.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/Switch1.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/components/SquareSwitch_0.svg" }, + { kModeGoodSheperd, "/GoodSheperd/res/components/SquareSwitch_1.svg" }, // GPLv3+ - { kModeH4n4, "/h4n4-modules/res/XenQnt.svg", {}, -1 }, + { kModeH4n4, "/h4n4-modules/res/XenQnt.svg" }, // MIT - { kModeHamptonHarmonics, "/HamptonHarmonics/res/Arp.svg", {}, -1 }, - { kModeHamptonHarmonics, "/HamptonHarmonics/res/Progress.svg", {}, -1 }, + { kModeHamptonHarmonics, "/HamptonHarmonics/res/Arp.svg" }, + { kModeHamptonHarmonics, "/HamptonHarmonics/res/Progress.svg" }, // GPLv3+ - { kModeLomas, "/LomasModules/res/AdvancedSampler.svg", {}, -1 }, - { kModeLomas, "/LomasModules/res/GateSequencer.svg", {}, -1 }, + { kModeLomas, "/LomasModules/res/AdvancedSampler.svg" }, + { kModeLomas, "/LomasModules/res/GateSequencer.svg" }, // MIT - { kModeMockba, "/MockbaModular/res/Blank.svg", {}, -1 }, - // TODO + { kModeMockba, "/MockbaModular/res/Empty_gray.svg" }, // CC0 - { kModeMog, "/Mog/res/Network.svg", {}, -1 }, - { kModeMog, "/Mog/res/Nexus.svg", {}, -1 }, - // CC-BY-NC-ND-4.0 - // TODO Orbits - non compat license + { kModeMog, "/Mog/res/Network.svg" }, + { kModeMog, "/Mog/res/Nexus.svg" }, // CC-BY-SA-4.0 - { kModePrism, "/Prism/res/prism_Droplet.svg", {}, -1 }, - { kModePrism, "/Prism/res/prism_Rainbow.svg", {}, -1 }, - { kModePrism, "/Prism/res/RainbowScaleExpander.svg", {}, -1 }, + { kModePrism, "/Prism/res/prism_Droplet.svg" }, + { kModePrism, "/Prism/res/prism_Rainbow.svg" }, + { kModePrism, "/Prism/res/RainbowScaleExpander.svg" }, // CC-BY-SA-4.0 - { kModeRepelzen, "/repelzen/res/reface/reburst_bg.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/refold_bg.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg1.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg2.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg3.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg4.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg5.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg6.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg7.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/repelzen_bg8.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/retrig_bg.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/rewin_bg.svg", {}, -1 }, - { kModeRepelzen, "/repelzen/res/reface/rexmix_bg.svg", {}, -1 }, + { kModeRepelzen, "/repelzen/res/reface/reburst_bg.svg" }, + { kModeRepelzen, "/repelzen/res/reface/refold_bg.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg1.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg2.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg3.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg4.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg5.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg6.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg7.svg" }, + { kModeRepelzen, "/repelzen/res/reface/repelzen_bg8.svg" }, + { kModeRepelzen, "/repelzen/res/reface/retrig_bg.svg" }, + { kModeRepelzen, "/repelzen/res/reface/rewin_bg.svg" }, + { kModeRepelzen, "/repelzen/res/reface/rexmix_bg.svg" }, // GPLv3+ - { kModeSonusmodular, "/sonusmodular/res/addiction.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/bitter.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/bymidside.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/campione.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/chainsaw.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/ctrl.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/deathcrush.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/fraction.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/harmony.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/ladrone.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/luppolo.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/luppolo3.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/micromacro.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/mrcheb.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/multimulti.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/neurosc.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/oktagon.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/osculum.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/paramath.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/piconoise.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/pith.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/pusher.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/ringo.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/scramblase.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/tropicana.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/twoff.svg", {}, -1 }, - { kModeSonusmodular, "/sonusmodular/res/yabp.svg", {}, -1 }, - // TODO xtrnt - // TODO zzc, needs permission + { kModeSonusmodular, "/sonusmodular/res/addiction.svg" }, + { kModeSonusmodular, "/sonusmodular/res/bitter.svg" }, + { kModeSonusmodular, "/sonusmodular/res/bymidside.svg" }, + { kModeSonusmodular, "/sonusmodular/res/campione.svg" }, + { kModeSonusmodular, "/sonusmodular/res/chainsaw.svg" }, + { kModeSonusmodular, "/sonusmodular/res/ctrl.svg" }, + { kModeSonusmodular, "/sonusmodular/res/deathcrush.svg" }, + { kModeSonusmodular, "/sonusmodular/res/fraction.svg" }, + { kModeSonusmodular, "/sonusmodular/res/harmony.svg" }, + { kModeSonusmodular, "/sonusmodular/res/ladrone.svg" }, + { kModeSonusmodular, "/sonusmodular/res/luppolo.svg" }, + { kModeSonusmodular, "/sonusmodular/res/luppolo3.svg" }, + { kModeSonusmodular, "/sonusmodular/res/micromacro.svg" }, + { kModeSonusmodular, "/sonusmodular/res/mrcheb.svg" }, + { kModeSonusmodular, "/sonusmodular/res/multimulti.svg" }, + { kModeSonusmodular, "/sonusmodular/res/neurosc.svg" }, + { kModeSonusmodular, "/sonusmodular/res/oktagon.svg" }, + { kModeSonusmodular, "/sonusmodular/res/osculum.svg" }, + { kModeSonusmodular, "/sonusmodular/res/paramath.svg" }, + { kModeSonusmodular, "/sonusmodular/res/piconoise.svg" }, + { kModeSonusmodular, "/sonusmodular/res/pith.svg" }, + { kModeSonusmodular, "/sonusmodular/res/pusher.svg" }, + { kModeSonusmodular, "/sonusmodular/res/ringo.svg" }, + { kModeSonusmodular, "/sonusmodular/res/scramblase.svg" }, + { kModeSonusmodular, "/sonusmodular/res/tropicana.svg" }, + { kModeSonusmodular, "/sonusmodular/res/twoff.svg" }, + { kModeSonusmodular, "/sonusmodular/res/yabp.svg" }, }; static inline @@ -931,6 +938,22 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp return true; } break; + case kModeExtratone: + switch (paint.color) + { + case 0x00000000: + case 0x00ffffff: + case 0xff000000: + case 0xffd5ffe5: + case 0xfff2f2f2: + case 0xfff2ffff: + case 0xfff9f9f9: + case 0xffffffff: + break; + default: + return false; + } + break; case kModeFehlerFabrik: switch (paint.color) { @@ -999,6 +1022,17 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp return true; } break; + case kModeMockba: + switch (paint.color) + { + case 0xff1a1a1a: + case 0xff666666: + paint.color = 0xffd7e3f4; + return true; + default: + return false; + } + break; case kModeMog: switch (paint.color) { From 19eb3398ea60aa5afebaea88e2ba26511718be44 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 16 Sep 2022 01:29:49 +0100 Subject: [PATCH 048/451] Handle glue-the-gian and msm light theme too Signed-off-by: falkTX --- plugins/GlueTheGiant | 2 +- plugins/MSM | 2 +- plugins/Makefile | 3 +-- plugins/plugins.cpp | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/GlueTheGiant b/plugins/GlueTheGiant index 2c535bc3..5f05d62d 160000 --- a/plugins/GlueTheGiant +++ b/plugins/GlueTheGiant @@ -1 +1 @@ -Subproject commit 2c535bc38d61fd4d776aad7307c1dfbbed062b66 +Subproject commit 5f05d62ddc2773098daf1044eb6698581acd4eb6 diff --git a/plugins/MSM b/plugins/MSM index 2ebac756..3315c11e 160000 --- a/plugins/MSM +++ b/plugins/MSM @@ -1 +1 @@ -Subproject commit 2ebac7567be4dbb00128b5d7aaccfdf4aac26e81 +Subproject commit 3315c11e8506c28cece304fe4b772383a2820f86 diff --git a/plugins/Makefile b/plugins/Makefile index 639061fc..b80bc7ab 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1906,8 +1906,7 @@ $(BUILD_DIR)/MSM/%.cpp.o: MSM/%.cpp @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(MSM_CUSTOM),$(call custom_module_names,$(m),MSM)) \ - -DpluginInstance=pluginInstance__MSM \ - -DDARKTHEME + -DpluginInstance=pluginInstance__MSM $(BUILD_DIR)/myth-modules/%.cpp.o: myth-modules/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index dc7220c1..dab01bde 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -2942,6 +2942,10 @@ void updateStaticPluginsDarkMode() { panelTheme = darkMode ? 1 : 0; } + // glue the giant + { + gtg_default_theme = darkMode ? 1 : 0; + } #endif } From 677b7b8c923aaf02f8d27a124112ced4b05108b8 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 15 Sep 2022 23:40:36 +0200 Subject: [PATCH 049/451] remove stray Carla module from patch --- patches/examples/DRMR_-_Interverb.vcv | 30 ++++++--------------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/patches/examples/DRMR_-_Interverb.vcv b/patches/examples/DRMR_-_Interverb.vcv index a1ffb51a..27e1c8e8 100644 --- a/patches/examples/DRMR_-_Interverb.vcv +++ b/patches/examples/DRMR_-_Interverb.vcv @@ -1,6 +1,5 @@ { - "version": "2.0", - "zoom": 1.0, + "version": "2.1.2", "modules": [ { "id": 1184757612963547, @@ -462,27 +461,6 @@ 0 ] }, - { - "id": 8996849652715896, - "plugin": "Cardinal", - "model": "Carla", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - } - ], - "data": "\n\n\n \n false\n false\n false\n true\n 200\n 4000\n \n \n \n \n \n \n \n \n \n\n \n \n\n", - "pos": [ - 123, - 1 - ] - }, { "id": 644714212872810, "plugin": "Cardinal", @@ -492,7 +470,7 @@ "data": { "filepath": "", "lang": "None", - "etext": " \n ^ ^ ,_, \n (O,O) (.,.) \n ( ) ( ) \n--------\"-\"---dwb--\"-\"---dwb- \n\nversatile 4 voice polyphonic synth with a bit\nof reverb\n\nParam1: pulse width modulation\nParam2: filter frequency\nParam3: filter resonance\n\n\n /^--^\\ /^--^\\ /^--^\\ \n \\____/ \\____/ \\____/ \n / \\ / \\ / \\ \n | | | | | | \n \\__ __/ \\__ __/ \\__ __/ \n|^|^|^|^\\ \\^|^|^|^/ /^|^|^|^|^\\ \\^|^|^|^|^|^|^|^|^|\n| | | | |\\ \\| | |/ /| | | | | |\\ \\| | | | | | | | |\n#########/ /#####\\ \\###########/ /#################\n| | | | |\\/ | | | \\/| | | | | |\\/ | | | | | | | | |\n|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\n\n\n\n\n\n\n", + "etext": " \n ^ ^ ,_, \n (O,O) (.,.) \n ( ) ( ) \n--------\"-\"---dwb--\"-\"---dwb- \n\nversatile 4 voice polyphonic synth with a bit\nof reverb\n\nParam1: pulse width modulation\nParam2: filter frequency\nParam3: filter resonance\n\n\n /^--^\\ /^--^\\ /^--^\\ \n \\____/ \\____/ \\____/ \n / \\ / \\ / \\ \n | | | | | | \n \\__ __/ \\__ __/ \\__ __/ \n|^|^|^|^\\ \\^|^|^|^/ /^|^|^|^|^\\ \\^|^|^|^|^|^|^|^|^|\n| | | | |\\ \\| | |/ /| | | | | |\\ \\| | | | | | | | |\n#########/ /#####\\ \\###########/ /#################\n| | | | |\\/ | | | \\/| | | | | |\\/ | | | | | | | | |\n|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\n\n\n\n\n\n\n\n", "width": 27 }, "pos": [ @@ -527,6 +505,7 @@ "version": "2.0", "params": [], "data": { + "pwRange": 0.0, "smooth": true, "channels": 4, "polyMode": 0, @@ -546,6 +525,9 @@ "model": "HostParameters", "version": "2.0", "params": [], + "data": { + "smooth": true + }, "pos": [ 32, 2 From f5ff42b8d6b66f9b266ed2a09050f2d0f9fee43a Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 16 Sep 2022 23:12:43 +0100 Subject: [PATCH 050/451] Fix sassy scope for light mode, tweak text edit colors --- .../DearImGuiColorTextEditor/TextEditor.cpp | 4 ++-- plugins/Cardinal/src/SassyScope.cpp | 4 +++- plugins/Cardinal/src/sassy/sassy.hpp | 1 + plugins/Cardinal/src/sassy/sassy_scope.cpp | 19 +++++++++++-------- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp b/plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp index 4f17d251..6bc4a0fb 100644 --- a/plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp +++ b/plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp @@ -2038,11 +2038,11 @@ const TextEditor::Palette & TextEditor::GetDarkPalette() const TextEditor::Palette & TextEditor::GetLightPalette() { const static Palette p = { { - 0xff7f7f7f, // None + 0xff000000, // None 0xffff0c06, // Keyword 0xff008000, // Number 0xff2020a0, // String - 0xff304070, // Char literal + 0xff000000, // Char literal 0xff000000, // Punctuation 0xff406060, // Preprocessor 0xff404040, // Identifier diff --git a/plugins/Cardinal/src/SassyScope.cpp b/plugins/Cardinal/src/SassyScope.cpp index df79ccee..8f866af1 100644 --- a/plugins/Cardinal/src/SassyScope.cpp +++ b/plugins/Cardinal/src/SassyScope.cpp @@ -284,7 +284,9 @@ struct SassyScopeWidget : ImGuiWidget { ImGui::SetNextWindowPos(ImVec2(0, 0)); ImGui::SetNextWindowSize(ImVec2(box.size.x * scaleFactor, box.size.y * scaleFactor)); - do_show_scope_window(module != nullptr ? &module->scope : getFakeScopeInstance(), scaleFactor); + ScopeData* const scope = module != nullptr ? &module->scope : getFakeScopeInstance(); + scope->darkMode = settings::darkMode; + do_show_scope_window(scope, scaleFactor); } void onButton(const ButtonEvent& e) override diff --git a/plugins/Cardinal/src/sassy/sassy.hpp b/plugins/Cardinal/src/sassy/sassy.hpp index 254db7fd..9ab9f6b7 100644 --- a/plugins/Cardinal/src/sassy/sassy.hpp +++ b/plugins/Cardinal/src/sassy/sassy.hpp @@ -59,6 +59,7 @@ struct ScopeData { int mDisplay = 0; int mFFTZoom = 0; int mPot = 0; + bool darkMode = true; float fft1[65536 * 2]; float fft2[65536 * 2]; float ffta[65536 * 2]; diff --git a/plugins/Cardinal/src/sassy/sassy_scope.cpp b/plugins/Cardinal/src/sassy/sassy_scope.cpp index 2904be7c..88715573 100644 --- a/plugins/Cardinal/src/sassy/sassy_scope.cpp +++ b/plugins/Cardinal/src/sassy/sassy_scope.cpp @@ -759,11 +759,13 @@ void do_show_scope_window(ScopeData* gScope, const float uiScale) } else { - ImGui::PushStyleColor(ImGuiCol_FrameBg, 0xff3f3f3f); - ImGui::PushStyleColor(ImGuiCol_FrameBgActive, 0xff3f3f3f); - ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, 0xff3f3f3f); - ImGui::PushStyleColor(ImGuiCol_SliderGrab, 0xff7f7f7f); - ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, 0xff7f7f7f); + const ImU32 bgCol = gScope->darkMode ? 0xff3f3f3f : 0xffc0c0c0; + const ImU32 sliderCol = gScope->darkMode ? 0xff7f7f7f : 0xff808080; + ImGui::PushStyleColor(ImGuiCol_FrameBg, bgCol); + ImGui::PushStyleColor(ImGuiCol_FrameBgActive, bgCol); + ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, bgCol); + ImGui::PushStyleColor(ImGuiCol_SliderGrab, sliderCol); + ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, sliderCol); ImGui::SetNextItemWidth(grid_size * uiScale); float x = gScope->mScroll; ImGui::SliderFloat("###scroll", &x, -10.0f, 0.0f, "%.3f s"); @@ -810,12 +812,13 @@ void do_show_scope_window(ScopeData* gScope, const float uiScale) if (gScope->mMode == 0) { + const ImU32 bgCol = gScope->darkMode ? 0xff3f3f3f : 0xffc0c0c0; if (ImGui::Button("Pause", ImVec2(80 * uiScale, 20 * uiScale))) gScope->mMode = 1; ImGui::Text("Nudge (ms)"); - ImGui::PushStyleColor(ImGuiCol_Button, 0xff3f3f3f); - ImGui::PushStyleColor(ImGuiCol_ButtonActive, 0xff3f3f3f); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, 0xff3f3f3f); + ImGui::PushStyleColor(ImGuiCol_Button, bgCol); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, bgCol); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, bgCol); ImGui::Button("-0.1", ImVec2(38 * uiScale, 20 * uiScale)); ImGui::SameLine(); ImGui::Button("+0.1", ImVec2(38 * uiScale, 20 * uiScale)); From a808190e9adf316bc955fb545ed98a9a20559aa2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Sep 2022 01:14:51 +0100 Subject: [PATCH 051/451] Add method for module widgets to persist their black/silver screws --- include/helpers.hpp | 17 +++++++++--- plugins/ArableInstruments | 2 +- src/custom/asset.cpp | 9 ++++++- src/custom/dep.cpp | 54 ++++++++++++++++++++++++++++++++++----- 4 files changed, 70 insertions(+), 12 deletions(-) diff --git a/include/helpers.hpp b/include/helpers.hpp index 7126f3f5..2cf4ad01 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -36,6 +36,10 @@ namespace rack { +namespace asset { +void updateForcingBlackSilverScrewMode(std::string slug); +} + struct CardinalPluginModelHelper : plugin::Model { virtual app::ModuleWidget* createModuleWidgetFromEngineLoad(engine::Module* m) = 0; virtual void removeCachedModuleWidget(engine::Module* m) = 0; @@ -47,6 +51,11 @@ struct CardinalPluginModel : CardinalPluginModelHelper std::unordered_map widgets; std::unordered_map widgetNeedsDeletion; + CardinalPluginModel(const std::string slug) + { + this->slug = slug; + } + engine::Module* createModule() override { engine::Module* const m = new TModule; @@ -67,6 +76,7 @@ struct CardinalPluginModel : CardinalPluginModelHelper } tm = dynamic_cast(m); } + asset::updateForcingBlackSilverScrewMode(slug); app::ModuleWidget* const tmw = new TModuleWidget(tm); DISTRHO_CUSTOM_SAFE_ASSERT_RETURN(m != nullptr ? m->model->name.c_str() : "null", tmw->module == m, nullptr); tmw->setModel(this); @@ -81,6 +91,7 @@ struct CardinalPluginModel : CardinalPluginModelHelper TModule* const tm = dynamic_cast(m); DISTRHO_SAFE_ASSERT_RETURN(tm != nullptr, nullptr); + asset::updateForcingBlackSilverScrewMode(slug); TModuleWidget* const tmw = new TModuleWidget(tm); DISTRHO_SAFE_ASSERT_RETURN(tmw->module == m, nullptr); tmw->setModel(this); @@ -107,11 +118,9 @@ struct CardinalPluginModel : CardinalPluginModelHelper }; template -CardinalPluginModel* createModel(std::string slug) +CardinalPluginModel* createModel(const std::string slug) { - CardinalPluginModel* const o = new CardinalPluginModel(); - o->slug = slug; - return o; + return new CardinalPluginModel(slug); } } diff --git a/plugins/ArableInstruments b/plugins/ArableInstruments index f93a357f..a2de62d0 160000 --- a/plugins/ArableInstruments +++ b/plugins/ArableInstruments @@ -1 +1 @@ -Subproject commit f93a357f1643b831d60e28a3ac51575007aa4c5f +Subproject commit a2de62d0c3b9f764ce6b42441366788d1e52bfcc diff --git a/src/custom/asset.cpp b/src/custom/asset.cpp index 40ee4f27..efee14aa 100644 --- a/src/custom/asset.cpp +++ b/src/custom/asset.cpp @@ -31,6 +31,9 @@ namespace rack { namespace asset { +extern bool forceBlackScrew; +extern bool forceSilverScrew; + std::string userDir; // ignored std::string systemDir; // points to plugin resources dir (or installed/local Rack dir) std::string bundlePath; // points to plugin manifests dir (or empty) @@ -50,10 +53,14 @@ std::string user(std::string filename) { // get system resource, trimming "res/" prefix if we are loaded as a plugin bundle std::string system(std::string filename) { + /**/ if (forceBlackScrew && string::endsWith(filename, "/ScrewBlack.svg")) + filename = filename.substr(0, filename.size()-15) + "/./ScrewBlack.svg"; + else if (forceSilverScrew && string::endsWith(filename, "/ScrewSilver.svg")) + filename = filename.substr(0, filename.size()-16) + "/./ScrewSilver.svg"; return system::join(systemDir, bundlePath.empty() ? filename : trim(filename)); } -// get plugin resource +// get plugin resource path std::string plugin(plugin::Plugin* plugin, std::string filename) { DISTRHO_SAFE_ASSERT_RETURN(plugin != nullptr, {}); return system::join(plugin->path, filename); diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 53a5e2a7..13379e92 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -23,6 +23,42 @@ #include namespace rack { +namespace asset { +bool forceBlackScrew = false; +bool forceSilverScrew = false; +void updateForcingBlackSilverScrewMode(std::string slug) { + forceBlackScrew = ( + // arable instruments + slug == "Joni" + // axioma + || slug == "TheBifurcator" + || slug == "Tesseract" + || slug == "Ikeda" + || slug == "Rhodonea" + // parable instruments + || slug == "Neil" + // rackwindows + || slug == "bitshiftgain" + || slug == "capacitor" + || slug == "capacitor_stereo" + || slug == "chorus" + || slug == "console" + || slug == "console_mm" + || slug == "distance" + || slug == "golem" + || slug == "holt" + || slug == "hombre" + || slug == "interstage" + || slug == "monitoring" + || slug == "mv" + || slug == "rasp" + || slug == "reseq" + || slug == "tape" + || slug == "tremolo" + || slug == "vibrato" + ); +} +} namespace settings { bool darkMode = true; int rateLimit = 0; @@ -1217,17 +1253,14 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con NSVGshape* shapesOrig; NSVGshape* shapesMOD; - // Special case for light/dark screws - if (std::strncmp(filename + (filenamelen-16), "/ScrewSilver.svg", 16) == 0) + if (filenamelen < 18) { - const std::string blackfilename = std::string(filename).substr(0, filenamelen-10) + "Black.svg"; - hasDarkMode = true; shapesOrig = shapesMOD = nullptr; - handleMOD = nsvgParseFromFile(blackfilename.c_str(), units, dpi); goto postparse; } - if (std::strncmp(filename + (filenamelen-15), "/ScrewBlack.svg", 15) == 0) + // Special case for light/dark screws + if (std::strncmp(filename + (filenamelen-15), "/ScrewBlack.svg", 15) == 0 && filename[filenamelen-16] != '.') { const std::string silverfilename = std::string(filename).substr(0, filenamelen-9) + "Silver.svg"; hasLightMode = true; @@ -1236,6 +1269,15 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con goto postparse; } + if (std::strncmp(filename + (filenamelen-16), "/ScrewSilver.svg", 16) == 0 && filename[filenamelen-17] != '.') + { + const std::string blackfilename = std::string(filename).substr(0, filenamelen-10) + "Black.svg"; + hasDarkMode = true; + shapesOrig = shapesMOD = nullptr; + handleMOD = nsvgParseFromFile(blackfilename.c_str(), units, dpi); + goto postparse; + } + #if 0 // Special case for GlueTheGiant if (std::strstr(filename, "/GlueTheGiant/res/") != nullptr) From 066344b8b0e7b107a834a3fb157e45da1b775a35 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Sep 2022 21:57:42 +0100 Subject: [PATCH 052/451] Fix a few issues with Bidoo under Cardinal --- plugins/Bidoo | 2 +- plugins/BidooDark/plugin.cpp | 2 +- src/CardinalPlugin.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Bidoo b/plugins/Bidoo index 69c8a23d..8610d4c8 160000 --- a/plugins/Bidoo +++ b/plugins/Bidoo @@ -1 +1 @@ -Subproject commit 69c8a23d0182b5ef50c23b1870c354b4e30811d1 +Subproject commit 8610d4c86740d9d67ebfa4ded70279df7aeb95be diff --git a/plugins/BidooDark/plugin.cpp b/plugins/BidooDark/plugin.cpp index 59077fd3..9e2a23d9 100644 --- a/plugins/BidooDark/plugin.cpp +++ b/plugins/BidooDark/plugin.cpp @@ -16,7 +16,7 @@ void InstantiateExpanderItem::onAction(const event::Action &e) { } json_t* BidooModule::dataToJson() { - return nullptr; + return json_object(); } void BidooModule::dataFromJson(json_t*) { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index cfda583e..f72e560f 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -1202,8 +1202,6 @@ class CardinalPlugin : public CardinalBasePlugin DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); - const ScopedContext sc(this); - rack::system::removeRecursively(fAutosavePath); rack::system::createDirectories(fAutosavePath); @@ -1224,6 +1222,8 @@ class CardinalPlugin : public CardinalBasePlugin } DISTRHO_SAFE_EXCEPTION_RETURN("setState unarchiveToDirectory",); } + const ScopedContext sc(this); + try { context->patch->loadAutosave(); } DISTRHO_SAFE_EXCEPTION_RETURN("setState loadAutosave",); From f76d93112738771f597c684a06347676cb8f90ee Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Sep 2022 22:06:59 +0100 Subject: [PATCH 053/451] Add patch to fix initial AU sample rate mismatch --- .github/workflows/build.yml | 2 + ...b6dcc7d17d35ed31dc9761a46eb510a668ac.patch | 51 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c4833bd..4f20a47e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -532,6 +532,7 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env macos; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE + patch -d jucewrapper/JUCE -p1 -i ../bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd @@ -621,6 +622,7 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env macos-universal; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE + patch -d jucewrapper/JUCE -p1 -i ../bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ diff --git a/jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch b/jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch new file mode 100644 index 00000000..9476e373 --- /dev/null +++ b/jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch @@ -0,0 +1,51 @@ +From bf85b6dcc7d17d35ed31dc9761a46eb510a668ac Mon Sep 17 00:00:00 2001 +From: Sebastian Kraft +Date: Fri, 6 May 2022 09:09:34 +0200 +Subject: [PATCH] Always set sample rate of hosted AU plugins, fixes a bug with + plugins reporting incorrect sample rates + +--- + .../juce_AudioUnitPluginFormat.mm | 25 ++++++++----------- + 1 file changed, 11 insertions(+), 14 deletions(-) + +diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +index 59c0e06d368..8ee8f9a465c 100644 +--- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm ++++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +@@ -1057,25 +1057,22 @@ void prepareToPlay (double newSampleRate, int estimatedSamplesPerBlock) override + + AudioUnitGetProperty (audioUnit, kAudioUnitProperty_SampleRate, scope, static_cast (i), &sampleRate, &sampleRateSize); + +- if (sampleRate != sr) ++ if (isAUv3) // setting kAudioUnitProperty_SampleRate fails on AUv3s + { +- if (isAUv3) // setting kAudioUnitProperty_SampleRate fails on AUv3s +- { +- AudioStreamBasicDescription stream; +- UInt32 dataSize = sizeof (stream); +- auto err = AudioUnitGetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, &dataSize); ++ AudioStreamBasicDescription stream; ++ UInt32 dataSize = sizeof (stream); ++ auto err = AudioUnitGetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, &dataSize); + +- if (err == noErr && dataSize == sizeof (stream)) +- { +- stream.mSampleRate = sr; +- AudioUnitSetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, sizeof (stream)); +- } +- } +- else ++ if (err == noErr && dataSize == sizeof (stream)) + { +- AudioUnitSetProperty (audioUnit, kAudioUnitProperty_SampleRate, scope, static_cast (i), &sr, sizeof (sr)); ++ stream.mSampleRate = sr; ++ AudioUnitSetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, sizeof (stream)); + } + } ++ else ++ { ++ AudioUnitSetProperty (audioUnit, kAudioUnitProperty_SampleRate, scope, static_cast (i), &sr, sizeof (sr)); ++ } + + if (isInput) + { From 5f918cf0b1fea68dc9ccd5977b0fca2e57574299 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 00:47:15 +0100 Subject: [PATCH 054/451] Revert "Add patch to fix initial AU sample rate mismatch" This reverts commit f76d93112738771f597c684a06347676cb8f90ee. --- .github/workflows/build.yml | 2 - ...b6dcc7d17d35ed31dc9761a46eb510a668ac.patch | 51 ------------------- 2 files changed, 53 deletions(-) delete mode 100644 jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f20a47e..5c4833bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -532,7 +532,6 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env macos; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE - patch -d jucewrapper/JUCE -p1 -i ../bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd @@ -622,7 +621,6 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env macos-universal; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE - patch -d jucewrapper/JUCE -p1 -i ../bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ diff --git a/jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch b/jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch deleted file mode 100644 index 9476e373..00000000 --- a/jucewrapper/bf85b6dcc7d17d35ed31dc9761a46eb510a668ac.patch +++ /dev/null @@ -1,51 +0,0 @@ -From bf85b6dcc7d17d35ed31dc9761a46eb510a668ac Mon Sep 17 00:00:00 2001 -From: Sebastian Kraft -Date: Fri, 6 May 2022 09:09:34 +0200 -Subject: [PATCH] Always set sample rate of hosted AU plugins, fixes a bug with - plugins reporting incorrect sample rates - ---- - .../juce_AudioUnitPluginFormat.mm | 25 ++++++++----------- - 1 file changed, 11 insertions(+), 14 deletions(-) - -diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm -index 59c0e06d368..8ee8f9a465c 100644 ---- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm -+++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm -@@ -1057,25 +1057,22 @@ void prepareToPlay (double newSampleRate, int estimatedSamplesPerBlock) override - - AudioUnitGetProperty (audioUnit, kAudioUnitProperty_SampleRate, scope, static_cast (i), &sampleRate, &sampleRateSize); - -- if (sampleRate != sr) -+ if (isAUv3) // setting kAudioUnitProperty_SampleRate fails on AUv3s - { -- if (isAUv3) // setting kAudioUnitProperty_SampleRate fails on AUv3s -- { -- AudioStreamBasicDescription stream; -- UInt32 dataSize = sizeof (stream); -- auto err = AudioUnitGetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, &dataSize); -+ AudioStreamBasicDescription stream; -+ UInt32 dataSize = sizeof (stream); -+ auto err = AudioUnitGetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, &dataSize); - -- if (err == noErr && dataSize == sizeof (stream)) -- { -- stream.mSampleRate = sr; -- AudioUnitSetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, sizeof (stream)); -- } -- } -- else -+ if (err == noErr && dataSize == sizeof (stream)) - { -- AudioUnitSetProperty (audioUnit, kAudioUnitProperty_SampleRate, scope, static_cast (i), &sr, sizeof (sr)); -+ stream.mSampleRate = sr; -+ AudioUnitSetProperty (audioUnit, kAudioUnitProperty_StreamFormat, scope, static_cast (i), &stream, sizeof (stream)); - } - } -+ else -+ { -+ AudioUnitSetProperty (audioUnit, kAudioUnitProperty_SampleRate, scope, static_cast (i), &sr, sizeof (sr)); -+ } - - if (isInput) - { From 43306dd2bc2f54766522deb43c870c2133595fcc Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 00:48:26 +0100 Subject: [PATCH 055/451] Make sure to report bufsize and samplerate changes in AU --- jucewrapper/CardinalWrapper.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index a4fd7e1f..771d9415 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -270,11 +270,11 @@ class CardinalWrapperProcessor : public juce::AudioProcessor { if (const double sampleRate = getSampleRate()) if (sampleRate > 0.0) - plugin.setSampleRate(sampleRate); + plugin.setSampleRate(sampleRate, true); if (const int samplesPerBlock = getBlockSize()) if (samplesPerBlock > 0) - plugin.setBufferSize(static_cast(samplesPerBlock)); + plugin.setBufferSize(static_cast(samplesPerBlock), true); if (parameterCount != 0) { @@ -313,8 +313,8 @@ class CardinalWrapperProcessor : public juce::AudioProcessor DISTRHO_SAFE_ASSERT_RETURN(samplesPerBlock > 0,); plugin.deactivateIfNeeded(); - plugin.setSampleRate(sampleRate); - plugin.setBufferSize(static_cast(samplesPerBlock)); + plugin.setSampleRate(sampleRate, true); + plugin.setBufferSize(static_cast(samplesPerBlock), true); plugin.activate(); } From b7ff3dc46fe3b254eb55b7c77750789c15b9eaaa Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 10:06:21 +0100 Subject: [PATCH 056/451] Deal with Bitwig buggy behaviour regarding clap MIDI notes --- dpf | 2 +- src/Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dpf b/dpf index ac803f59..3c4ad99a 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit ac803f5991e1adac6581658a346250d4246e59b6 +Subproject commit 3c4ad99a891f0595c5fe9d1e552d81bf1277c38f diff --git a/src/Makefile b/src/Makefile index 9b1c3d03..c2d1895a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -239,6 +239,7 @@ vst3: $(TARGET) clap: $(TARGET) $(MAKE) clap -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) clap -C CardinalSynth $(CARDINAL_SYNTH_ARGS) clean: rm -f $(TARGET) From d40b2f0eb339287f42532bff00025b948330c19e Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 10:07:25 +0100 Subject: [PATCH 057/451] Enable LTO in preparation for release --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c4833bd..1af4196d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 32 + CACHE_VERSION: 33 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'false' + WITH_LTO: 'true' jobs: linux-arm64: From e70cc85ec769b77309e6c0e7362822ddc6fafdfc Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 10:47:19 +0100 Subject: [PATCH 058/451] Fix CLAP UI under bitwig linux Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 3c4ad99a..dcee933e 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 3c4ad99a891f0595c5fe9d1e552d81bf1277c38f +Subproject commit dcee933ef595dc62fa9ea79d9d3cadaf85d0d543 From 6655ba0a58bfdedf94835ba61c49843e8aac6cce Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 15:02:35 +0100 Subject: [PATCH 059/451] Add 22.09 celebratory patch --- .../examples/falkTX_-_Divide-no-Conquer.vcv | 1044 +++++++++++++++++ utils/macOS/welcome.txt | 2 +- 2 files changed, 1045 insertions(+), 1 deletion(-) create mode 100644 patches/examples/falkTX_-_Divide-no-Conquer.vcv diff --git a/patches/examples/falkTX_-_Divide-no-Conquer.vcv b/patches/examples/falkTX_-_Divide-no-Conquer.vcv new file mode 100644 index 00000000..aadf5d4a --- /dev/null +++ b/patches/examples/falkTX_-_Divide-no-Conquer.vcv @@ -0,0 +1,1044 @@ +{ + "version": "2.1.2", + "zoom": 1.0, + "modules": [ + { + "id": 845369410352407, + "plugin": "Befaco", + "model": "NoisePlethora", + "version": "2.0", + "params": [ + { + "value": 0.5, + "id": 0 + }, + { + "value": 0.5, + "id": 1 + }, + { + "value": 1.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 1.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 1.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + } + ], + "rightModuleId": 2572531694505243, + "data": { + "algorithmA": "radioOhNo", + "algorithmB": "radioOhNo", + "bypassFilters": false, + "blockDC": true + }, + "pos": [ + 108, + 0 + ] + }, + { + "id": 2572531694505243, + "plugin": "Befaco", + "model": "EvenVCO", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + } + ], + "leftModuleId": 845369410352407, + "pos": [ + 122, + 0 + ] + }, + { + "id": 1138348734715247, + "plugin": "FehlerFabrik-Suite", + "model": "PSIOP", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + } + ], + "data": { + "DC Blocking": true, + "Speed Looping": false, + "FM Index Modulation": false, + "Operator Resyncing": false + }, + "pos": [ + 111, + -1 + ] + }, + { + "id": 2323510085504344, + "plugin": "Mog", + "model": "Network", + "version": "2.0", + "params": [ + { + "value": 0.5, + "id": 0 + }, + { + "value": 0.5, + "id": 1 + }, + { + "value": 0.5, + "id": 2 + }, + { + "value": 0.5, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.5, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.5, + "id": 9 + }, + { + "value": 0.5, + "id": 10 + }, + { + "value": 0.5, + "id": 11 + }, + { + "value": 0.5, + "id": 12 + }, + { + "value": 0.5, + "id": 13 + }, + { + "value": 0.5, + "id": 14 + }, + { + "value": 0.5, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.40000000596046448, + "id": 18 + }, + { + "value": 1.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + } + ], + "data": { + "channels": 16, + "polyMode": 1, + "nodeStates": [ + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 0, + -2, + -1, + -1, + 2, + -2, + 0, + -2, + 0 + ] + }, + "pos": [ + 5, + 0 + ] + }, + { + "id": 7733409763520287, + "plugin": "Fundamental", + "model": "LFO", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 2.1946320533752441, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + } + ], + "pos": [ + -5, + -1 + ] + }, + { + "id": 7910322281435707, + "plugin": "GoodSheperd", + "model": "SEQ3st", + "version": "2.0", + "params": [ + { + "value": 1.2771106958389282, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 8.0, + "id": 3 + }, + { + "value": 0.33734941482543945, + "id": 4 + }, + { + "value": 2.1566267013549805, + "id": 5 + }, + { + "value": 1.3012033700942993, + "id": 6 + }, + { + "value": 1.8674684762954712, + "id": 7 + }, + { + "value": 2.4819269180297852, + "id": 8 + }, + { + "value": 1.9036139249801636, + "id": 9 + }, + { + "value": 2.1807231903076172, + "id": 10 + }, + { + "value": 1.493976354598999, + "id": 11 + }, + { + "value": 1.3975902795791626, + "id": 12 + }, + { + "value": 1.4337348937988281, + "id": 13 + }, + { + "value": 1.9277111291885376, + "id": 14 + }, + { + "value": 1.9277104139328003, + "id": 15 + }, + { + "value": 0.74698799848556519, + "id": 16 + }, + { + "value": 1.3614462614059448, + "id": 17 + }, + { + "value": 0.45783132314682007, + "id": 18 + }, + { + "value": 0.98795127868652344, + "id": 19 + }, + { + "value": 0.1686750054359436, + "id": 20 + }, + { + "value": 1.0782999992370605, + "id": 21 + }, + { + "value": 0.65060001611709595, + "id": 22 + }, + { + "value": 0.9337499737739563, + "id": 23 + }, + { + "value": 1.2409499883651733, + "id": 24 + }, + { + "value": 0.95179998874664307, + "id": 25 + }, + { + "value": 1.0903500318527222, + "id": 26 + }, + { + "value": 0.74699997901916504, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + } + ], + "rightModuleId": 7124670414167707, + "data": { + "running": true, + "gates": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + "pos": [ + 5, + -1 + ] + }, + { + "id": 6113641652229320, + "plugin": "Fundamental", + "model": "Quantizer", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + } + ], + "leftModuleId": 7124670414167707, + "data": { + "enabledNotes": [ + true, + false, + true, + false, + true, + false, + false, + true, + false, + true, + false, + false + ] + }, + "pos": [ + 44, + -1 + ] + }, + { + "id": 6436949913364135, + "plugin": "Befaco", + "model": "EvenVCO", + "version": "2.0", + "params": [ + { + "value": -5.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + } + ], + "pos": [ + 53, + -1 + ] + }, + { + "id": 7124670414167707, + "plugin": "Extratone", + "model": "Ichneumonid", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 1.0, + "id": 7 + }, + { + "value": 1.0, + "id": 8 + }, + { + "value": 1.0, + "id": 9 + }, + { + "value": 1.0, + "id": 10 + }, + { + "value": 1.0, + "id": 11 + }, + { + "value": 1.0, + "id": 12 + }, + { + "value": 1.0, + "id": 13 + }, + { + "value": 1.0, + "id": 14 + }, + { + "value": 1.0, + "id": 15 + } + ], + "leftModuleId": 7910322281435707, + "rightModuleId": 6113641652229320, + "pos": [ + 32, + -1 + ] + }, + { + "id": 6704396017183286, + "plugin": "Bogaudio", + "model": "Bogaudio-Unison", + "version": "2.0", + "params": [ + { + "value": 16.0, + "id": 0 + }, + { + "value": 30.662649154663086, + "id": 1 + } + ], + "data": {}, + "pos": [ + 49, + -1 + ] + }, + { + "id": 5274645123493261, + "plugin": "AudibleInstruments", + "model": "Plaits", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": -2.0, + "id": 2 + }, + { + "value": 0.5, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.5, + "id": 9 + }, + { + "value": 0.5, + "id": 10 + } + ], + "leftModuleId": 3982223550835589, + "rightModuleId": 3927208667084646, + "data": { + "lowCpu": true, + "model": 14 + }, + "pos": [ + 34, + 0 + ] + }, + { + "id": 3927208667084646, + "plugin": "AudibleInstruments", + "model": "Plaits", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": -1.0, + "id": 2 + }, + { + "value": 0.5, + "id": 3 + }, + { + "value": 0.75, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.5, + "id": 9 + }, + { + "value": 0.5, + "id": 10 + } + ], + "leftModuleId": 5274645123493261, + "data": { + "lowCpu": true, + "model": 10 + }, + "pos": [ + 46, + 0 + ] + }, + { + "id": 3982223550835589, + "plugin": "MockbaModular", + "model": "Dividah", + "version": "2.0", + "params": [], + "rightModuleId": 5274645123493261, + "pos": [ + 32, + 0 + ] + }, + { + "id": 3793316304034300, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.31600001454353333, + "id": 0 + } + ], + "data": { + "dcFilter": true + }, + "pos": [ + 62, + -1 + ] + }, + { + "id": 4515410204981580, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 1.42400062084198, + "id": 0 + } + ], + "leftModuleId": 4385899070319166, + "data": { + "dcFilter": true + }, + "pos": [ + 67, + 0 + ] + }, + { + "id": 4385899070319166, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.8400002121925354, + "id": 0 + } + ], + "rightModuleId": 4515410204981580, + "data": { + "dcFilter": true + }, + "pos": [ + 59, + 0 + ] + } + ], + "cables": [ + { + "id": 8073390375565190, + "outputModuleId": 2323510085504344, + "outputId": 1, + "inputModuleId": 2323510085504344, + "inputId": 9, + "color": "#ffd452" + }, + { + "id": 8282467367250825, + "outputModuleId": 7733409763520287, + "outputId": 3, + "inputModuleId": 2323510085504344, + "inputId": 0, + "color": "#a8ff52" + }, + { + "id": 7741525453916855, + "outputModuleId": 7733409763520287, + "outputId": 3, + "inputModuleId": 7910322281435707, + "inputId": 1, + "color": "#67ff52" + }, + { + "id": 7343310319365506, + "outputModuleId": 7910322281435707, + "outputId": 1, + "inputModuleId": 7124670414167707, + "inputId": 8, + "color": "#527dff" + }, + { + "id": 8663072108782081, + "outputModuleId": 7910322281435707, + "outputId": 2, + "inputModuleId": 7124670414167707, + "inputId": 9, + "color": "#ff5293" + }, + { + "id": 2408554084144896, + "outputModuleId": 7124670414167707, + "outputId": 1, + "inputModuleId": 6113641652229320, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 1993175531751407, + "outputModuleId": 2323510085504344, + "outputId": 40, + "inputModuleId": 2323510085504344, + "inputId": 22, + "color": "#a8ff52" + }, + { + "id": 3675645084235896, + "outputModuleId": 2323510085504344, + "outputId": 60, + "inputModuleId": 7124670414167707, + "inputId": 4, + "color": "#6752ff" + }, + { + "id": 914539014511784, + "outputModuleId": 2323510085504344, + "outputId": 28, + "inputModuleId": 7124670414167707, + "inputId": 5, + "color": "#a852ff" + }, + { + "id": 4466427789626097, + "outputModuleId": 6704396017183286, + "outputId": 0, + "inputModuleId": 6436949913364135, + "inputId": 1, + "color": "#52beff" + }, + { + "id": 6032249062735731, + "outputModuleId": 6704396017183286, + "outputId": 1, + "inputModuleId": 6436949913364135, + "inputId": 0, + "color": "#527dff" + }, + { + "id": 5205186222022677, + "outputModuleId": 6436949913364135, + "outputId": 2, + "inputModuleId": 3793316304034300, + "inputId": 0, + "color": "#a852ff" + }, + { + "id": 205800917378687, + "outputModuleId": 2323510085504344, + "outputId": 46, + "inputModuleId": 2323510085504344, + "inputId": 31, + "color": "#ffd452" + }, + { + "id": 5650060513024868, + "outputModuleId": 2323510085504344, + "outputId": 16, + "inputModuleId": 2323510085504344, + "inputId": 15, + "color": "#67ff52" + }, + { + "id": 212470725194084, + "outputModuleId": 3927208667084646, + "outputId": 0, + "inputModuleId": 4515410204981580, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 793863606792629, + "outputModuleId": 5274645123493261, + "outputId": 0, + "inputModuleId": 4385899070319166, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 940323606941669, + "outputModuleId": 7733409763520287, + "outputId": 3, + "inputModuleId": 3982223550835589, + "inputId": 0, + "color": "#67ff52" + }, + { + "id": 3055152764376614, + "outputModuleId": 3982223550835589, + "outputId": 0, + "inputModuleId": 3927208667084646, + "inputId": 5, + "color": "#52ffff" + }, + { + "id": 5223449680888454, + "outputModuleId": 3982223550835589, + "outputId": 1, + "inputModuleId": 5274645123493261, + "inputId": 5, + "color": "#52ffff" + }, + { + "id": 6071685052548665, + "outputModuleId": 6113641652229320, + "outputId": 0, + "inputModuleId": 6704396017183286, + "inputId": 1, + "color": "#527dff" + }, + { + "id": 1592690071120657, + "outputModuleId": 2323510085504344, + "outputId": 16, + "inputModuleId": 2323510085504344, + "inputId": 20, + "color": "#ff9352" + } + ] +} diff --git a/utils/macOS/welcome.txt b/utils/macOS/welcome.txt index 48a4ca01..44cf7bb1 100644 --- a/utils/macOS/welcome.txt +++ b/utils/macOS/welcome.txt @@ -6,7 +6,7 @@ They are all equivalent in performance and behaviour. FX and Synth variants both have 2 audio outputs, while "main" has 8. All variants have MIDI input and output support. -This package provides the AU, LV2, VST2 and VST3 audio plugins, plus standalones for both JACK and native audio/MIDI. +This package provides the AU, LV2, VST2, VST3 and CLAP audio plugins, plus standalones for both JACK and native audio/MIDI. Notes: - Due to AU and VST2 not supporting CV ports, the main variant is not available for these formats From a0369fdd6d43b21a04972ddd7fe74f4ef346662f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 15:18:49 +0100 Subject: [PATCH 060/451] Fix Host Audio2 label under light mode --- plugins/Cardinal/src/Widgets.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Cardinal/src/Widgets.hpp b/plugins/Cardinal/src/Widgets.hpp index 7faff609..f836e58b 100644 --- a/plugins/Cardinal/src/Widgets.hpp +++ b/plugins/Cardinal/src/Widgets.hpp @@ -231,7 +231,7 @@ struct NanoKnob : Knob { // bottom label (name) bndIconLabelValue(args.vg, -w, knobStartY + knobSize + BND_WIDGET_HEIGHT * 0.75f, w*3, BND_WIDGET_HEIGHT, -1, - SCHEME_WHITE, BND_CENTER, + settings::darkMode ? SCHEME_WHITE : SCHEME_BLACK, BND_CENTER, BND_LABEL_FONT_SIZE, displayLabel.c_str(), nullptr); } From 2f65001d23b78c8530ebf1f6e73e37cdfa8bd8a2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Sep 2022 20:25:13 +0100 Subject: [PATCH 061/451] Disable LTO now that release is done Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1af4196d..fabb7600 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'true' + WITH_LTO: 'false' jobs: linux-arm64: From 4d9081762db2d57344d4795be2d50016a68a42ad Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 Sep 2022 09:33:40 +0100 Subject: [PATCH 062/451] Fix missing native midi in some setups --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index dcee933e..f049ce37 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit dcee933ef595dc62fa9ea79d9d3cadaf85d0d543 +Subproject commit f049ce37805ed9aff64320aa8a4075b8223881a6 From acfba5687e726f09b96a626a1aa548c876f4ffc0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 21 Sep 2022 15:57:23 +0100 Subject: [PATCH 063/451] Install CardinalNative during "make install" step Signed-off-by: falkTX --- Makefile | 6 ++++-- dpf | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b2b722f5..7673c4f6 100644 --- a/Makefile +++ b/Makefile @@ -311,10 +311,12 @@ ifeq ($(VST3_SUPPORTED),true) cp -rL bin/CardinalSynth.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/CardinalSynth.vst3/Contents/ endif - install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ + install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ + install -m 755 bin/CardinalNative$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ + cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/cardinal/ - install -m 644 README.md $(DESTDIR)$(PREFIX)/share/doc/cardinal/ + install -m 644 README.md $(DESTDIR)$(PREFIX)/share/doc/cardinal/ install -m 644 docs/*.md docs/*.png $(DESTDIR)$(PREFIX)/share/doc/cardinal/docs/ # -------------------------------------------------------------- diff --git a/dpf b/dpf index f049ce37..e24e2a42 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit f049ce37805ed9aff64320aa8a4075b8223881a6 +Subproject commit e24e2a42ad7e846066ceef941b96b8f90063bd87 From ed2545030675ea00dd1c649ca4e87d45cff9270c Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 26 Sep 2022 16:05:52 +0100 Subject: [PATCH 064/451] Rebuild/update cache, update carla, dpf and pawpaw to latest Signed-off-by: falkTX --- .github/workflows/build.yml | 25 +++++++++---------------- Makefile | 22 ++++++++++++++++++++++ carla | 2 +- deps/PawPaw | 2 +- dpf | 2 +- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fabb7600..0b64df10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 33 + CACHE_VERSION: 34 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 @@ -57,7 +57,6 @@ jobs: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64 - name: Build linux arm64 cross-compiled run: | @@ -142,7 +141,6 @@ jobs: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf - name: Build linux armhf cross-compiled run: | @@ -223,7 +221,6 @@ jobs: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686 - name: Build linux i686 run: | @@ -309,7 +306,6 @@ jobs: PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh linux-riscv64 && ./deps/PawPaw/.cleanup.sh linux-riscv64 - name: Build linux riscv64 cross-compiled run: | @@ -382,7 +378,6 @@ jobs: - name: Build extra dependencies run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux - name: Build linux x86_64 run: | @@ -911,7 +906,7 @@ jobs: *.zip win32: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -936,8 +931,8 @@ jobs: run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal - sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 + sudo apt-get install -yqq --allow-downgrades libgd3/jammy + sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget - name: Set up dependencies run: | sudo dpkg --add-architecture i386 @@ -950,7 +945,6 @@ jobs: - name: Build extra dependencies run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32 - name: Build win32 cross-compiled (base) run: | @@ -964,7 +958,7 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win32; popd - make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_CUSTOM_DPF=true CUSTOM_DPF_PATH=$(pwd)/dpf -j $(nproc) + make carla-win32 -j $(nproc) make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) @@ -1006,7 +1000,7 @@ jobs: *.zip win64: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: @@ -1031,8 +1025,8 @@ jobs: run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal - sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 + sudo apt-get install -yqq --allow-downgrades libgd3/jammy + sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget - name: Set up dependencies run: | sudo dpkg --add-architecture i386 @@ -1045,7 +1039,6 @@ jobs: - name: Build extra dependencies run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi - export PATH="/usr/lib/ccache:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64 - name: Build win64 cross-compiled (base) run: | @@ -1059,7 +1052,7 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win64; popd - make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_CUSTOM_DPF=true CUSTOM_DPF_PATH=$(pwd)/dpf all win32r -j $(nproc) + make carla-win32 -j $(nproc) make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) diff --git a/Makefile b/Makefile index 7673c4f6..48713086 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,28 @@ ifneq ($(STATIC_BUILD),true) USING_CUSTOM_DPF=true endif +carla-win32: +ifneq ($(STATIC_BUILD),true) + $(MAKE) all -C carla $(CARLA_EXTRA_ARGS) \ + CAN_GENERATE_LV2_TTL=false \ + CUSTOM_DPF_PATH=$(CURDIR)/dpf \ + HAVE_PYQT=true \ + HAVE_QT5=true \ + HAVE_QT5PKG=true \ + STATIC_PLUGIN_TARGET=true \ + USING_CUSTOM_DPF=true +ifeq ($(CPU_X86_64),true) + $(MAKE) win32r -C carla $(CARLA_EXTRA_ARGS) \ + CAN_GENERATE_LV2_TTL=false \ + CUSTOM_DPF_PATH=$(CURDIR)/dpf \ + HAVE_PYQT=true \ + HAVE_QT5=true \ + HAVE_QT5PKG=true \ + STATIC_PLUGIN_TARGET=true \ + USING_CUSTOM_DPF=true +endif +endif + deps: ifeq ($(SYSDEPS),true) $(MAKE) quickjs -C deps diff --git a/carla b/carla index 8c58d099..76cdd50b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 8c58d0994cd512263e34db1c8f45c1f1a9689a58 +Subproject commit 76cdd50bfa8c3e7c96bb33c239916b0e28e2ce92 diff --git a/deps/PawPaw b/deps/PawPaw index 75d86db5..b4c1de98 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 75d86db5d171228247e1297d13090cb11220fe92 +Subproject commit b4c1de98b8ac60b95a7ced6959062e4e2a863fd6 diff --git a/dpf b/dpf index e24e2a42..8e0eaa4d 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit e24e2a42ad7e846066ceef941b96b8f90063bd87 +Subproject commit 8e0eaa4ddd9d851da00a5f96d9c6ea6bad3c5c07 From 0c3aa859c40003a9779c34dd0842a71a7d815f0a Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 26 Sep 2022 18:44:13 +0100 Subject: [PATCH 065/451] A few more tweaks for updated builds Signed-off-by: falkTX --- Makefile | 51 ++++----------------------------------------------- carla | 2 +- deps/PawPaw | 2 +- dpf | 2 +- 4 files changed, 7 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 48713086..4d665ac5 100644 --- a/Makefile +++ b/Makefile @@ -140,8 +140,7 @@ endif # -------------------------------------------------------------- # MOD builds -EXTRA_MOD_FLAGS = -I../include/single-precision -fsingle-precision-constant - +EXTRA_MOD_FLAGS = -I../include/single-precision -fsingle-precision-constant -Wno-attributes ifeq ($(MODDUO),true) EXTRA_MOD_FLAGS += -mno-unaligned-access endif @@ -149,51 +148,9 @@ ifeq ($(WITH_LTO),true) EXTRA_MOD_FLAGS += -ffat-lto-objects endif -MOD_WORKDIR ?= $(HOME)/mod-workdir -MOD_ENVIRONMENT = \ - AR=${1}/host/usr/bin/${2}-gcc-ar \ - CC=${1}/host/usr/bin/${2}-gcc \ - CPP=${1}/host/usr/bin/${2}-cpp \ - CXX=${1}/host/usr/bin/${2}-g++ \ - LD=${1}/host/usr/bin/${2}-ld \ - PKG_CONFIG=${1}/host/usr/bin/pkg-config \ - STRIP=${1}/host/usr/bin/${2}-strip \ - CFLAGS="-I${1}/staging/usr/include $(EXTRA_MOD_FLAGS)" \ - CPPFLAGS= \ - CXXFLAGS="-I${1}/staging/usr/include $(EXTRA_MOD_FLAGS) -Wno-attributes" \ - LDFLAGS="-L${1}/staging/usr/lib $(EXTRA_MOD_FLAGS)" \ - EXE_WRAPPER="qemu-${3}-static -L ${1}/target" \ - HEADLESS=true \ - MOD_BUILD=true \ - NOOPT=true \ - STATIC_BUILD=true - -modduo: - $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm) - -modduox: - $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64) - -moddwarf: - $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64) - -publish: - tar -C bin -cz $(subst bin/,,$(wildcard bin/*.lv2)) | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install && echo - -ifneq (,$(findstring modduo-,$(MAKECMDGOALS))) -$(MAKECMDGOALS): - $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm) $(subst modduo-,,$(MAKECMDGOALS)) -endif - -ifneq (,$(findstring modduox-,$(MAKECMDGOALS))) -$(MAKECMDGOALS): - $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64) $(subst modduox-,,$(MAKECMDGOALS)) -endif - -ifneq (,$(findstring moddwarf-,$(MAKECMDGOALS))) -$(MAKECMDGOALS): - $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64) $(subst moddwarf-,,$(MAKECMDGOALS)) -endif +MOD_ENVIRONMENT += HEADLESS=true +MOD_ENVIRONMENT += MOD_BUILD=true +MOD_ENVIRONMENT += STATIC_BUILD=true # -------------------------------------------------------------- # Individual targets diff --git a/carla b/carla index 76cdd50b..9ce3534a 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 76cdd50bfa8c3e7c96bb33c239916b0e28e2ce92 +Subproject commit 9ce3534a0181d9e7dc13e2cebb99fbd5cbac15d2 diff --git a/deps/PawPaw b/deps/PawPaw index b4c1de98..4baef39a 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit b4c1de98b8ac60b95a7ced6959062e4e2a863fd6 +Subproject commit 4baef39af5709ec44ee523b49a994a922dc3c4f0 diff --git a/dpf b/dpf index 8e0eaa4d..3aa409b8 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 8e0eaa4ddd9d851da00a5f96d9c6ea6bad3c5c07 +Subproject commit 3aa409b828c1b65e9043df9a30ac781dd2c9ad74 From d881a1ddbb114fe9f68ee62c4773b63d4d3c819f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 26 Sep 2022 21:06:44 +0100 Subject: [PATCH 066/451] Fix linux-i686 build Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b64df10..9a53fa70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 34 + CACHE_VERSION: 35 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 @@ -211,7 +211,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-multilib libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: From cb179296ca0a2620e925c4ddcf55c21de1355cc1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 26 Sep 2022 23:46:21 +0100 Subject: [PATCH 067/451] Fix modduo/modduox builds Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 9ce3534a..a4be9f00 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 9ce3534a0181d9e7dc13e2cebb99fbd5cbac15d2 +Subproject commit a4be9f00bbec735b2a01d0d5b0befbe4d900daeb diff --git a/dpf b/dpf index 3aa409b8..aea021ae 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 3aa409b828c1b65e9043df9a30ac781dd2c9ad74 +Subproject commit aea021aed879d6ab8cee65b2c8b898141cc563c8 From a62f0327b9ed937d8bc426fabd27a9147726273b Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Sep 2022 22:40:30 +0100 Subject: [PATCH 068/451] Update Carla for win64 bridge fix Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index a4be9f00..7d23ab72 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit a4be9f00bbec735b2a01d0d5b0befbe4d900daeb +Subproject commit 7d23ab72be1f5fc541e919ad98c63f5ee2c9b94c From f9841bb333a5f7b013c89a326649a15749469b19 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 4 Oct 2022 01:53:13 +0100 Subject: [PATCH 069/451] Fix host time step trigger skipping pulses at exact 0 pos Signed-off-by: falkTX --- plugins/Cardinal/src/HostTime.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Cardinal/src/HostTime.cpp b/plugins/Cardinal/src/HostTime.cpp index ebb610c7..b920be43 100644 --- a/plugins/Cardinal/src/HostTime.cpp +++ b/plugins/Cardinal/src/HostTime.cpp @@ -93,12 +93,14 @@ struct HostTime : TerminalModule { { if (d_isZero(tick)) { - pulseClock.trigger(); pulseBeat.trigger(); if (timeInfo.beat == 1) pulseBar.trigger(); } + if (d_isZero(tickClock)) + pulseClock.trigger(); + if (timeInfo.reset) { timeInfo.reset = false; From e4840dfbf0fd925b05e64e6a5cfa9bbcfa662f9b Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 7 Oct 2022 15:54:56 +0100 Subject: [PATCH 070/451] Update submodules, bump version to 22.10 Signed-off-by: falkTX --- Makefile | 2 +- carla | 2 +- deps/PawPaw | 2 +- dpf | 2 +- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4d665ac5..ecec68db 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # jucewrapper/CMakeList.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.09 +VERSION = 22.10 # -------------------------------------------------------------- # Import base definitions diff --git a/carla b/carla index 7d23ab72..bf27dcad 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 7d23ab72be1f5fc541e919ad98c63f5ee2c9b94c +Subproject commit bf27dcad533978274a51b0d235b7a1b53b537c52 diff --git a/deps/PawPaw b/deps/PawPaw index 4baef39a..1fcfa969 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 4baef39af5709ec44ee523b49a994a922dc3c4f0 +Subproject commit 1fcfa969e98624dd3d98a30a0925eb1c3991e4d2 diff --git a/dpf b/dpf index aea021ae..1bdbb7d9 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit aea021aed879d6ab8cee65b2c8b898141cc563c8 +Subproject commit 1bdbb7d9e13fc6e1f25506c127efa3cd48ec91ef diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 099ff1d0..881be584 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 22.09) +project(Cardinal VERSION 22.10) add_subdirectory(JUCE) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 4329e046..2fda1153 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -57,7 +57,7 @@ # include #endif -const std::string CARDINAL_VERSION = "22.09"; +const std::string CARDINAL_VERSION = "22.10"; namespace rack { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index f72e560f..5b48ddf7 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -712,7 +712,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 22, 9); + return d_version(0, 22, 10); } int64_t getUniqueId() const override From 930a0ca31e0092dc5f35e81cbb39c3f622751c6c Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 10 Oct 2022 21:37:27 +0100 Subject: [PATCH 071/451] Ignore dynamic light/dark mode in headless builds Signed-off-by: falkTX --- include/helpers.hpp | 6 ++++++ src/custom/asset.cpp | 4 ++++ src/custom/dep.cpp | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/include/helpers.hpp b/include/helpers.hpp index 2cf4ad01..6c21c345 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -36,9 +36,11 @@ namespace rack { +#ifndef HEADLESS namespace asset { void updateForcingBlackSilverScrewMode(std::string slug); } +#endif struct CardinalPluginModelHelper : plugin::Model { virtual app::ModuleWidget* createModuleWidgetFromEngineLoad(engine::Module* m) = 0; @@ -76,7 +78,9 @@ struct CardinalPluginModel : CardinalPluginModelHelper } tm = dynamic_cast(m); } + #ifndef HEADLESS asset::updateForcingBlackSilverScrewMode(slug); + #endif app::ModuleWidget* const tmw = new TModuleWidget(tm); DISTRHO_CUSTOM_SAFE_ASSERT_RETURN(m != nullptr ? m->model->name.c_str() : "null", tmw->module == m, nullptr); tmw->setModel(this); @@ -91,7 +95,9 @@ struct CardinalPluginModel : CardinalPluginModelHelper TModule* const tm = dynamic_cast(m); DISTRHO_SAFE_ASSERT_RETURN(tm != nullptr, nullptr); + #ifndef HEADLESS asset::updateForcingBlackSilverScrewMode(slug); + #endif TModuleWidget* const tmw = new TModuleWidget(tm); DISTRHO_SAFE_ASSERT_RETURN(tmw->module == m, nullptr); tmw->setModel(this); diff --git a/src/custom/asset.cpp b/src/custom/asset.cpp index efee14aa..dcc40166 100644 --- a/src/custom/asset.cpp +++ b/src/custom/asset.cpp @@ -31,8 +31,10 @@ namespace rack { namespace asset { +#ifndef HEADLESS extern bool forceBlackScrew; extern bool forceSilverScrew; +#endif std::string userDir; // ignored std::string systemDir; // points to plugin resources dir (or installed/local Rack dir) @@ -53,10 +55,12 @@ std::string user(std::string filename) { // get system resource, trimming "res/" prefix if we are loaded as a plugin bundle std::string system(std::string filename) { + #ifndef HEADLESS /**/ if (forceBlackScrew && string::endsWith(filename, "/ScrewBlack.svg")) filename = filename.substr(0, filename.size()-15) + "/./ScrewBlack.svg"; else if (forceSilverScrew && string::endsWith(filename, "/ScrewSilver.svg")) filename = filename.substr(0, filename.size()-16) + "/./ScrewSilver.svg"; + #endif return system::join(systemDir, bundlePath.empty() ? filename : trim(filename)); } diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 13379e92..0cebcd0c 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -23,6 +23,7 @@ #include namespace rack { +#ifndef HEADLESS namespace asset { bool forceBlackScrew = false; bool forceSilverScrew = false; @@ -59,6 +60,7 @@ void updateForcingBlackSilverScrewMode(std::string slug) { ); } } +#endif namespace settings { bool darkMode = true; int rateLimit = 0; @@ -92,6 +94,7 @@ NVGcolor nvgRGBblank(const unsigned char r, const unsigned char g, const unsigne #undef nsvgParseFromFile #include +#ifndef HEADLESS enum DarkMode { kMode21kHz, kModeAaronStatic, @@ -1149,12 +1152,14 @@ bool invertPaintForLightMode(const LightMode mode, NSVGshape* const shape, NSVGp paint.color = invertColor(paint.color); return true; } +#endif // HEADLESS extern "C" { NSVGimage* nsvgParseFromFileCardinal(const char* filename, const char* units, float dpi); void nsvgDeleteCardinal(NSVGimage*); } +#ifndef HEADLESS struct ExtendedNSVGimage { NSVGimage* const handle; NSVGimage* handleOrig; @@ -1239,11 +1244,13 @@ void deleteExtendedNSVGimage(ExtendedNSVGimage& ext) ext.handleOrig = nullptr; } } +#endif // HEADLESS NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* const units, const float dpi) { if (NSVGimage* const handle = nsvgParseFromFile(filename, units, dpi)) { + #ifndef HEADLESS const size_t filenamelen = std::strlen(filename); bool hasDarkMode = false; @@ -1419,6 +1426,7 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con std::memcpy(handle, handleMOD, sizeof(NSVGimage)); } } + #endif // HEADLESS return handle; } @@ -1428,6 +1436,7 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con void nsvgDeleteCardinal(NSVGimage* const handle) { + #ifndef HEADLESS for (auto it = loadedDarkSVGs.begin(), end = loadedDarkSVGs.end(); it != end; ++it) { ExtendedNSVGimage& ext(*it); @@ -1451,12 +1460,14 @@ void nsvgDeleteCardinal(NSVGimage* const handle) loadedLightSVGs.erase(it); break; } + #endif nsvgDelete(handle); } void switchDarkMode(const bool darkMode) { + #ifndef HEADLESS if (rack::settings::darkMode == darkMode) return; @@ -1477,12 +1488,14 @@ void switchDarkMode(const bool darkMode) else if (ext.handleMOD != nullptr) std::memcpy(ext.handle, !darkMode ? ext.handleMOD : ext.handleOrig, sizeof(NSVGimage)); } + #endif } namespace rack { namespace asset { void destroy() { + #ifndef HEADLESS for (auto it = loadedDarkSVGs.begin(), end = loadedDarkSVGs.end(); it != end; ++it) { ExtendedNSVGimage& ext(*it); @@ -1497,6 +1510,7 @@ void destroy() { loadedDarkSVGs.clear(); loadedLightSVGs.clear(); + #endif } } From 5041fd7dfbfe7dd91236d46c58b8c7d7fd5f9743 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 10 Oct 2022 22:07:12 +0100 Subject: [PATCH 072/451] Tweak log welcome message, mention both cardinal and rack version Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 5b48ddf7..60ea7582 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -73,6 +73,8 @@ static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount + 2; / static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount; #endif +extern const std::string CARDINAL_VERSION; + namespace rack { namespace asset { std::string patchesPath(); @@ -253,7 +255,7 @@ struct Initializer factoryTemplatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); // Log environment - INFO("%s %s v%s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str()); + INFO("%s %s %s, compatible with Rack v%s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); INFO("%s", system::getOperatingSystemInfo().c_str()); INFO("Binary filename: %s", getBinaryFilename()); INFO("Bundle path: %s", plugin->getBundlePath()); From 4704c8a69ddba084cbdd47a3caccf59388aa65e6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 10 Oct 2022 23:57:12 +0100 Subject: [PATCH 073/451] Update carla for headless build fix Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index bf27dcad..e354cefa 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit bf27dcad533978274a51b0d235b7a1b53b537c52 +Subproject commit e354cefa151c696886307073be00e41ced4ba680 From 896c1ab73200f6e6a80302396a40b12320bc917b Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 11 Oct 2022 15:38:26 +0100 Subject: [PATCH 074/451] Fix wasm build Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index e354cefa..bf501c8c 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit e354cefa151c696886307073be00e41ced4ba680 +Subproject commit bf501c8ce7c95b616771ef04ecf24cad6cdf81cd From 3a9b6623c52f57f2819acd1b7e251f914210b8be Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 12 Oct 2022 17:42:41 +0100 Subject: [PATCH 075/451] Allow Ildaeil to load arbitrary files/binaries as plugins Signed-off-by: falkTX --- carla | 2 +- plugins/Cardinal/src/Ildaeil.cpp | 67 +++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/carla b/carla index bf501c8c..bae7149b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit bf501c8ce7c95b616771ef04ecf24cad6cdf81cd +Subproject commit bae7149b0d9145b23d98be625b9ed98342783e29 diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 919b863d..7cc21926 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -705,7 +705,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { bool fPluginSearchFirstShow = false; char fPluginSearchString[0xff] = {}; - String fPopupError; + String fPopupError, fPluginFilename; bool idleCallbackActive = false; IldaeilModule* const module; @@ -964,6 +964,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { fPluginRunning = true; fPluginGenericUI = nullptr; + fPluginFilename.clear(); createOrUpdatePluginGenericUI(handle); } else @@ -976,6 +977,36 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { setDirty(true); } + void loadFileAsPlugin(const CarlaHostHandle handle, const char* const filename) + { + if (fPluginRunning) + { + carla_show_custom_ui(handle, 0, false); + carla_replace_plugin(handle, 0); + } + + carla_set_engine_option(handle, ENGINE_OPTION_PREFER_PLUGIN_BRIDGES, fPluginWillRunInBridgeMode, nullptr); + + const MutexLocker cml(sPluginInfoLoadMutex); + + if (carla_load_file(handle, filename)) + { + fPluginRunning = true; + fPluginGenericUI = nullptr; + fPluginFilename = filename; + createOrUpdatePluginGenericUI(handle); + } + else + { + fPopupError = carla_get_last_error(handle); + d_stdout("got error: %s", fPopupError.buffer()); + fPluginFilename.clear(); + fDrawingState = kDrawingPluginError; + } + + setDirty(true); + } + void onContextCreate(const ContextCreateEvent& e) override { ImGuiWidget::onContextCreate(e); @@ -1087,7 +1118,10 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { case kIdleResetPlugin: fIdleState = kIdleNothing; - loadPlugin(handle, carla_get_plugin_info(handle, 0)->label); + if (fPluginFilename.isNotEmpty()) + loadFileAsPlugin(handle, fPluginFilename.buffer()); + else + loadPlugin(handle, carla_get_plugin_info(handle, 0)->label); break; case kIdleOpenFileUI: @@ -1112,10 +1146,27 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { case kIdleChangePluginType: fIdleState = kIdleNothing; - fPluginSelected = -1; - stopRunner(); - fPluginType = fNextPluginType; - initAndStartRunner(); + if (fNextPluginType == PLUGIN_TYPE_COUNT) + { + if (fPluginRunning) + carla_show_custom_ui(handle, 0, false); + + async_dialog_filebrowser(false, nullptr, nullptr, "Load from file", [this](char* path) + { + if (path == nullptr) + return; + + loadFileAsPlugin(module->fCarlaHostHandle, path); + std::free(path); + }); + } + else + { + fPluginSelected = -1; + stopRunner(); + fPluginType = fNextPluginType; + initAndStartRunner(); + } break; case kIdleNothing: @@ -1490,6 +1541,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { getPluginTypeAsString(PLUGIN_INTERNAL), getPluginTypeAsString(PLUGIN_LV2), getPluginTypeAsString(PLUGIN_JSFX), + "Load from file..." }; setupMainWindowPos(); @@ -1560,6 +1612,9 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { case 2: fNextPluginType = PLUGIN_JSFX; break; + case 3: + fNextPluginType = PLUGIN_TYPE_COUNT; + break; } } From cdb8bdcdee1931dd18b80a127da1e638319c5dd5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 18:20:35 +0100 Subject: [PATCH 076/451] Update carla and dpf submodules Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index bae7149b..b9b53827 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit bae7149b0d9145b23d98be625b9ed98342783e29 +Subproject commit b9b53827ad2bf3a76a2e16178a6f784a49544e84 diff --git a/dpf b/dpf index 1bdbb7d9..48eb4501 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 1bdbb7d9e13fc6e1f25506c127efa3cd48ec91ef +Subproject commit 48eb45016b67547b02d2ac644cd2a147da7cf7b9 From 96a810ce9a06b9e7bddee419db840fc34c9d9b88 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 18:21:00 +0100 Subject: [PATCH 077/451] Remove superfulous modules in falkTX_-_Divide-no-Conquer.vcv Signed-off-by: falkTX --- .../examples/falkTX_-_Divide-no-Conquer.vcv | 190 +----------------- 1 file changed, 2 insertions(+), 188 deletions(-) diff --git a/patches/examples/falkTX_-_Divide-no-Conquer.vcv b/patches/examples/falkTX_-_Divide-no-Conquer.vcv index aadf5d4a..ee66da90 100644 --- a/patches/examples/falkTX_-_Divide-no-Conquer.vcv +++ b/patches/examples/falkTX_-_Divide-no-Conquer.vcv @@ -2,192 +2,6 @@ "version": "2.1.2", "zoom": 1.0, "modules": [ - { - "id": 845369410352407, - "plugin": "Befaco", - "model": "NoisePlethora", - "version": "2.0", - "params": [ - { - "value": 0.5, - "id": 0 - }, - { - "value": 0.5, - "id": 1 - }, - { - "value": 1.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.5, - "id": 7 - }, - { - "value": 0.5, - "id": 8 - }, - { - "value": 1.0, - "id": 9 - }, - { - "value": 0.0, - "id": 10 - }, - { - "value": 0.0, - "id": 11 - }, - { - "value": 0.0, - "id": 12 - }, - { - "value": 0.0, - "id": 13 - }, - { - "value": 0.0, - "id": 14 - }, - { - "value": 1.0, - "id": 15 - }, - { - "value": 0.0, - "id": 16 - }, - { - "value": 0.0, - "id": 17 - }, - { - "value": 0.0, - "id": 18 - } - ], - "rightModuleId": 2572531694505243, - "data": { - "algorithmA": "radioOhNo", - "algorithmB": "radioOhNo", - "bypassFilters": false, - "blockDC": true - }, - "pos": [ - 108, - 0 - ] - }, - { - "id": 2572531694505243, - "plugin": "Befaco", - "model": "EvenVCO", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - } - ], - "leftModuleId": 845369410352407, - "pos": [ - 122, - 0 - ] - }, - { - "id": 1138348734715247, - "plugin": "FehlerFabrik-Suite", - "model": "PSIOP", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.5, - "id": 7 - }, - { - "value": 0.5, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - }, - { - "value": 0.0, - "id": 10 - }, - { - "value": 0.0, - "id": 11 - }, - { - "value": 0.0, - "id": 12 - } - ], - "data": { - "DC Blocking": true, - "Speed Looping": false, - "FM Index Modulation": false, - "Operator Resyncing": false - }, - "pos": [ - 111, - -1 - ] - }, { "id": 2323510085504344, "plugin": "Mog", @@ -294,11 +108,11 @@ -2, -1, -1, - 2, + -1, -2, 0, -2, - 0 + -1 ] }, "pos": [ From 7fa434c13eca0f3a07b181dbc6b57bec287e6df0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 18:23:27 +0100 Subject: [PATCH 078/451] Reenable LTO in preparation for release Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a53fa70..d997c707 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 35 + CACHE_VERSION: 36 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'false' + WITH_LTO: 'true' jobs: linux-arm64: From 82f6798b4408127540afbc88388c5299078424c8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 21:48:12 +0100 Subject: [PATCH 079/451] Fix headless build Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index b9b53827..dc9b58b4 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit b9b53827ad2bf3a76a2e16178a6f784a49544e84 +Subproject commit dc9b58b4cb148f5f38654defe19b1fe2556acc21 From aa51bf421e240e93842bb77c74dab8f218f2ae12 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 23:53:25 +0100 Subject: [PATCH 080/451] Turn off LTO again after release Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d997c707..9a53fa70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 36 + CACHE_VERSION: 35 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'true' + WITH_LTO: 'false' jobs: linux-arm64: From 373ff58766f1f72e60284b260b241a08f7eb2249 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 15 Oct 2022 00:53:35 +0100 Subject: [PATCH 081/451] Install clap plugins during "make install" step Signed-off-by: falkTX --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index ecec68db..c25898a7 100644 --- a/Makefile +++ b/Makefile @@ -269,6 +269,7 @@ install: install -d $(DESTDIR)$(PREFIX)/lib/lv2/Cardinal.lv2 install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2 install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2 + install -d $(DESTDIR)$(PREFIX)/lib/clap/Cardinal.clap install -d $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst ifeq ($(VST3_SUPPORTED),true) install -d $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/Contents @@ -282,6 +283,7 @@ endif install -m 644 bin/CardinalFX.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2/ install -m 644 bin/CardinalSynth.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2/ + install -m 644 bin/Cardinal.clap/*.* $(DESTDIR)$(PREFIX)/lib/clap/Cardinal.clap/ install -m 644 bin/Cardinal.vst/*.* $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst/ ifeq ($(VST3_SUPPORTED),true) From 08afedf82efeab3060fdaa9a3154d19eacba73f1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 17 Oct 2022 18:10:02 +0100 Subject: [PATCH 082/451] Update Meander Signed-off-by: falkTX --- plugins/Meander | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Meander b/plugins/Meander index c0958247..2321ec5f 160000 --- a/plugins/Meander +++ b/plugins/Meander @@ -1 +1 @@ -Subproject commit c095824708947630d9db6a6b7afcd51bdaa0a009 +Subproject commit 2321ec5f15f3471984d7606c67982b3440b0cf0b From 482ae564a0cf5352f80ea0f305b531c2abea125b Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 17 Oct 2022 18:10:09 +0100 Subject: [PATCH 083/451] Update DPF, fixes CLAP plugin under Anklang Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 48eb4501..ac3f5bce 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 48eb45016b67547b02d2ac644cd2a147da7cf7b9 +Subproject commit ac3f5bce433a5ffbc083d3c62d30eefec8ffd1ec From 36d49e747102c8bb860d6fe98663309b9d3ba98a Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 17 Oct 2022 18:36:15 +0100 Subject: [PATCH 084/451] Cleanup lv2export, split definitions into common file Signed-off-by: falkTX --- lv2export/export.cpp | 20 +------- lv2export/lv2plugin.cpp | 31 ++---------- lv2export/lv2plugin.hpp | 47 +++++++++++++++++++ .../plugins/aubileinstruments-macro-osc-2.cpp | 4 +- .../plugins/aubileinstruments-macro-osc.cpp | 4 +- lv2export/plugins/msm-phaser.cpp | 4 +- lv2export/plugins/rackwindows-mv.cpp | 4 +- lv2export/plugins/rackwindows-vibrato.cpp | 4 +- lv2export/plugins/valleyaudio-plateau.cpp | 4 +- 9 files changed, 64 insertions(+), 58 deletions(-) create mode 100644 lv2export/lv2plugin.hpp diff --git a/lv2export/export.cpp b/lv2export/export.cpp index c058ea9c..41fa1794 100644 --- a/lv2export/export.cpp +++ b/lv2export/export.cpp @@ -15,25 +15,7 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ -#ifndef PLUGIN_BRAND -# error PLUGIN_BRAND undefined -#endif - -#ifndef PLUGIN_LABEL -# error PLUGIN_LABEL undefined -#endif - -#ifndef PLUGIN_MODEL -# error PLUGIN_MODEL undefined -#endif - -#ifndef PLUGIN_CV_INPUTS -# error PLUGIN_CV_INPUTS undefined -#endif - -#ifndef PLUGIN_CV_OUTPUTS -# error PLUGIN_CV_OUTPUTS undefined -#endif +#include "lv2plugin.hpp" #include diff --git a/lv2export/lv2plugin.cpp b/lv2export/lv2plugin.cpp index e15e4b64..e2e2d524 100644 --- a/lv2export/lv2plugin.cpp +++ b/lv2export/lv2plugin.cpp @@ -15,26 +15,7 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ -#ifndef PLUGIN_MODEL -# error PLUGIN_MODEL undefined -#endif - -#ifndef PLUGIN_CV_INPUTS -# error PLUGIN_CV_INPUTS undefined -#endif - -#ifndef PLUGIN_CV_OUTPUTS -# error PLUGIN_CV_OUTPUTS undefined -#endif - -enum PortType { - Audio = 0, - Bi = 1, - Uni = 2, -}; - -static constexpr const int kCvInputs[] = PLUGIN_CV_INPUTS; -static constexpr const int kCvOutputs[] = PLUGIN_CV_OUTPUTS; +#include "lv2plugin.hpp" #include "src/lv2/buf-size.h" #include "src/lv2/options.h" @@ -185,21 +166,19 @@ static LV2_Handle lv2_instantiate(const LV2_Descriptor*, double sampleRate, cons // ----------------------------------------------------------------------- -#define instancePtr ((PluginLv2*)instance) - static void lv2_connect_port(LV2_Handle instance, uint32_t port, void* dataLocation) { - instancePtr->lv2_connect_port(port, dataLocation); + static_cast(instance)->lv2_connect_port(port, dataLocation); } static void lv2_run(LV2_Handle instance, uint32_t sampleCount) { - instancePtr->lv2_run(sampleCount); + static_cast(instance)->lv2_run(sampleCount); } static void lv2_cleanup(LV2_Handle instance) { - delete instancePtr; + delete static_cast(instance); } // ----------------------------------------------------------------------- @@ -209,8 +188,6 @@ static const void* lv2_extension_data(const char* uri) return nullptr; } -#undef instancePtr - // ----------------------------------------------------------------------- static const LV2_Descriptor sLv2Descriptor = { diff --git a/lv2export/lv2plugin.hpp b/lv2export/lv2plugin.hpp new file mode 100644 index 00000000..25fc44df --- /dev/null +++ b/lv2export/lv2plugin.hpp @@ -0,0 +1,47 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#pragma once + +#ifndef PLUGIN_BRAND +# error PLUGIN_BRAND undefined +#endif + +#ifndef PLUGIN_LABEL +# error PLUGIN_LABEL undefined +#endif + +#ifndef PLUGIN_MODEL +# error PLUGIN_MODEL undefined +#endif + +#ifndef PLUGIN_CV_INPUTS +# error PLUGIN_CV_INPUTS undefined +#endif + +#ifndef PLUGIN_CV_OUTPUTS +# error PLUGIN_CV_OUTPUTS undefined +#endif + +enum PortType { + Audio = 0, + Bi = 1, + Uni = 2, +}; + +static constexpr const PortType kCvInputs[] = PLUGIN_CV_INPUTS; +static constexpr const PortType kCvOutputs[] = PLUGIN_CV_OUTPUTS; diff --git a/lv2export/plugins/aubileinstruments-macro-osc-2.cpp b/lv2export/plugins/aubileinstruments-macro-osc-2.cpp index 5e6d73ea..d6afeb74 100644 --- a/lv2export/plugins/aubileinstruments-macro-osc-2.cpp +++ b/lv2export/plugins/aubileinstruments-macro-osc-2.cpp @@ -55,8 +55,8 @@ #define PLUGIN_BRAND "AudibleInstruments" #define PLUGIN_LABEL "Macro Osc 2" #define PLUGIN_MODEL modelPlaits -#define PLUGIN_CV_INPUTS {1,1,1,1,1,1,1,1} -#define PLUGIN_CV_OUTPUTS {0,0} +#define PLUGIN_CV_INPUTS {Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi} +#define PLUGIN_CV_OUTPUTS {Audio,Audio} #define PLUGIN_LV2_CATEGORY "lv2:GeneratorPlugin" #include "lv2plugin.cpp" diff --git a/lv2export/plugins/aubileinstruments-macro-osc.cpp b/lv2export/plugins/aubileinstruments-macro-osc.cpp index ed913e04..e196b267 100644 --- a/lv2export/plugins/aubileinstruments-macro-osc.cpp +++ b/lv2export/plugins/aubileinstruments-macro-osc.cpp @@ -35,8 +35,8 @@ #define PLUGIN_BRAND "AudibleInstruments" #define PLUGIN_LABEL "Macro Osc" #define PLUGIN_MODEL modelBraids -#define PLUGIN_CV_INPUTS {1,1,1,1,1} -#define PLUGIN_CV_OUTPUTS {0} +#define PLUGIN_CV_INPUTS {Bi,Bi,Bi,Bi,Bi} +#define PLUGIN_CV_OUTPUTS {Audio} #define PLUGIN_LV2_CATEGORY "lv2:GeneratorPlugin" #include "lv2plugin.cpp" diff --git a/lv2export/plugins/msm-phaser.cpp b/lv2export/plugins/msm-phaser.cpp index 8e93f863..08287a9b 100644 --- a/lv2export/plugins/msm-phaser.cpp +++ b/lv2export/plugins/msm-phaser.cpp @@ -20,8 +20,8 @@ #define PLUGIN_BRAND "MSM" #define PLUGIN_LABEL "Phaser" #define PLUGIN_MODEL modelPhaserModule -#define PLUGIN_CV_INPUTS {1,1,1,0} -#define PLUGIN_CV_OUTPUTS {0} +#define PLUGIN_CV_INPUTS {Bi,Bi,Bi,Audio} +#define PLUGIN_CV_OUTPUTS {Audio} #define PLUGIN_LV2_CATEGORY "lv2:DistortionPlugin" #include "lv2plugin.cpp" diff --git a/lv2export/plugins/rackwindows-mv.cpp b/lv2export/plugins/rackwindows-mv.cpp index a7991cef..85401301 100644 --- a/lv2export/plugins/rackwindows-mv.cpp +++ b/lv2export/plugins/rackwindows-mv.cpp @@ -20,8 +20,8 @@ #define PLUGIN_BRAND "Rackwindows" #define PLUGIN_LABEL "MV" #define PLUGIN_MODEL modelMv -#define PLUGIN_CV_INPUTS {1,1,1,1,0,0} -#define PLUGIN_CV_OUTPUTS {0,0} +#define PLUGIN_CV_INPUTS {Bi,Bi,Bi,Bi,Audio,Audio} +#define PLUGIN_CV_OUTPUTS {Audio,Audio} #define PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin" #include "lv2plugin.cpp" diff --git a/lv2export/plugins/rackwindows-vibrato.cpp b/lv2export/plugins/rackwindows-vibrato.cpp index a4bdd9ee..96d88a38 100644 --- a/lv2export/plugins/rackwindows-vibrato.cpp +++ b/lv2export/plugins/rackwindows-vibrato.cpp @@ -20,8 +20,8 @@ #define PLUGIN_BRAND "Rackwindows" #define PLUGIN_LABEL "Vibrato" #define PLUGIN_MODEL modelVibrato -#define PLUGIN_CV_INPUTS {1,1,1,1,1,0} -#define PLUGIN_CV_OUTPUTS {1,0,1} +#define PLUGIN_CV_INPUTS {Bi,Bi,Bi,Bi,Bi,Audio} +#define PLUGIN_CV_OUTPUTS {Bi,Audio,Bi} #define PLUGIN_LV2_CATEGORY "lv2:DynamicsPlugin" #include "lv2plugin.cpp" diff --git a/lv2export/plugins/valleyaudio-plateau.cpp b/lv2export/plugins/valleyaudio-plateau.cpp index 9f4cc03d..554bc963 100644 --- a/lv2export/plugins/valleyaudio-plateau.cpp +++ b/lv2export/plugins/valleyaudio-plateau.cpp @@ -23,8 +23,8 @@ #define PLUGIN_BRAND "Valley Audio" #define PLUGIN_LABEL "Plateau" #define PLUGIN_MODEL modelPlateau -#define PLUGIN_CV_INPUTS {0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} -#define PLUGIN_CV_OUTPUTS {0,0} +#define PLUGIN_CV_INPUTS {Audio,Audio,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi,Bi} +#define PLUGIN_CV_OUTPUTS {Audio,Audio} #define PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin" #include "lv2plugin.cpp" From 83045e57cb06e70ed24099191e08f23f42374ef3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Oct 2022 03:09:37 +0100 Subject: [PATCH 085/451] Implement CLAP multi-IO, enable main variant for it Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- plugins/Makefile | 12 +++++++++++- src/Makefile.cardinal.mk | 10 +++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/carla b/carla index dc9b58b4..b27f20cc 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit dc9b58b4cb148f5f38654defe19b1fe2556acc21 +Subproject commit b27f20cc303369d71d3e548567593afce925433c diff --git a/dpf b/dpf index ac3f5bce..57fcfcaf 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit ac3f5bce433a5ffbc083d3c62d30eefec8ffd1ec +Subproject commit 57fcfcaf07f8dced0f643aff46bd0d3bb1b0b476 diff --git a/plugins/Makefile b/plugins/Makefile index b80bc7ab..69919a4b 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1252,8 +1252,10 @@ 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 = $(PLUGIN_LIST:%=../bin/Cardinal.clap/Contents/Resources/PluginManifests/%.json) +CLAP_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalFX.clap/Contents/Resources/PluginManifests/%.json) CLAP_RESOURCES += $(PLUGIN_LIST:%=../bin/CardinalSynth.clap/Contents/Resources/PluginManifests/%.json) +CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/Cardinal.clap/Contents/Resources/%) CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalFX.clap/Contents/Resources/%) CLAP_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalSynth.clap/Contents/Resources/%) else @@ -1353,6 +1355,10 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/Cardinal.clap/Contents/Resources/%: % + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + ../bin/CardinalFX.clap/Contents/Resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -1361,6 +1367,10 @@ ifeq ($(MACOS),true) -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/Cardinal.clap/Contents/Resources/PluginManifests/%.json: %/plugin.json + -@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 $<) $@ diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 40d3351f..938a3ae5 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -157,6 +157,12 @@ CORE_RESOURCES += $(subst ../Rack/res/,,$(wildcard ../Rack/res/ComponentLibrary/ LV2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).lv2/resources/%) VST3_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%) +ifeq ($(MACOS),true) +CLAP_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).clap/Contents/Resources/%) +else +CLAP_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.clap/resources/%) +endif + # Install modgui resources if MOD build ifeq ($(MOD_BUILD),true) LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/Plateau_Reverb.ttl @@ -169,10 +175,8 @@ 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 @@ -357,7 +361,7 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' # Enable all possible plugin types and setup resources ifeq ($(CARDINAL_VARIANT),main) -TARGETS = lv2 vst3 +TARGETS = lv2 vst3 clap ifeq ($(HAVE_JACK),true) TARGETS += jack endif From 3c17602a105b486d85bc19ccd6c2c27078bfac29 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Oct 2022 03:22:51 +0100 Subject: [PATCH 086/451] Dont try to build carla frontend by default Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index b27f20cc..0132f1ae 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit b27f20cc303369d71d3e548567593afce925433c +Subproject commit 0132f1ae47f7890974e458f9fb6314b9a63cd105 From 7f9c2379f896cf0203ab5c82984d61693eabcc76 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 24 Oct 2022 21:47:59 +0100 Subject: [PATCH 087/451] Mark LV2 CV ports as optional, so main variant loads in Ardour Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- src/CardinalPlugin.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/carla b/carla index 0132f1ae..3c10dcee 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 0132f1ae47f7890974e458f9fb6314b9a63cd105 +Subproject commit 3c10dcee953fb2af12eebac5578bc64f266ee0ec diff --git a/dpf b/dpf index 57fcfcaf..87e9b0f8 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 57fcfcaf07f8dced0f643aff46bd0d3bb1b0b476 +Subproject commit 87e9b0f8441229815c1cc8b0eb518ae760f9bf47 diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 60ea7582..8aabd0c4 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -742,7 +742,7 @@ class CardinalPlugin : public CardinalBasePlugin } else { - port.hints = kAudioPortIsCV | kCVPortHasPositiveUnipolarRange | kCVPortHasScaledRange; + port.hints = kAudioPortIsCV | kCVPortHasPositiveUnipolarRange | kCVPortHasScaledRange | kCVPortIsOptional; index -= 8; } #elif CARDINAL_VARIANT_FX || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_SYNTH From c368317009567ca4c1d1d50081524632605011ce Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 28 Oct 2022 15:46:54 +0100 Subject: [PATCH 088/451] Update CI stuff for GH actions v3 Signed-off-by: falkTX --- .github/workflows/build.yml | 100 ++++++++++++++++++------------------ Makefile | 2 + 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a53fa70..b787533e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,12 @@ jobs: linux-arm64: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -81,7 +81,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -99,12 +99,12 @@ jobs: linux-armhf: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -165,7 +165,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -183,12 +183,12 @@ jobs: linux-i686: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -245,7 +245,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -263,12 +263,12 @@ jobs: linux-riscv64: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -330,7 +330,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -348,12 +348,12 @@ jobs: linux-x86_64: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -402,7 +402,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -420,7 +420,7 @@ jobs: linux-x86_64-debug: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up dependencies @@ -442,7 +442,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -451,7 +451,7 @@ jobs: linux-x86_64-headless: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up dependencies @@ -467,7 +467,7 @@ jobs: linux-x86_64-sysdeps: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up dependencies @@ -482,12 +482,12 @@ jobs: macos-intel: runs-on: macos-11 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -553,7 +553,7 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' run: | mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -571,12 +571,12 @@ jobs: macos-universal: runs-on: macos-11 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -641,7 +641,7 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' run: | mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -659,11 +659,11 @@ jobs: modduo: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: mpb-cache with: path: | @@ -689,7 +689,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -698,11 +698,11 @@ jobs: modduox: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: mpb-cache with: path: | @@ -728,7 +728,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -737,11 +737,11 @@ jobs: moddwarf: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: mpb-cache with: path: | @@ -767,7 +767,7 @@ jobs: - name: Pack binaries run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -776,12 +776,12 @@ jobs: wasm: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -823,7 +823,7 @@ jobs: - name: Pack binaries run: | cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -841,12 +841,12 @@ jobs: wasm-mini: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/emsdk @@ -890,7 +890,7 @@ jobs: - name: Pack binaries run: | cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -908,12 +908,12 @@ jobs: win32: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -982,7 +982,7 @@ jobs: zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip LICENSE README.md docs/*.* - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -1002,12 +1002,12 @@ jobs: win64: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/PawPawBuilds @@ -1076,7 +1076,7 @@ jobs: zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip LICENSE README.md docs/*.* - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -1096,7 +1096,7 @@ jobs: source-tarball: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up dependencies @@ -1118,7 +1118,7 @@ jobs: - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} path: | @@ -1140,12 +1140,12 @@ jobs: plugin-validation: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | src/Rack/dep/bin diff --git a/Makefile b/Makefile index c25898a7..e15db123 100644 --- a/Makefile +++ b/Makefile @@ -172,6 +172,7 @@ ifneq ($(STATIC_BUILD),true) $(MAKE) all -C carla $(CARLA_EXTRA_ARGS) \ CAN_GENERATE_LV2_TTL=false \ CUSTOM_DPF_PATH=$(CURDIR)/dpf \ + HAVE_FRONTEND=true \ HAVE_PYQT=true \ HAVE_QT5=true \ HAVE_QT5PKG=true \ @@ -181,6 +182,7 @@ ifeq ($(CPU_X86_64),true) $(MAKE) win32r -C carla $(CARLA_EXTRA_ARGS) \ CAN_GENERATE_LV2_TTL=false \ CUSTOM_DPF_PATH=$(CURDIR)/dpf \ + HAVE_FRONTEND=true \ HAVE_PYQT=true \ HAVE_QT5=true \ HAVE_QT5PKG=true \ From 014e3bc197c7819f7981eb3c17ef38d5dc8ca53f Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 08:39:30 +0000 Subject: [PATCH 089/451] Fix VST3 multi IO Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 87e9b0f8..36f018da 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 87e9b0f8441229815c1cc8b0eb518ae760f9bf47 +Subproject commit 36f018dacdcb96a7e858f2c078e6b876b1921119 From da4371bfa42c3a107a7b666686df9405b2030e19 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 11:19:12 +0000 Subject: [PATCH 090/451] Update Meander Signed-off-by: falkTX --- plugins/Meander | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Meander b/plugins/Meander index 2321ec5f..b3686597 160000 --- a/plugins/Meander +++ b/plugins/Meander @@ -1 +1 @@ -Subproject commit 2321ec5f15f3471984d7606c67982b3440b0cf0b +Subproject commit b36865978358ffdbeb80ad603c4c54f5a535107a From 29530caafb203b91ac27723d9a617ef6b6964b94 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 11:58:50 +0000 Subject: [PATCH 091/451] Fix windows builds against latest Carla Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- utils/inno/win32.iss | 1 + utils/inno/win64.iss | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 3c10dcee..aa400535 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 3c10dcee953fb2af12eebac5578bc64f266ee0ec +Subproject commit aa400535b31c67f4b6c1b28e6e20e4d4f82111a3 diff --git a/dpf b/dpf index 36f018da..157028c6 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 36f018dacdcb96a7e858f2c078e6b876b1921119 +Subproject commit 157028c644e7782db0d2849faec3101ea3ffb7f9 diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index e1b22947..f5d992f8 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -36,6 +36,7 @@ Source: "..\..\utils\distrho.ico"; DestDir: "{app}"; Components: resources; Flag ; carla Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\libcarla_frontend.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf32}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf32}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss index d519ca84..8370de8c 100644 --- a/utils/inno/win64.iss +++ b/utils/inno/win64.iss @@ -38,6 +38,7 @@ Source: "..\..\utils\distrho.ico"; DestDir: "{app}"; Components: resources; Flag Source: "..\..\carla\bin\carla-bridge-*.*"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\bin\carla-discovery-*.exe"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\bin\libcarla_utils.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; +Source: "..\..\carla\bin\libcarla_frontend.dll"; DestDir: "{commoncf64}\Cardinal\Carla"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\libpython3.8.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\Qt5*.dll"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; Source: "..\..\carla\build\Carla\resources\*.*"; DestDir: "{commoncf64}\Cardinal\Carla\resources"; Components: carla; Flags: ignoreversion; From 5025afcb502f299074c520c8f0e8eb1eab70fffa Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 13:00:32 +0000 Subject: [PATCH 092/451] Stop using set-output on CI actions Signed-off-by: falkTX --- .github/workflows/build.yml | 186 ++++++++++++------------------------ .github/workflows/irc.yml | 5 +- dpf | 2 +- 3 files changed, 66 insertions(+), 127 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b787533e..4c2d48cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,21 +69,16 @@ jobs: make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -153,21 +148,16 @@ jobs: make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -233,21 +223,16 @@ jobs: make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -318,21 +303,16 @@ jobs: make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -390,21 +370,16 @@ jobs: make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -438,13 +413,13 @@ jobs: make DEBUG=true HAVE_PULSEAUDIO=false -j 1 - name: Set sha8 id: slug - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz @@ -540,22 +515,17 @@ jobs: ./utils/create-macos-installer.sh - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Rename macOS bundle if: steps.cache.outputs.cache-hit == 'true' run: | - mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg + mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || env.SHA8 }}.pkg - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || env.SHA8 }} path: | ${{ github.event.repository.name }}-*.pkg - uses: softprops/action-gh-release@v1 @@ -628,22 +598,17 @@ jobs: ./utils/create-macos-installer.sh - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Rename macOS bundle if: steps.cache.outputs.cache-hit == 'true' run: | - mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg + mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }}.pkg - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }} path: | ${{ github.event.repository.name }}-*.pkg - uses: softprops/action-gh-release@v1 @@ -685,13 +650,13 @@ jobs: make modduo HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} MODDUO=true -j $(nproc) - name: Set sha8 id: slug - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz @@ -724,13 +689,13 @@ jobs: make modduox HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz @@ -763,13 +728,13 @@ jobs: make moddwarf HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2) + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz @@ -811,21 +776,16 @@ jobs: make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc) - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }} path: | *.zip - uses: softprops/action-gh-release@v1 @@ -878,21 +838,16 @@ jobs: make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls *.html *.data *.js *.wasm) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }} path: | *.zip - uses: softprops/action-gh-release@v1 @@ -953,7 +908,7 @@ jobs: pushd deps/PawPaw; source local.env win32; popd make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - - name: Build win64 cross-compiled (carla) + - name: Build win32 cross-compiled (carla) run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" @@ -961,30 +916,25 @@ jobs: make carla-win32 -j $(nproc) make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - - name: Build win64 cross-compiled (packaging) + - name: Build win32 cross-compiled (packaging) run: | pushd deps/PawPaw; source local.env win32; popd xvfb-run ./utils/create-windows-installer.sh 32 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | pushd bin - zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd - zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip LICENSE README.md docs/*.* + zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }} path: | *.exe *.zip @@ -1061,24 +1011,19 @@ jobs: xvfb-run ./utils/create-windows-installer.sh 64 - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | pushd bin - zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd - zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip LICENSE README.md docs/*.* + zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }} path: | *.exe *.zip @@ -1109,18 +1054,13 @@ jobs: make HEADLESS=true tarball+deps - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true - id: slug1 - run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') - id: slug2 - run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})" - - name: Set sha8 - id: slug - run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})" + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} + name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || env.SHA8 }} path: | /home/runner/cardinal*.tar.xz /home/runner/*/cardinal*.tar.xz diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml index 73aa4584..7f103ee7 100644 --- a/.github/workflows/irc.yml +++ b/.github/workflows/irc.yml @@ -10,11 +10,10 @@ jobs: - name: Format message id: message run: | - message="${{ github.actor }} pushed $(echo '${{ github.event.commits[0].message }}' | head -n 1 | tr -d "'") ${{ github.event.commits[0].url }}" - echo ::set-output name=message::"${message}" + echo "message=$(echo ${{ github.actor }} pushed $(echo ${{ github.event.commits[0].message }} | head -n 1 | tr -d "'") ${{ github.event.commits[0].url }}" >> $GITHUB_ENV - name: IRC notification uses: Gottox/irc-message-action@v2 with: channel: '#cardinal' nickname: github-event-bot - message: ${{ steps.message.outputs.message }} + message: ${{ env.message }} diff --git a/dpf b/dpf index 157028c6..85cd6c40 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 157028c644e7782db0d2849faec3101ea3ffb7f9 +Subproject commit 85cd6c40df9b80db20c54c5e558ba3eccf34aef9 From 1dbc70d626781e491d1cc9e83f58fb4bec311726 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 13:56:07 +0000 Subject: [PATCH 093/451] Add RebelTech modules Signed-off-by: falkTX --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/Makefile | 17 ++++++++++++++++- plugins/RebelTech | 1 + plugins/plugins.cpp | 36 ++++++++++++++++++++++++++++++++++-- 6 files changed, 57 insertions(+), 3 deletions(-) create mode 160000 plugins/RebelTech diff --git a/.gitmodules b/.gitmodules index 5057d404..4be9d876 100644 --- a/.gitmodules +++ b/.gitmodules @@ -221,3 +221,6 @@ [submodule "include/simde"] path = include/simde url = https://github.com/simd-everywhere/simde.git +[submodule "plugins/RebelTech"] + path = plugins/RebelTech + url = https://github.com/hemmer/rebel-tech-vcv.git diff --git a/README.md b/README.md index 21430add..1606cc7d 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ At the moment the following 3rd-party modules are provided: - PinkTrombone - Prism - rackwindows +- RebelTech - repelzen - Sonus Modular - stocaudio diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 898afb5b..fda67aa2 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -72,6 +72,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Prism | BSD-3-Clause | | | Rackwindows | MIT | | | repelzen | GPL-3.0-or-later | | +| RebelTech | GPL-2.0-or-later | | | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | | unless_modules | GPL-3.0-or-later | | @@ -208,6 +209,7 @@ Below is a list of artwork licenses from plugins | Prism/RobotoCondensed-Regular.ttf | Apache-2.0 | | | Rackwindows/* | MIT | [Same license as source code](https://github.com/n0jo/rackwindows/issues/15) | | repelzen/* | CC-BY-SA-4.0 | | +| RebelTech/* | CC-BY-NC-4.0 | | | sonusmodular/* | GPL-3.0-or-later | [Same license as source code](https://gitlab.com/sonusdept/sonusmodular/-/issues/14) | | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | | unless_modules/* | CC-BY-NC-ND-4.0 | | diff --git a/plugins/Makefile b/plugins/Makefile index 69919a4b..c37314e5 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -875,6 +875,14 @@ PRISM_CUSTOM = bogaudio Scale PLUGIN_FILES += $(filter-out rackwindows/src/plugin.cpp,$(wildcard rackwindows/src/*.cpp)) +# -------------------------------------------------------------- +# RebelTech + +PLUGIN_FILES += $(filter-out RebelTech/src/plugin.cpp,$(wildcard RebelTech/src/*.cpp)) + +# modules/types which are present in other plugins +REBELTECH_CUSTOM = BefacoInputPort BefacoOutputPort + # -------------------------------------------------------------- # repelzen @@ -1176,8 +1184,8 @@ RESOURCE_FILES = \ $(wildcard Cardinal/res/*.svg) \ $(wildcard Fundamental/res/*.svg) \ $(wildcard Fundamental/res/components/*.svg) \ - $(wildcard ZamAudio/res/*.svg) \ Fundamental/presets +# $(wildcard ZamAudio/res/*.svg) else PLUGIN_LIST = $(subst /plugin.json,,$(wildcard */plugin.json)) @@ -1982,6 +1990,13 @@ $(BUILD_DIR)/rackwindows/%.cpp.o: rackwindows/%.cpp -Wno-implicit-fallthrough \ -Wno-sign-compare +$(BUILD_DIR)/RebelTech/%.cpp.o: RebelTech/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(REBELTECH_CUSTOM),$(call custom_module_names,$(m),RebelTech)) \ + -DpluginInstance=pluginInstance__RebelTech + $(BUILD_DIR)/repelzen/%.cpp.o: repelzen/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/RebelTech b/plugins/RebelTech new file mode 160000 index 00000000..6ac79f59 --- /dev/null +++ b/plugins/RebelTech @@ -0,0 +1 @@ +Subproject commit 6ac79f59c5b95433d82bcc759c4cd0642ec35098 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index dab01bde..2a25a2ef 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -689,6 +689,15 @@ extern Model* modelBlankPanel; // rackwindows #include "rackwindows/src/plugin.hpp" +// RebelTech +#define BefacoInputPort BefacoInputPortRebelTech +#define BefacoOutputPort BefacoOutputPortRebelTech +#include "RebelTech/src/plugin.hpp" +#undef BefacoInputPort +#undef BefacoOutputPort +ModuleTheme defaultPanelTheme = DARK_THEME; +void addThemeMenuItems(Menu*, ModuleTheme*) {} + // repelzen #define modelBlank modelrepelzenBlank #define modelMixer modelrepelzenMixer @@ -736,14 +745,18 @@ extern Model* modelBlankPanel; // known terminal modules std::vector hostTerminalModels; -// stuff that reads config files, we dont want that +// stuff that reads config files, we don't want that int loadConsoleType() { return 0; } -bool loadDarkAsDefault() { return 1; } +bool loadDarkAsDefault() { return settings::darkMode; } +ModuleTheme loadDefaultTheme() { return settings::darkMode ? DARK_THEME : LIGHT_THEME; } int loadDirectOutMode() { return 0; } +void readDefaultTheme() { defaultPanelTheme = loadDefaultTheme(); } void saveConsoleType(int) {} void saveDarkAsDefault(bool) {} +void saveDefaultTheme(ModuleTheme) {} void saveDirectOutMode(bool) {} void saveHighQualityAsDefault(bool) {} +void writeDefaultTheme() {} // plugin instances Plugin* pluginInstance__Cardinal; @@ -807,6 +820,7 @@ Plugin* pluginInstance__PathSet; Plugin* pluginInstance__PinkTrombone; Plugin* pluginInstance__Prism; Plugin* pluginInstance__rackwindows; +Plugin* pluginInstance__RebelTech; Plugin* pluginInstance__repelzen; Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; @@ -2636,6 +2650,23 @@ static void initStatic__rackwindows() } } +static void initStatic__RebelTech() +{ + Plugin* const p = new Plugin; + pluginInstance__RebelTech = p; + + const StaticPluginLoader spl(p, "RebelTech"); + if (spl.ok()) + { + p->addModel(modelStoicheia); + p->addModel(modelTonic); + p->addModel(modelKlasmata); + p->addModel(modelCLK); + p->addModel(modelLogoi); + p->addModel(modelPhoreo); + } +} + static void initStatic__repelzen() { Plugin* const p = new Plugin; @@ -2905,6 +2936,7 @@ void initStaticPlugins() initStatic__PinkTrombone(); initStatic__Prism(); initStatic__rackwindows(); + initStatic__RebelTech(); initStatic__repelzen(); initStatic__sonusmodular(); initStatic__stocaudio(); From e42f21b7129b140fb6997908a15803a53e5c982b Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 13:58:15 +0000 Subject: [PATCH 094/451] Only use simde, drop sse2neon Signed-off-by: falkTX --- .gitmodules | 3 --- include/simd-compat/mmintrin.h | 2 -- include/simd-compat/pmmintrin.h | 9 ++++++++- include/sse2neon | 1 - 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 160000 include/sse2neon diff --git a/.gitmodules b/.gitmodules index 4be9d876..028e6d86 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,9 +7,6 @@ [submodule "plugins/Cardinal/mingw-std-threads"] path = include/mingw-std-threads url = https://github.com/meganz/mingw-std-threads.git -[submodule "plugins/Cardinal/sse2neon"] - path = include/sse2neon - url = https://github.com/DLTcollab/sse2neon.git [submodule "plugins/Befaco"] path = plugins/Befaco url = https://github.com/VCVRack/Befaco.git diff --git a/include/simd-compat/mmintrin.h b/include/simd-compat/mmintrin.h index 9058d65f..1efa66a2 100644 --- a/include/simd-compat/mmintrin.h +++ b/include/simd-compat/mmintrin.h @@ -21,8 +21,6 @@ # include_next #elif defined(__EMSCRIPTEN__) # include -#elif defined(__ARM_NEON) -# include "../sse2neon/sse2neon.h" #else # define SIMDE_ENABLE_NATIVE_ALIASES # include "../simde/simde/x86/mmx.h" diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 6b570554..8593e1e1 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -20,6 +20,11 @@ #if defined(__i386__) || defined(__x86_64__) # include_next +// bring in extra SSE3 support via simde +# define SIMDE_X86_SSE2_NATIVE +# define SIMDE_X86_SSE3_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/sse3.h" + #elif defined(__EMSCRIPTEN__) # include_next @@ -29,6 +34,7 @@ __m64 _mm_set1_pi16(short w) return __extension__ (__m64){ static_cast(w), static_cast(w) }; } +/* #elif defined(__ARM_NEON) # include "../sse2neon/sse2neon.h" @@ -43,11 +49,12 @@ __m64 _mm_set1_pi16(short w) { return vreinterpret_s64_s16(vdup_n_s16(w)); } +*/ #else # define SIMDE_ENABLE_NATIVE_ALIASES # include "../simde/simde/x86/sse.h" # include "../simde/simde/x86/sse2.h" -// # include "../simde/simde/x86/sse3.h" +# include "../simde/simde/x86/sse3.h" #endif diff --git a/include/sse2neon b/include/sse2neon deleted file mode 160000 index 1dfa4011..00000000 --- a/include/sse2neon +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1dfa40113a03a682dc79ba42235c5b0d1c50aaf2 From eb3c57d32201e39620a57fe1a6dcfeb47e9f71c6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 14:41:35 +0000 Subject: [PATCH 095/451] Bump version to 22.11 Signed-off-by: falkTX --- Makefile | 4 ++-- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e15db123..545f92c9 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,10 @@ # # also set in: -# jucewrapper/CMakeList.txt `project` +# jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.10 +VERSION = 22.11 # -------------------------------------------------------------- # Import base definitions diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 881be584..d47ce34e 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 22.10) +project(Cardinal VERSION 22.11) add_subdirectory(JUCE) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 2fda1153..5508c1ff 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -57,7 +57,7 @@ # include #endif -const std::string CARDINAL_VERSION = "22.10"; +const std::string CARDINAL_VERSION = "22.11"; namespace rack { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 8aabd0c4..4357c220 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -714,7 +714,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 22, 10); + return d_version(0, 22, 11); } int64_t getUniqueId() const override From 7ade20936f1f068d308098e2de55a8f48fb0e09f Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 16:53:05 +0000 Subject: [PATCH 096/451] Fix minimal build Signed-off-by: falkTX --- plugins/plugins.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 2a25a2ef..1ce711b1 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -745,6 +745,7 @@ void addThemeMenuItems(Menu*, ModuleTheme*) {} // known terminal modules std::vector hostTerminalModels; +#ifndef NOPLUGINS // stuff that reads config files, we don't want that int loadConsoleType() { return 0; } bool loadDarkAsDefault() { return settings::darkMode; } @@ -757,6 +758,7 @@ void saveDefaultTheme(ModuleTheme) {} void saveDirectOutMode(bool) {} void saveHighQualityAsDefault(bool) {} void writeDefaultTheme() {} +#endif // plugin instances Plugin* pluginInstance__Cardinal; From 0e904c715a5437dcd85d53441964e66ac3bc431a Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 16:53:47 +0000 Subject: [PATCH 097/451] Make sure wasm builds never have LTO enabled Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c2d48cc..734b7d90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -773,7 +773,7 @@ jobs: source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd make features - make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc) + make CIBUILD=true NOOPT=true USE_GLES2=true WITH_LTO=false -j $(nproc) - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -835,7 +835,7 @@ jobs: run: | source ~/emsdk/emsdk_env.sh make features - make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) + make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true WITH_LTO=false -j $(nproc) - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV From c39e9f97ab39eb11f23d0cea56d298921c10fbe3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 17:39:04 +0000 Subject: [PATCH 098/451] make sure to not include windows.h in simde Signed-off-by: falkTX --- include/mingw-compat/condition_variable | 3 ++- include/mingw-compat/future | 1 + include/mingw-compat/mutex | 3 ++- include/mingw-compat/thread | 3 ++- include/simd-compat/pmmintrin.h | 12 ++++++++++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/mingw-compat/condition_variable b/include/mingw-compat/condition_variable index 256734cf..270d7d45 100644 --- a/include/mingw-compat/condition_variable +++ b/include/mingw-compat/condition_variable @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,6 +19,7 @@ #include_next #include "mingw.condition_variable.h" +// fix macro pollution from Windows headers #undef IN #undef OUT #undef far diff --git a/include/mingw-compat/future b/include/mingw-compat/future index b782903c..e2cffc76 100644 --- a/include/mingw-compat/future +++ b/include/mingw-compat/future @@ -19,6 +19,7 @@ #include_next #include "mingw.future.h" +// fix macro pollution from Windows headers #undef IN #undef OUT #undef far diff --git a/include/mingw-compat/mutex b/include/mingw-compat/mutex index 7b828929..15df44ac 100644 --- a/include/mingw-compat/mutex +++ b/include/mingw-compat/mutex @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,6 +19,7 @@ #include_next #include "mingw.mutex.h" +// fix macro pollution from Windows headers #undef IN #undef OUT #undef far diff --git a/include/mingw-compat/thread b/include/mingw-compat/thread index 2d5cb43f..3b2a63c6 100644 --- a/include/mingw-compat/thread +++ b/include/mingw-compat/thread @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,6 +19,7 @@ #include_next #include "mingw.thread.h" +// fix macro pollution from Windows headers #undef IN #undef OUT #undef far diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 8593e1e1..fe72b9e0 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -23,8 +23,20 @@ // bring in extra SSE3 support via simde # define SIMDE_X86_SSE2_NATIVE # define SIMDE_X86_SSE3_ENABLE_NATIVE_ALIASES + +// make sure to not include windows.h here +# ifdef _WIN32 +# define _WIN32_WAS_DEFINED +# undef _WIN32 +# endif + # include "../simde/simde/x86/sse3.h" +# ifdef _WIN32_WAS_DEFINED +# define _WIN32 +# undef _WIN32_WAS_DEFINED +# endif + #elif defined(__EMSCRIPTEN__) # include_next From d3b722ebba89d671f370fa7fdc17f6969bdf333a Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 17:44:19 +0000 Subject: [PATCH 099/451] Fix IRC notification workflow Signed-off-by: falkTX --- .github/workflows/irc.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml index 7f103ee7..427e3532 100644 --- a/.github/workflows/irc.yml +++ b/.github/workflows/irc.yml @@ -8,9 +8,11 @@ jobs: name: IRC notification steps: - name: Format message - id: message run: | - echo "message=$(echo ${{ github.actor }} pushed $(echo ${{ github.event.commits[0].message }} | head -n 1 | tr -d "'") ${{ github.event.commits[0].url }}" >> $GITHUB_ENV + echo commitmessage=$(echo "${{ github.event.commits[0].message }}" | head -n 1) >> $GITHUB_ENV + - name: Format message + run: | + echo message="${{ github.actor }} pushed ${{ env.commitmessage }} ${{ github.event.commits[0].url }}" >> $GITHUB_ENV - name: IRC notification uses: Gottox/irc-message-action@v2 with: From f33945d08821b45038e423ec53743c61d1897b1f Mon Sep 17 00:00:00 2001 From: Francesco Cameli Date: Fri, 25 Nov 2022 18:56:39 +0100 Subject: [PATCH 100/451] Order modules according to cable connections (#410) * Engine: re-order modules at each cable connection * Cleanup Engine.cpp * Ignore .vscode * Engine: re-work feedback detection with debug printing * Engine: simplify ordering and add debug printing * Engine: use DEBUG_ORDERED_MODULES to print debugging info * Ignore .vscode --- src/override/Engine.cpp | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index 2a31fe87..b443cb78 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -278,6 +279,75 @@ static void Port_setConnected(Port* that) { } +template +using IdentityDictionary = std::unordered_map; + +template +inline bool dictContains(IdentityDictionary &dict, T key) { + return dict.find(key) != dict.end(); +} + +template +inline void dictAdd(IdentityDictionary &dict, T key) { + dict[key] = key; +} + +static void Engine_storeTerminalModulesIDs(std::vector terminalModules, IdentityDictionary &terminalModulesIDs) { + for (TerminalModule* terminalModule : terminalModules) + dictAdd(terminalModulesIDs, terminalModule->id); +} + +static void Engine_orderModule(Module* module, IdentityDictionary &touchedModules, std::vector &orderedModules, IdentityDictionary &terminalModulesIDs) { + if (!dictContains(touchedModules, module) && !dictContains(terminalModulesIDs, module->id)) { // Ignore feedback loops and terminal modules + dictAdd(touchedModules, module); + for (Output& output : module->outputs) { + for (Cable* cable : output.cables) { + Module* receiver = cable->inputModule; // The input to the cable is the receiving module + Engine_orderModule(receiver, touchedModules, orderedModules, terminalModulesIDs); + } + } + orderedModules.push_back(module); + } +} + +static void Engine_assignOrderedModules(std::vector &modules, std::vector &orderedModules) { + std::reverse(orderedModules.begin(), orderedModules.end()); // These are stored bottom up + if (orderedModules.size() == modules.size()) { + for (unsigned int i = 0; i < orderedModules.size(); i++) + modules[i] = orderedModules[i]; + } +} + +#if DEBUG_ORDERED_MODULES +static void Engine_debugOrderedModules(std::vector &modules) { + printf("\n--- Ordered modules ---\n"); + for (unsigned int i = 0; i < modules.size(); i++) + printf("%d) %s - %ld\n", i, modules[i]->model->getFullName().c_str(), modules[i]->id); +} +#endif + +/** Order the modules so that they always read the most recent sample from their inputs +*/ +static void Engine_orderModules(Engine* that) { + Engine::Internal* internal = that->internal; + + IdentityDictionary terminalModulesIDs; + Engine_storeTerminalModulesIDs(internal->terminalModules, terminalModulesIDs); + + IdentityDictionary touchedModules; + std::vector orderedModules; + orderedModules.reserve(internal->modules.size()); + for (Module* module : internal->modules) + Engine_orderModule(module, touchedModules, orderedModules, terminalModulesIDs); + + Engine_assignOrderedModules(internal->modules, orderedModules); + +#if DEBUG_ORDERED_MODULES + Engine_debugOrderedModules(internal->modules); +#endif +} + + static void Engine_updateConnected(Engine* that) { // Find disconnected ports std::set disconnectedInputs; @@ -320,6 +390,8 @@ static void Engine_updateConnected(Engine* that) { Port_setDisconnected(output); DISTRHO_SAFE_ASSERT(output->cables.empty()); } + // Order the modules according to their connections + Engine_orderModules(that); } @@ -619,6 +691,9 @@ void Engine::addModule(Module* module) { if (paramHandle->moduleId == module->id) paramHandle->module = module; } +#if DEBUG_ORDERED_MODULES + printf("New module: %s - %ld\n", module->model->getFullName().c_str(), module->id); +#endif } From eb730b6c33275d0dc80a0222c73f82d4dc3e114b Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 18:00:59 +0000 Subject: [PATCH 101/451] Fixup code style, regen Rack diffs Signed-off-by: falkTX --- .github/workflows/irc.yml | 2 +- src/override/.generate-diffs.sh | 1 + src/override/Engine.cpp | 12 +- src/override/diffs/Engine.cpp.diff | 201 ++++++++++----- src/override/diffs/MenuBar.cpp.diff | 205 +++++++++------ src/override/diffs/Model.cpp.diff | 4 +- src/override/diffs/OpenGlWidget.cpp.diff | 4 +- src/override/diffs/Scene.cpp.diff | 4 +- src/override/diffs/Window.cpp.diff | 307 ++++++++++++----------- src/override/diffs/blendish.c.diff | 4 +- src/override/diffs/common.cpp.diff | 4 +- src/override/diffs/context.cpp.diff | 4 +- src/override/diffs/minblep.cpp.diff | 62 +++++ src/override/diffs/plugin.cpp.diff | 4 +- 14 files changed, 519 insertions(+), 299 deletions(-) create mode 100644 src/override/diffs/minblep.cpp.diff diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml index 427e3532..14f8d5c6 100644 --- a/.github/workflows/irc.yml +++ b/.github/workflows/irc.yml @@ -9,7 +9,7 @@ jobs: steps: - name: Format message run: | - echo commitmessage=$(echo "${{ github.event.commits[0].message }}" | head -n 1) >> $GITHUB_ENV + echo commitmessage=$(echo "${{ github.event.commits[0].message }}" | head -n 1) >> $GITHUB_ENV - name: Format message run: | echo message="${{ github.actor }} pushed ${{ env.commitmessage }} ${{ github.event.commits[0].url }}" >> $GITHUB_ENV diff --git a/src/override/.generate-diffs.sh b/src/override/.generate-diffs.sh index 887e2933..6e723942 100755 --- a/src/override/.generate-diffs.sh +++ b/src/override/.generate-diffs.sh @@ -9,6 +9,7 @@ diff -U3 ../Rack/src/plugin.cpp plugin.cpp > diffs/plugin.cpp.diff diff -U3 ../Rack/src/app/MenuBar.cpp MenuBar.cpp > diffs/MenuBar.cpp.diff diff -U3 ../Rack/src/app/Scene.cpp Scene.cpp > diffs/Scene.cpp.diff diff -U3 ../Rack/src/engine/Engine.cpp Engine.cpp > diffs/Engine.cpp.diff +diff -U3 ../Rack/src/dsp/minblep.cpp minblep.cpp > diffs/minblep.cpp.diff diff -U3 ../Rack/src/plugin/Model.cpp Model.cpp > diffs/Model.cpp.diff diff -U3 ../Rack/src/widget/OpenGlWidget.cpp OpenGlWidget.cpp > diffs/OpenGlWidget.cpp.diff diff -U3 ../Rack/src/window/Window.cpp Window.cpp > diffs/Window.cpp.diff diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index b443cb78..927f561b 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -283,21 +283,21 @@ template using IdentityDictionary = std::unordered_map; template -inline bool dictContains(IdentityDictionary &dict, T key) { +inline bool dictContains(IdentityDictionary& dict, T key) { return dict.find(key) != dict.end(); } template -inline void dictAdd(IdentityDictionary &dict, T key) { +inline void dictAdd(IdentityDictionary& dict, T key) { dict[key] = key; } -static void Engine_storeTerminalModulesIDs(std::vector terminalModules, IdentityDictionary &terminalModulesIDs) { +static void Engine_storeTerminalModulesIDs(std::vector terminalModules, IdentityDictionary& terminalModulesIDs) { for (TerminalModule* terminalModule : terminalModules) dictAdd(terminalModulesIDs, terminalModule->id); } -static void Engine_orderModule(Module* module, IdentityDictionary &touchedModules, std::vector &orderedModules, IdentityDictionary &terminalModulesIDs) { +static void Engine_orderModule(Module* module, IdentityDictionary& touchedModules, std::vector& orderedModules, IdentityDictionary& terminalModulesIDs) { if (!dictContains(touchedModules, module) && !dictContains(terminalModulesIDs, module->id)) { // Ignore feedback loops and terminal modules dictAdd(touchedModules, module); for (Output& output : module->outputs) { @@ -310,7 +310,7 @@ static void Engine_orderModule(Module* module, IdentityDictionary &touc } } -static void Engine_assignOrderedModules(std::vector &modules, std::vector &orderedModules) { +static void Engine_assignOrderedModules(std::vector& modules, std::vector& orderedModules) { std::reverse(orderedModules.begin(), orderedModules.end()); // These are stored bottom up if (orderedModules.size() == modules.size()) { for (unsigned int i = 0; i < orderedModules.size(); i++) @@ -319,7 +319,7 @@ static void Engine_assignOrderedModules(std::vector &modules, std::vect } #if DEBUG_ORDERED_MODULES -static void Engine_debugOrderedModules(std::vector &modules) { +static void Engine_debugOrderedModules(std::vector& modules) { printf("\n--- Ordered modules ---\n"); for (unsigned int i = 0; i < modules.size(); i++) printf("%d) %s - %ld\n", i, modules[i]->model->getFullName().c_str(), modules[i]->id); diff --git a/src/override/diffs/Engine.cpp.diff b/src/override/diffs/Engine.cpp.diff index 7a58e95b..7b8616de 100644 --- a/src/override/diffs/Engine.cpp.diff +++ b/src/override/diffs/Engine.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/engine/Engine.cpp 2022-04-11 20:05:02.011283836 +0100 -+++ Engine.cpp 2022-06-29 01:30:02.024102120 +0100 +--- ../Rack/src/engine/Engine.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ Engine.cpp 2022-11-25 17:57:38.799958734 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -31,8 +31,11 @@ #include #include #include -@@ -8,181 +35,35 @@ +@@ -6,183 +33,38 @@ + #include + #include #include ++#include #include +#include @@ -95,21 +98,23 @@ - }); - } -}; -- -- ++#include "DistrhoUtils.hpp" + + -/** 2-phase barrier based on spin-locking. -*/ -struct SpinBarrier { - std::atomic count{0}; - std::atomic step{0}; - int threads = 0; -- ++// known terminal modules ++extern std::vector hostTerminalModels; + - /** Must be called when no threads are calling wait(). - */ - void setThreads(int threads) { - this->threads = threads; - } -+#include "DistrhoUtils.hpp" - void wait() { - uint8_t s = step; @@ -129,10 +134,8 @@ - } - } -}; - -+// known terminal modules -+extern std::vector hostTerminalModels; - +- +- -/** Barrier that spin-locks until yield() is called, and then all threads switch to a mutex. -yield() should be called if it is likely that all threads will block for a while and continuing to spin-lock is unnecessary. -Saves CPU power after yield is called. @@ -169,7 +172,7 @@ - } - return; - } - +- - // Spin until the last thread begins waiting - while (!yielded.load(std::memory_order_relaxed)) { - if (step.load(std::memory_order_relaxed) != s) @@ -224,7 +227,7 @@ // moduleId std::map modulesCache; -@@ -198,7 +79,9 @@ +@@ -198,7 +80,9 @@ int64_t blockFrame = 0; double blockTime = 0.0; int blockFrames = 0; @@ -234,7 +237,7 @@ // Meter int meterCount = 0; double meterTotal = 0.0; -@@ -206,6 +89,7 @@ +@@ -206,6 +90,7 @@ double meterLastTime = -INFINITY; double meterLastAverage = 0.0; double meterLastMax = 0.0; @@ -242,7 +245,7 @@ // Parameter smoothing Module* smoothModule = NULL; -@@ -217,22 +101,6 @@ +@@ -217,22 +102,6 @@ Readers lock when using the engine's state. */ SharedMutex mutex; @@ -265,7 +268,7 @@ }; -@@ -260,76 +128,11 @@ +@@ -260,76 +129,11 @@ } @@ -343,7 +346,7 @@ // Copy all voltages from output to input for (int c = 0; c < channels; c++) { float v = output->voltages[c]; -@@ -346,6 +149,53 @@ +@@ -346,6 +150,53 @@ } @@ -397,7 +400,7 @@ /** Steps a single frame */ static void Engine_stepFrame(Engine* that) { -@@ -372,13 +222,8 @@ +@@ -372,13 +223,8 @@ } } @@ -412,7 +415,7 @@ if (module->leftExpander.messageFlipRequested) { std::swap(module->leftExpander.producerMessage, module->leftExpander.consumerMessage); module->leftExpander.messageFlipRequested = false; -@@ -389,13 +234,32 @@ +@@ -389,13 +235,32 @@ } } @@ -440,19 +443,90 @@ + Cable_step(cable); + } + } - -- internal->frame++; ++ + // Process terminal outputs last + for (TerminalModule* terminalModule : internal->terminalModules) { + TerminalModule__doProcess(terminalModule, processArgs, false); + } -+ + +- internal->frame++; + ++internal->frame; } -@@ -416,32 +280,45 @@ +@@ -414,35 +279,119 @@ + } + ++template ++using IdentityDictionary = std::unordered_map; ++ ++template ++inline bool dictContains(IdentityDictionary& dict, T key) { ++ return dict.find(key) != dict.end(); ++} ++ ++template ++inline void dictAdd(IdentityDictionary& dict, T key) { ++ dict[key] = key; ++} ++ ++static void Engine_storeTerminalModulesIDs(std::vector terminalModules, IdentityDictionary& terminalModulesIDs) { ++ for (TerminalModule* terminalModule : terminalModules) ++ dictAdd(terminalModulesIDs, terminalModule->id); ++} ++ ++static void Engine_orderModule(Module* module, IdentityDictionary& touchedModules, std::vector& orderedModules, IdentityDictionary& terminalModulesIDs) { ++ if (!dictContains(touchedModules, module) && !dictContains(terminalModulesIDs, module->id)) { // Ignore feedback loops and terminal modules ++ dictAdd(touchedModules, module); ++ for (Output& output : module->outputs) { ++ for (Cable* cable : output.cables) { ++ Module* receiver = cable->inputModule; // The input to the cable is the receiving module ++ Engine_orderModule(receiver, touchedModules, orderedModules, terminalModulesIDs); ++ } ++ } ++ orderedModules.push_back(module); ++ } ++} ++ ++static void Engine_assignOrderedModules(std::vector& modules, std::vector& orderedModules) { ++ std::reverse(orderedModules.begin(), orderedModules.end()); // These are stored bottom up ++ if (orderedModules.size() == modules.size()) { ++ for (unsigned int i = 0; i < orderedModules.size(); i++) ++ modules[i] = orderedModules[i]; ++ } ++} ++ ++#if DEBUG_ORDERED_MODULES ++static void Engine_debugOrderedModules(std::vector& modules) { ++ printf("\n--- Ordered modules ---\n"); ++ for (unsigned int i = 0; i < modules.size(); i++) ++ printf("%d) %s - %ld\n", i, modules[i]->model->getFullName().c_str(), modules[i]->id); ++} ++#endif ++ ++/** Order the modules so that they always read the most recent sample from their inputs ++*/ ++static void Engine_orderModules(Engine* that) { ++ Engine::Internal* internal = that->internal; ++ ++ IdentityDictionary terminalModulesIDs; ++ Engine_storeTerminalModulesIDs(internal->terminalModules, terminalModulesIDs); ++ ++ IdentityDictionary touchedModules; ++ std::vector orderedModules; ++ orderedModules.reserve(internal->modules.size()); ++ for (Module* module : internal->modules) ++ Engine_orderModule(module, touchedModules, orderedModules, terminalModulesIDs); ++ ++ Engine_assignOrderedModules(internal->modules, orderedModules); ++ ++#if DEBUG_ORDERED_MODULES ++ Engine_debugOrderedModules(internal->modules); ++#endif ++} ++ ++ static void Engine_updateConnected(Engine* that) { // Find disconnected ports - std::set disconnectedPorts; @@ -506,9 +580,12 @@ + Port_setDisconnected(output); + DISTRHO_SAFE_ASSERT(output->cables.empty()); } ++ // Order the modules according to their connections ++ Engine_orderModules(that); } -@@ -460,37 +337,23 @@ + +@@ -460,37 +409,23 @@ Engine::Engine() { internal = new Internal; @@ -554,7 +631,7 @@ delete internal; } -@@ -519,18 +382,22 @@ +@@ -519,18 +454,22 @@ removeModule_NoLock(module); delete module; } @@ -580,7 +657,7 @@ random::init(); internal->blockFrame = internal->frame; -@@ -543,18 +410,14 @@ +@@ -543,18 +482,14 @@ Engine_updateExpander_NoLock(this, module, true); } @@ -600,7 +677,7 @@ // Stop timer double endTime = system::getTime(); double meter = (endTime - startTime) / (frames * internal->sampleTime); -@@ -572,47 +435,20 @@ +@@ -572,47 +507,20 @@ internal->meterTotal = 0.0; internal->meterMax = 0.0; } @@ -650,7 +727,7 @@ } -@@ -635,20 +471,13 @@ +@@ -635,20 +543,13 @@ for (Module* module : internal->modules) { module->onSampleRateChange(e); } @@ -674,7 +751,7 @@ } -@@ -658,7 +487,6 @@ +@@ -658,7 +559,6 @@ void Engine::yieldWorkers() { @@ -682,7 +759,7 @@ } -@@ -698,17 +526,25 @@ +@@ -698,17 +598,25 @@ double Engine::getMeterAverage() { @@ -709,7 +786,7 @@ } -@@ -718,8 +554,12 @@ +@@ -718,8 +626,12 @@ for (Module* m : internal->modules) { if (i >= len) break; @@ -724,7 +801,7 @@ } return i; } -@@ -728,27 +568,43 @@ +@@ -728,27 +640,43 @@ std::vector Engine::getModuleIds() { SharedLock lock(internal->mutex); std::vector moduleIds; @@ -772,7 +849,17 @@ internal->modulesCache[module->id] = module; // Dispatch AddEvent Module::AddEvent eAdd; -@@ -772,11 +628,11 @@ +@@ -763,6 +691,9 @@ + if (paramHandle->moduleId == module->id) + paramHandle->module = module; + } ++#if DEBUG_ORDERED_MODULES ++ printf("New module: %s - %ld\n", module->model->getFullName().c_str(), module->id); ++#endif + } + + +@@ -772,11 +703,11 @@ } @@ -789,7 +876,7 @@ // Dispatch RemoveEvent Module::RemoveEvent eRemove; module->onRemove(eRemove); -@@ -785,18 +641,14 @@ +@@ -785,18 +716,14 @@ if (paramHandle->moduleId == module->id) paramHandle->module = NULL; } @@ -810,7 +897,7 @@ } // Update expanders of other modules for (Module* m : internal->modules) { -@@ -809,14 +661,31 @@ +@@ -809,14 +736,31 @@ m->rightExpander.module = NULL; } } @@ -845,7 +932,7 @@ } -@@ -824,7 +693,8 @@ +@@ -824,7 +768,8 @@ SharedLock lock(internal->mutex); // TODO Performance could be improved by searching modulesCache, but more testing would be needed to make sure it's always valid. auto it = std::find(internal->modules.begin(), internal->modules.end(), module); @@ -855,7 +942,7 @@ } -@@ -844,7 +714,7 @@ +@@ -844,7 +789,7 @@ void Engine::resetModule(Module* module) { std::lock_guard lock(internal->mutex); @@ -864,7 +951,7 @@ Module::ResetEvent eReset; module->onReset(eReset); -@@ -853,7 +723,7 @@ +@@ -853,7 +798,7 @@ void Engine::randomizeModule(Module* module) { std::lock_guard lock(internal->mutex); @@ -873,7 +960,7 @@ Module::RandomizeEvent eRandomize; module->onRandomize(eRandomize); -@@ -861,7 +731,7 @@ +@@ -861,7 +806,7 @@ void Engine::bypassModule(Module* module, bool bypassed) { @@ -882,7 +969,7 @@ if (module->isBypassed() == bypassed) return; -@@ -907,11 +777,17 @@ +@@ -907,11 +852,17 @@ void Engine::prepareSave() { @@ -900,7 +987,7 @@ } -@@ -946,16 +822,16 @@ +@@ -946,16 +897,16 @@ void Engine::addCable(Cable* cable) { std::lock_guard lock(internal->mutex); @@ -922,7 +1009,7 @@ // Get connected status of output, to decide whether we need to call a PortChangeEvent. // It's best to not trust `cable->outputModule->outputs[cable->outputId]->isConnected()` if (cable2->outputModule == cable->outputModule && cable2->outputId == cable->outputId) -@@ -969,6 +845,8 @@ +@@ -969,6 +920,8 @@ // Add the cable internal->cables.push_back(cable); internal->cablesCache[cable->id] = cable; @@ -931,7 +1018,7 @@ Engine_updateConnected(this); // Dispatch input port event { -@@ -996,10 +874,12 @@ +@@ -996,10 +949,12 @@ void Engine::removeCable_NoLock(Cable* cable) { @@ -946,7 +1033,7 @@ // Remove the cable internal->cablesCache.erase(cable->id); internal->cables.erase(it); -@@ -1085,11 +965,11 @@ +@@ -1085,11 +1040,11 @@ std::lock_guard lock(internal->mutex); // New ParamHandles must be blank. // This means we don't have to refresh the cache. @@ -960,7 +1047,7 @@ // Add it internal->paramHandles.insert(paramHandle); -@@ -1106,7 +986,7 @@ +@@ -1106,7 +1061,7 @@ void Engine::removeParamHandle_NoLock(ParamHandle* paramHandle) { // Check that the ParamHandle is already added auto it = internal->paramHandles.find(paramHandle); @@ -969,7 +1056,7 @@ // Remove it paramHandle->module = NULL; -@@ -1143,7 +1023,7 @@ +@@ -1143,7 +1098,7 @@ void Engine::updateParamHandle_NoLock(ParamHandle* paramHandle, int64_t moduleId, int paramId, bool overwrite) { // Check that it exists auto it = internal->paramHandles.find(paramHandle); @@ -978,7 +1065,7 @@ // Set IDs paramHandle->moduleId = moduleId; -@@ -1187,6 +1067,10 @@ +@@ -1187,6 +1142,10 @@ json_t* moduleJ = module->toJson(); json_array_append_new(modulesJ, moduleJ); } @@ -989,7 +1076,7 @@ json_object_set_new(rootJ, "modules", modulesJ); // cables -@@ -1197,11 +1081,6 @@ +@@ -1197,11 +1156,6 @@ } json_object_set_new(rootJ, "cables", cablesJ); @@ -1001,7 +1088,7 @@ return rootJ; } -@@ -1225,14 +1104,20 @@ +@@ -1225,14 +1179,20 @@ } catch (Exception& e) { WARN("Cannot load model: %s", e.what()); @@ -1026,7 +1113,7 @@ try { // This doesn't need a lock because the Module is not added to the Engine yet. -@@ -1248,7 +1133,8 @@ +@@ -1248,7 +1208,8 @@ } catch (Exception& e) { WARN("Cannot load module: %s", e.what()); @@ -1036,7 +1123,7 @@ delete module; continue; } -@@ -1285,67 +1171,15 @@ +@@ -1285,67 +1246,15 @@ continue; } } @@ -1047,9 +1134,9 @@ - Module* masterModule = getModule(json_integer_value(masterModuleIdJ)); - setMasterModule(masterModule); - } - } - - +-} +- +- -void EngineWorker::run() { - // Configure thread - contextSet(engine->internal->context); @@ -1064,9 +1151,9 @@ - Engine_stepWorker(engine, id); - engine->internal->workerBarrier.wait(); - } --} -- -- + } + + -static void Engine_fallbackRun(Engine* that) { - system::setThreadName("Engine fallback"); - contextSet(that->internal->context); diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index 5a32860c..0e9f9ad9 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/MenuBar.cpp 2022-07-12 09:46:20.716165650 +0100 -+++ MenuBar.cpp 2022-07-12 09:45:31.518663160 +0100 +--- ../Rack/src/app/MenuBar.cpp 2022-09-21 19:49:12.198540676 +0100 ++++ MenuBar.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin @@ -36,29 +36,40 @@ #include #include #include -@@ -25,8 +50,21 @@ +@@ -15,6 +40,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -25,8 +51,24 @@ #include #include +#include "../CardinalCommon.hpp" ++#include "DistrhoStandaloneUtils.hpp" + +#ifdef HAVE_LIBLO +# include +#endif + -+#ifdef DISTRHO_OS_WASM -+# include "DistrhoStandaloneUtils.hpp" -+#endif ++void switchDarkMode(bool darkMode); namespace rack { +namespace asset { +std::string patchesPath(); +} ++ ++namespace plugin { ++void updateStaticPluginsDarkMode(); ++} + namespace app { namespace menuBar { -@@ -48,79 +86,140 @@ +@@ -48,79 +90,152 @@ }; @@ -82,12 +93,15 @@ struct FileButton : MenuButton { + const bool isStandalone; ++#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) + std::vector demoPatches; ++#endif + + FileButton(const bool standalone) + : MenuButton(), isStandalone(standalone) + { -+ const std::string patchesDir = asset::patchesPath(); ++#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) ++ const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples"; + + if (system::isDirectory(patchesDir)) + { @@ -96,6 +110,7 @@ + return string::lowercase(a) < string::lowercase(b); + }); + } ++#endif + } + void onAction(const ActionEvent& e) override { @@ -177,7 +192,7 @@ + menu->addChild(createMenuItem("Deploy to MOD", "F7", []() { + patchUtils::deployToRemote(); + })); -+ + + const bool autoDeploy = patchUtils::isRemoteAutoDeployed(); + menu->addChild(createCheckMenuItem("Auto deploy to MOD", "", + [=]() {return autoDeploy;}, @@ -189,7 +204,7 @@ + })); + } +#endif - ++ +#ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); @@ -209,6 +224,7 @@ })); +#endif + ++#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) + if (!demoPatches.empty()) + { + menu->addChild(new ui::MenuSeparator); @@ -226,8 +242,15 @@ + patchUtils::loadPathDialog(path, true); + })); + } ++ ++ menu->addChild(new ui::MenuSeparator); ++ ++ menu->addChild(createMenuItem("Open PatchStorage.com for more patches", "", []() { ++ patchUtils::openBrowser("https://patchstorage.com/platform/cardinal/"); ++ })); + })); + } ++#endif + +#ifndef DISTRHO_OS_WASM + if (isStandalone) { @@ -241,7 +264,7 @@ } }; -@@ -166,7 +265,7 @@ +@@ -166,7 +281,7 @@ menu->addChild(new ui::MenuSeparator); @@ -250,7 +273,7 @@ } }; -@@ -256,7 +355,7 @@ +@@ -256,7 +371,7 @@ return settings::cableTension; } float getDefaultValue() override { @@ -259,7 +282,27 @@ } float getDisplayValue() override { return getValue() * 100; -@@ -399,28 +498,6 @@ +@@ -393,36 +508,37 @@ + }; + + ++static void setAllFramebufferWidgetsDirty(widget::Widget* const widget) ++{ ++ for (widget::Widget* child : widget->children) ++ { ++ if (widget::FramebufferWidget* const fbw = dynamic_cast(child)) ++ { ++ fbw->setDirty(); ++ break; ++ } ++ setAllFramebufferWidgetsDirty(child); ++ } ++} ++ ++ + struct ViewButton : MenuButton { + void onAction(const ActionEvent& e) override { + ui::Menu* menu = createMenu(); menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); @@ -272,7 +315,8 @@ - menu->addChild(createMenuItem("Fullscreen", fullscreenText, [=]() { - APP->window->setFullScreen(!fullscreen); - })); -- ++ menu->addChild(createMenuLabel("Appearance")); + - double frameRate = APP->window->getMonitorRefreshRate() / settings::frameSwapInterval; - menu->addChild(createSubmenuItem("Frame rate", string::f("%.0f Hz", frameRate), [=](ui::Menu* menu) { - for (int i = 1; i <= 6; i++) { @@ -282,13 +326,22 @@ - [=]() {settings::frameSwapInterval = i;} - )); - } -- })); -- -- menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("Appearance")); ++ std::string darkModeText; ++ if (settings::darkMode) ++ darkModeText = CHECKMARK_STRING; ++ menu->addChild(createMenuItem("Dark Mode", darkModeText, []() { ++ switchDarkMode(!settings::darkMode); ++ plugin::updateStaticPluginsDarkMode(); ++ setAllFramebufferWidgetsDirty(APP->scene); + })); +- menu->addChild(new ui::MenuSeparator); +- menu->addChild(createMenuLabel("Appearance")); +- menu->addChild(createBoolPtrMenuItem("Show tooltips", "", &settings::tooltips)); -@@ -446,9 +523,18 @@ + + ZoomSlider* zoomSlider = new ZoomSlider; +@@ -446,9 +562,18 @@ menu->addChild(haloBrightnessSlider); menu->addChild(new ui::MenuSeparator); @@ -307,7 +360,7 @@ static const std::vector knobModeLabels = { "Linear", -@@ -473,11 +559,34 @@ +@@ -473,11 +598,34 @@ menu->addChild(knobScrollSensitivitySlider); menu->addChild(new ui::MenuSeparator); @@ -317,17 +370,17 @@ - menu->addChild(createBoolPtrMenuItem("Lock positions", "", &settings::lockModules)); +#ifdef DISTRHO_OS_WASM + const bool fullscreen = APP->window->isFullScreen(); -+ std::string fullscreenText = "F11"; ++ std::string rightText = "F11"; + if (fullscreen) -+ fullscreenText += " " CHECKMARK_STRING; -+ menu->addChild(createMenuItem("Fullscreen", fullscreenText, [=]() { ++ rightText += " " CHECKMARK_STRING; ++ menu->addChild(createMenuItem("Fullscreen", rightText, [=]() { + APP->window->setFullScreen(!fullscreen); + })); +#endif ++ ++ menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); - menu->addChild(createBoolPtrMenuItem("Auto-squeeze algorithm (experimental)", "", &settings::squeezeModules)); -+ menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); -+ + static const std::vector rateLimitLabels = { + "None", + "2x", @@ -345,7 +398,7 @@ } }; -@@ -487,47 +596,6 @@ +@@ -487,47 +635,6 @@ //////////////////// @@ -393,7 +446,7 @@ struct EngineButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); -@@ -541,268 +609,42 @@ +@@ -541,268 +648,40 @@ settings::cpuMeter ^= true; })); @@ -404,7 +457,10 @@ - int cores = system::getLogicalCoreCount() / 2; - - for (int i = 1; i <= 2 * cores; i++) { -- std::string rightText; ++ if (isUsingNativeAudio()) { ++ if (supportsAudioInput()) { ++ const bool enabled = isAudioInputEnabled(); + std::string rightText; - if (i == cores) - rightText += "(most modules)"; - else if (i == 1) @@ -538,12 +594,18 @@ - rightText += p->version + " → "; - } - rightText += update.version; -- } ++ if (enabled) ++ rightText = CHECKMARK_STRING; ++ menu->addChild(createMenuItem("Enable Audio Input", rightText, [enabled]() { ++ if (!enabled) ++ requestAudioInput(); ++ })); + } - } - - MenuItem::step(); - } -- + - void onAction(const ActionEvent& e) override { - std::thread t([=] { - library::syncUpdate(slug); @@ -578,16 +640,7 @@ - else if (!library::isLoggedIn()) { - addChild(createMenuItem("Register VCV account", "", [=]() { - system::openBrowser("https://vcvrack.com/login"); -+#ifdef DISTRHO_OS_WASM -+ if (supportsAudioInput()) { -+ const bool enabled = isAudioInputEnabled(); -+ std::string text = "Enable Audio Input"; -+ if (enabled) -+ text += " " CHECKMARK_STRING; -+ menu->addChild(createMenuItem(text, "", [enabled]() { -+ if (!enabled) -+ requestAudioInput(); - })); +- })); - - ui::TextField* emailField = new ui::TextField; - emailField->placeholder = "Email"; @@ -606,23 +659,15 @@ - logInItem->passwordField = passwordField; - passwordField->logInItem = logInItem; - addChild(logInItem); - } +- } - else { - addChild(createMenuItem("Log out", "", [=]() { - library::logOut(); - })); - +- - addChild(createMenuItem("Browse VCV Library", "", [=]() { - system::openBrowser("https://library.vcvrack.com/"); -+ if (supportsMIDI()) { -+ const bool enabled = isMIDIEnabled(); -+ std::string text = "Enable MIDI"; -+ if (enabled) -+ text += " " CHECKMARK_STRING; -+ menu->addChild(createMenuItem(text, "", [enabled]() { -+ if (!enabled) -+ requestMIDI(); - })); +- })); - - SyncUpdatesItem* syncItem = new SyncUpdatesItem; - syncItem->text = "Update all"; @@ -637,12 +682,19 @@ - updateItem->setUpdate(pair.first); - addChild(updateItem); - } -- } - } ++ if (supportsMIDI()) { ++ std::string rightText; ++ if (isMIDIEnabled()) ++ rightText = CHECKMARK_STRING; ++ menu->addChild(createMenuItem("Enable/Reconnect MIDI", rightText, []() { ++ requestMIDI(); ++ })); + } +- } - } -}; - - +- -struct LibraryButton : MenuButton { - NotificationIcon* notification; - @@ -662,7 +714,7 @@ - }); - t.detach(); - } -- + - void step() override { - notification->box.pos = math::Vec(0, 0); - notification->visible = library::hasUpdates(); @@ -672,26 +724,25 @@ - library::restartRequested = false; - if (osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, "All plugins have been downloaded. Close and re-launch Rack to load new updates.")) { - APP->window->close(); -- } -+ if (supportsBufferSizeChanges()) { -+ static const std::vector bufferSizes = {256, 512, 1024, 2048, 4096, 8192, 16384}; -+ const uint32_t currentBufferSize = getBufferSize(); -+ menu->addChild(createSubmenuItem("Buffer Size", std::to_string(currentBufferSize), [=](ui::Menu* menu) { -+ for (uint32_t bufferSize : bufferSizes) { -+ menu->addChild(createCheckMenuItem(std::to_string(bufferSize), "", -+ [=]() {return currentBufferSize == bufferSize;}, -+ [=]() {requestBufferSizeChange(bufferSize);} -+ )); -+ } -+ })); ++ if (supportsBufferSizeChanges()) { ++ static const std::vector bufferSizes = {256, 512, 1024, 2048, 4096, 8192, 16384}; ++ const uint32_t currentBufferSize = getBufferSize(); ++ menu->addChild(createSubmenuItem("Buffer Size", std::to_string(currentBufferSize), [=](ui::Menu* menu) { ++ for (uint32_t bufferSize : bufferSizes) { ++ menu->addChild(createCheckMenuItem(std::to_string(bufferSize), "", ++ [=]() {return currentBufferSize == bufferSize;}, ++ [=]() {requestBufferSizeChange(bufferSize);} ++ )); ++ } ++ })); + } } - - MenuButton::step(); -+#endif } }; -@@ -813,65 +655,23 @@ +@@ -813,65 +692,23 @@ struct HelpButton : MenuButton { @@ -709,14 +760,14 @@ - menu->addChild(createMenuItem("Tips", "", [=]() { - APP->scene->addChild(tipWindowCreate()); +- })); +- +- menu->addChild(createMenuItem("User manual", "F1", [=]() { +- system::openBrowser("https://vcvrack.com/manual"); + menu->addChild(createMenuItem("Rack User manual", "F1", [=]() { + patchUtils::openBrowser("https://vcvrack.com/manual"); })); -- menu->addChild(createMenuItem("User manual", "F1", [=]() { -- system::openBrowser("https://vcvrack.com/manual"); -- })); -- - menu->addChild(createMenuItem("Support", "", [=]() { - system::openBrowser("https://vcvrack.com/support"); - })); @@ -763,7 +814,7 @@ } }; -@@ -921,7 +721,9 @@ +@@ -921,7 +758,9 @@ struct MenuBar : widget::OpaqueWidget { MeterLabel* meterLabel; @@ -774,7 +825,7 @@ const float margin = 5; box.size.y = BND_WIDGET_HEIGHT + 2 * margin; -@@ -930,7 +732,7 @@ +@@ -930,7 +769,7 @@ layout->spacing = math::Vec(0, 0); addChild(layout); @@ -783,7 +834,7 @@ fileButton->text = "File"; layout->addChild(fileButton); -@@ -946,10 +748,6 @@ +@@ -946,10 +785,6 @@ engineButton->text = "Engine"; layout->addChild(engineButton); @@ -794,7 +845,7 @@ HelpButton* helpButton = new HelpButton; helpButton->text = "Help"; layout->addChild(helpButton); -@@ -984,7 +782,11 @@ +@@ -984,7 +819,11 @@ widget::Widget* createMenuBar() { diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index b1f5617c..1c251b2e 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin/Model.cpp 2022-07-12 09:46:20.716165650 +0100 -+++ Model.cpp 2022-07-06 16:19:37.977002863 +0100 +--- ../Rack/src/plugin/Model.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ Model.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/OpenGlWidget.cpp.diff b/src/override/diffs/OpenGlWidget.cpp.diff index 1ada3cd0..1fb7156e 100644 --- a/src/override/diffs/OpenGlWidget.cpp.diff +++ b/src/override/diffs/OpenGlWidget.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/widget/OpenGlWidget.cpp 2022-04-11 20:05:02.023283713 +0100 -+++ OpenGlWidget.cpp 2022-07-14 01:14:57.028367786 +0100 +--- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 19:49:12.201540766 +0100 ++++ OpenGlWidget.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index 3d338e9f..b364a2ac 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/Scene.cpp 2022-04-11 20:05:02.007283878 +0100 -+++ Scene.cpp 2022-07-12 09:45:31.518663160 +0100 +--- ../Rack/src/app/Scene.cpp 2022-09-21 19:49:12.199540706 +0100 ++++ Scene.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index 2082672a..2e273a4b 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/window/Window.cpp 2022-04-11 20:05:02.023283713 +0100 -+++ Window.cpp 2022-07-12 09:45:31.518663160 +0100 +--- ../Rack/src/window/Window.cpp 2022-09-21 19:49:12.202540796 +0100 ++++ Window.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,33 +1,87 @@ +/* + * DISTRHO Cardinal Plugin @@ -112,7 +112,7 @@ throw Exception("Failed to load font %s", filename.c_str()); } INFO("Loaded font %s", filename.c_str()); -@@ -79,375 +132,325 @@ +@@ -79,375 +132,347 @@ } @@ -247,18 +247,6 @@ - APP->event->handleButton(APP->window->internal->lastMousePos, button, action, mods); -} -- -- --static void cursorPosCallback(GLFWwindow* win, double xpos, double ypos) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- math::Vec mousePos = math::Vec(xpos, ypos).div(APP->window->pixelRatio / APP->window->windowRatio).round(); -- math::Vec mouseDelta = mousePos.minus(APP->window->internal->lastMousePos); -- -- // Workaround for GLFW warping mouse to a different position when the cursor is locked or unlocked. -- if (APP->window->internal->ignoreNextMouseDelta) { -- APP->window->internal->ignoreNextMouseDelta = false; -- mouseDelta = math::Vec(); -- } + // Load default Blendish font +#ifndef DGL_NO_SHARED_RESOURCES + uiFont = std::make_shared(); @@ -275,11 +263,43 @@ + uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); +#endif -- int cursorMode = glfwGetInputMode(win, GLFW_CURSOR); -- (void) cursorMode; + if (uiFont != nullptr) + bndSetFont(uiFont->handle); +-static void cursorPosCallback(GLFWwindow* win, double xpos, double ypos) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- math::Vec mousePos = math::Vec(xpos, ypos).div(APP->window->pixelRatio / APP->window->windowRatio).round(); +- math::Vec mouseDelta = mousePos.minus(APP->window->internal->lastMousePos); ++#ifdef DISTRHO_OS_WASM ++ emscripten_lock_orientation(EMSCRIPTEN_ORIENTATION_LANDSCAPE_PRIMARY); ++#endif ++} + +- // Workaround for GLFW warping mouse to a different position when the cursor is locked or unlocked. +- if (APP->window->internal->ignoreNextMouseDelta) { +- APP->window->internal->ignoreNextMouseDelta = false; +- mouseDelta = math::Vec(); ++void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) ++{ ++ // if nanovg context failed, init only bare minimum ++ if (window->vg == nullptr) ++ { ++ if (ui != nullptr) ++ { ++ window->internal->ui = ui; ++ window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); ++ } ++ else ++ { ++ window->internal->ui = nullptr; ++ window->internal->callback = nullptr; ++ } ++ return; + } + +- int cursorMode = glfwGetInputMode(win, GLFW_CURSOR); +- (void) cursorMode; +- -#if defined ARCH_MAC - // Workaround for Mac. We can't use GLFW_CURSOR_DISABLED because it's buggy, so implement it on our own. - // This is not an ideal implementation. For example, if the user drags off the screen, the new mouse position will be clamped. @@ -291,16 +311,6 @@ - } - // Because sometimes the cursor turns into an arrow when its position is on the boundary of the window - glfwSetCursor(win, NULL); -+#ifdef DISTRHO_OS_WASM -+ emscripten_lock_orientation(EMSCRIPTEN_ORIENTATION_LANDSCAPE_PRIMARY); - #endif -+} - -- APP->window->internal->lastMousePos = mousePos; -- -- APP->event->handleHover(mousePos, mouseDelta); -+void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) -+{ + if (ui != nullptr) + { + const GLubyte* vendor = glGetString(GL_VENDOR); @@ -318,14 +328,9 @@ + window->internal->r_fbVg = nvgCreateSharedGLES2(window->internal->r_vg, NVG_ANTIALIAS); +#else + window->internal->r_fbVg = nvgCreateSharedGL2(window->internal->r_vg, NVG_ANTIALIAS); -+#endif + #endif -- // Keyboard/mouse MIDI driver -- int width, height; -- glfwGetWindowSize(win, &width, &height); -- math::Vec scaledPos(xpos / width, ypos / height); -- keyboard::mouseMove(scaledPos); --} +- APP->window->internal->lastMousePos = mousePos; + // swap contexts + window->internal->o_vg = window->vg; + window->internal->o_fbVg = window->fbVg; @@ -350,22 +355,24 @@ + NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); + } +- APP->event->handleHover(mousePos, mouseDelta); + // Init settings + WindowParametersRestore(window); --static void cursorEnterCallback(GLFWwindow* win, int entered) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- if (!entered) { -- APP->event->handleLeave(); +- // Keyboard/mouse MIDI driver +- int width, height; +- glfwGetWindowSize(win, &width, &height); +- math::Vec scaledPos(xpos / width, ypos / height); +- keyboard::mouseMove(scaledPos); +-} + widget::Widget::ContextCreateEvent e; + APP->scene->onContextCreate(e); - } --} ++ } + else + { + widget::Widget::ContextDestroyEvent e; + APP->scene->onContextDestroy(e); - ++ + // swap contexts + window->uiFont->vg = window->internal->o_vg; + window->vg = window->internal->o_vg; @@ -389,67 +396,88 @@ + image.second->ohandle = -1; + } ++#if defined NANOVG_GLES2 ++ nvgDeleteGLES2(window->internal->r_fbVg); ++#else ++ nvgDeleteGL2(window->internal->r_fbVg); ++#endif + +-static void cursorEnterCallback(GLFWwindow* win, int entered) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- if (!entered) { +- APP->event->handleLeave(); ++ window->internal->ui = nullptr; ++ window->internal->callback = nullptr; + } + } + ++void WindowSetMods(Window* const window, const int mods) ++{ ++ window->internal->mods = mods; ++} + -static void scrollCallback(GLFWwindow* win, double x, double y) { - contextSet((Context*) glfwGetWindowUserPointer(win)); - math::Vec scrollDelta = math::Vec(x, y); -#if defined ARCH_MAC - scrollDelta = scrollDelta.mult(10.0); ++Window::~Window() { ++ { ++ DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); ++ internal->hiddenWindow.close(); ++ internal->hiddenApp.idle(); ++ ++ // Fonts and Images in the cache must be deleted before the NanoVG context is deleted ++ internal->fontCache.clear(); ++ internal->imageCache.clear(); ++ ++ if (vg != nullptr) ++ { +#if defined NANOVG_GLES2 -+ nvgDeleteGLES2(window->internal->r_fbVg); ++ nvgDeleteGLES2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); ++ nvgDeleteGLES2(internal->o_vg != nullptr ? internal->o_vg : vg); #else - scrollDelta = scrollDelta.mult(50.0); -+ nvgDeleteGL2(window->internal->r_fbVg); ++ nvgDeleteGL2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); ++ nvgDeleteGL2(internal->o_vg != nullptr ? internal->o_vg : vg); #endif ++ } ++ } - APP->event->handleScroll(APP->window->internal->lastMousePos, scrollDelta); -+ window->internal->ui = nullptr; -+ window->internal->callback = nullptr; -+ } ++ delete internal; } -- + -static void charCallback(GLFWwindow* win, unsigned int codepoint) { - contextSet((Context*) glfwGetWindowUserPointer(win)); - if (APP->event->handleText(APP->window->internal->lastMousePos, codepoint)) - return; -+void WindowSetMods(Window* const window, const int mods) -+{ -+ window->internal->mods = mods; ++math::Vec Window::getSize() { ++ return internal->size; } -- + -static void keyCallback(GLFWwindow* win, int key, int scancode, int action, int mods) { - contextSet((Context*) glfwGetWindowUserPointer(win)); - if (APP->event->handleKey(APP->window->internal->lastMousePos, key, scancode, action, mods)) - return; -- ++void Window::setSize(math::Vec size) { ++ size = size.max(WINDOW_SIZE_MIN); ++ internal->size = size; + - // Keyboard/mouse MIDI driver - if (action == GLFW_PRESS && (mods & RACK_MOD_MASK) == 0) { - keyboard::press(key); - } - if (action == GLFW_RELEASE) { - keyboard::release(key); -+Window::~Window() { -+ { -+ DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); -+ internal->hiddenWindow.close(); -+ internal->hiddenApp.idle(); -+ -+ // Fonts and Images in the cache must be deleted before the NanoVG context is deleted -+ internal->fontCache.clear(); -+ internal->imageCache.clear(); -+ -+#if defined NANOVG_GLES2 -+ nvgDeleteGLES2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); -+ nvgDeleteGLES2(internal->o_vg != nullptr ? internal->o_vg : vg); -+#else -+ nvgDeleteGL2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); -+ nvgDeleteGL2(internal->o_vg != nullptr ? internal->o_vg : vg); -+#endif - } --} -- +- } ++ if (DISTRHO_NAMESPACE::UI* const ui = internal->ui) ++ ui->setSize(internal->size.x, internal->size.y); + } +- -static void dropCallback(GLFWwindow* win, int count, const char** paths) { - contextSet((Context*) glfwGetWindowUserPointer(win)); - std::vector pathsVec; @@ -457,24 +485,23 @@ - pathsVec.push_back(paths[i]); - } - APP->event->handleDrop(APP->window->internal->lastMousePos, pathsVec); -+ delete internal; ++void WindowSetInternalSize(rack::window::Window* const window, math::Vec size) { ++ size = size.max(WINDOW_SIZE_MIN); ++ window->internal->size = size; } -static void errorCallback(int error, const char* description) { - WARN("GLFW error %d: %s", error, description); -+math::Vec Window::getSize() { -+ return internal->size; ++void Window::run() { ++ internal->frame = 0; } -Window::Window() { - internal = new Internal; - int err; -+void Window::setSize(math::Vec size) { -+ size = size.max(WINDOW_SIZE_MIN); -+ internal->size = size; - +- - // Set window hints -#if defined NANOVG_GL2 - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); @@ -555,17 +582,10 @@ - const GLubyte* version = glGetString(GL_VERSION); - INFO("Renderer: %s %s", vendor, renderer); - INFO("OpenGL: %s", version); -+ if (DISTRHO_NAMESPACE::UI* const ui = internal->ui) -+ ui->setSize(internal->size.x, internal->size.y); -+} - +- - // GLEW generates GL error because it calls glGetString(GL_EXTENSIONS), we'll consume it here. - glGetError(); -+void WindowSetInternalSize(rack::window::Window* const window, math::Vec size) { -+ size = size.max(WINDOW_SIZE_MIN); -+ window->internal->size = size; -+} - +- - // Set up NanoVG - int nvgFlags = NVG_ANTIALIAS; -#if defined NANOVG_GL2 @@ -580,7 +600,7 @@ - osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Could not initialize NanoVG. Does your graphics card support OpenGL 2.0 or greater? If so, make sure you have the latest graphics drivers installed."); - throw Exception("Could not initialize NanoVG"); - } - +- - // Load default Blendish font - uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); - bndSetFont(uiFont->handle); @@ -588,16 +608,6 @@ - if (APP->scene) { - widget::Widget::ContextCreateEvent e; - APP->scene->onContextCreate(e); -- } -+void Window::run() { -+ internal->frame = 0; - } - - --Window::~Window() { -- if (APP->scene) { -- widget::Widget::ContextDestroyEvent e; -- APP->scene->onContextDestroy(e); +#ifndef DGL_USE_GLES +static void Window__flipBitmap(uint8_t* pixels, const int width, const int height, const int depth) { + for (int y = 0; y < height / 2; y++) { @@ -607,33 +617,13 @@ + std::memmove(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); + std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); } -- -- // Fonts and Images in the cache must be deleted before the NanoVG context is deleted -- internal->fontCache.clear(); -- internal->imageCache.clear(); -- -- // nvgDeleteClone(fbVg); -- --#if defined NANOVG_GL2 -- nvgDeleteGL2(vg); -- nvgDeleteGL2(fbVg); --#elif defined NANOVG_GL3 -- nvgDeleteGL3(vg); --#elif defined NANOVG_GLES2 -- nvgDeleteGLES2(vg); --#endif -- -- glfwDestroyWindow(win); -- delete internal; } --math::Vec Window::getSize() { -- int width, height; -- glfwGetWindowSize(win, &width, &height); -- return math::Vec(width, height); --} -- +-Window::~Window() { +- if (APP->scene) { +- widget::Widget::ContextDestroyEvent e; +- APP->scene->onContextDestroy(e); +#ifdef STBI_WRITE_NO_STDIO +static void Window__downscaleBitmap(uint8_t* pixels, int& width, int& height) { + int targetWidth = width; @@ -660,21 +650,40 @@ + const int xs = static_cast(x * scale); + std::memmove(pixels + (width * y + x) * 3, pixels + (width * ys + xs) * 3, 3); + } -+ } + } --void Window::setSize(math::Vec size) { -- size = size.max(WINDOW_SIZE_MIN); -- glfwSetWindowSize(win, size.x, size.y); +- // Fonts and Images in the cache must be deleted before the NanoVG context is deleted +- internal->fontCache.clear(); +- internal->imageCache.clear(); +- +- // nvgDeleteClone(fbVg); +- +-#if defined NANOVG_GL2 +- nvgDeleteGL2(vg); +- nvgDeleteGL2(fbVg); +-#elif defined NANOVG_GL3 +- nvgDeleteGL3(vg); +-#elif defined NANOVG_GLES2 +- nvgDeleteGLES2(vg); +-#endif +- +- glfwDestroyWindow(win); +- delete internal; +-} +- +- +-math::Vec Window::getSize() { +- int width, height; +- glfwGetWindowSize(win, &width, &height); +- return math::Vec(width, height); + width = targetWidth; + height = targetHeight; } - --void Window::run() { -- internal->frame = 0; -- while (!glfwWindowShouldClose(win)) { -- step(); -- } +-void Window::setSize(math::Vec size) { +- size = size.max(WINDOW_SIZE_MIN); +- glfwSetWindowSize(win, size.x, size.y); +static void Window__writeImagePNG(void* context, void* data, int size) { + USE_NAMESPACE_DISTRHO + UI* const ui = static_cast(context); @@ -684,9 +693,19 @@ +#endif - void Window::step() { +-void Window::run() { +- internal->frame = 0; +- while (!glfwWindowShouldClose(win)) { +- step(); +- } +-} ++void Window::step() { + DISTRHO_SAFE_ASSERT_RETURN(internal->ui != nullptr,); -+ + ++ if (vg == nullptr) ++ return; + +-void Window::step() { double frameTime = system::getTime(); double lastFrameTime = internal->frameTime; internal->frameTime = frameTime; @@ -729,7 +748,7 @@ if (APP->patch->path != "") { windowTitle += " - "; if (!APP->history->isSaved()) -@@ -455,246 +458,189 @@ +@@ -455,246 +480,189 @@ windowTitle += system::getFilename(APP->patch->path); } if (windowTitle != internal->lastWindowTitle) { @@ -857,7 +876,7 @@ + // glReadPixels defaults to GL_BACK, but the back-buffer is unstable, so use the front buffer (what the user sees) + glReadBuffer(GL_FRONT); + glReadPixels(0, 0, winWidth, winHeight, depth == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, pixels); - ++ + if (internal->generateScreenshotStep == kScreenshotStepSaving) + { + // Write pixels to PNG @@ -873,6 +892,11 @@ + stbi_write_png("screenshot.png", winWidth, winHeight, depth, pixelsWithOffset, stride); +#endif ++ internal->generateScreenshotStep = kScreenshotStepNone; ++ APP->scene->menuBar->show(); ++ APP->scene->rack->children.front()->show(); ++ } + -static void flipBitmap(uint8_t* pixels, int width, int height, int depth) { - for (int y = 0; y < height / 2; y++) { - int flipY = height - y - 1; @@ -880,11 +904,6 @@ - std::memcpy(tmp, &pixels[y * width * depth], width * depth); - std::memcpy(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); - std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); -+ internal->generateScreenshotStep = kScreenshotStepNone; -+ APP->scene->menuBar->show(); -+ APP->scene->rack->children.front()->show(); -+ } -+ + delete[] pixels; } +#endif @@ -1078,7 +1097,7 @@ double Window::getMonitorRefreshRate() { return internal->monitorRefreshRate; } -@@ -722,14 +668,15 @@ +@@ -722,14 +690,15 @@ return pair->second; // Load font @@ -1097,7 +1116,7 @@ } internal->fontCache[filename] = font; return font; -@@ -742,14 +689,15 @@ +@@ -742,14 +711,15 @@ return pair->second; // Load image @@ -1116,7 +1135,7 @@ } internal->imageCache[filename] = image; return image; -@@ -766,28 +714,156 @@ +@@ -766,28 +736,156 @@ } diff --git a/src/override/diffs/blendish.c.diff b/src/override/diffs/blendish.c.diff index 69f860af..90a2481b 100644 --- a/src/override/diffs/blendish.c.diff +++ b/src/override/diffs/blendish.c.diff @@ -1,5 +1,5 @@ ---- ../Rack/dep/oui-blendish/blendish.c 2022-04-11 20:05:39.202902589 +0100 -+++ blendish.c 2022-04-11 19:51:05.409742542 +0100 +--- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 19:49:29.973066921 +0100 ++++ blendish.c 2022-09-21 19:41:45.883648777 +0100 @@ -61,7 +61,7 @@ } diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index 78d1a3d6..3a415867 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/common.cpp 2022-04-11 20:05:02.007283878 +0100 -+++ common.cpp 2022-07-12 09:45:31.518663160 +0100 +--- ../Rack/src/common.cpp 2022-09-21 19:49:12.199540706 +0100 ++++ common.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,33 +1,77 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/context.cpp.diff b/src/override/diffs/context.cpp.diff index 875e354b..8b6fa4d4 100644 --- a/src/override/diffs/context.cpp.diff +++ b/src/override/diffs/context.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/context.cpp 2022-04-11 20:05:02.007283878 +0100 -+++ context.cpp 2022-04-11 19:51:05.409742542 +0100 +--- ../Rack/src/context.cpp 2022-09-21 19:49:12.199540706 +0100 ++++ context.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/minblep.cpp.diff b/src/override/diffs/minblep.cpp.diff new file mode 100644 index 00000000..5d549e80 --- /dev/null +++ b/src/override/diffs/minblep.cpp.diff @@ -0,0 +1,62 @@ +--- ../Rack/src/dsp/minblep.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ minblep.cpp 2022-09-21 19:41:45.884648820 +0100 +@@ -1,3 +1,30 @@ ++/* ++ * DISTRHO Cardinal Plugin ++ * Copyright (C) 2021-2022 Filipe Coelho ++ * ++ * 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. ++ */ ++ ++/** ++ * This file is an edited version of VCVRack's dsp/minblep.cpp ++ * Copyright (C) 2016-2021 VCV. ++ * ++ * 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 (at your option) any later version. ++ */ ++ + #include + #include + #include +@@ -10,7 +37,7 @@ + void minBlepImpulse(int z, int o, float* output) { + // Symmetric sinc array with `z` zero-crossings on each side + int n = 2 * z * o; +- float* x = new float[n]; ++ float* x = (float*) pffft_aligned_malloc(sizeof(float) * n); + for (int i = 0; i < n; i++) { + float p = math::rescale((float) i, 0.f, (float)(n - 1), (float) - z, (float) z); + x[i] = sinc(p); +@@ -20,7 +47,7 @@ + blackmanHarrisWindow(x, n); + + // Real cepstrum +- float* fx = new float[2 * n]; ++ float* fx = (float*) pffft_aligned_malloc(sizeof(float) * 2 * n); + // Valgrind complains that the array is uninitialized for some reason, unless we clear it. + std::memset(fx, 0, sizeof(float) * 2 * n); + RealFFT rfft(n); +@@ -75,8 +102,8 @@ + std::memcpy(output, x, n * sizeof(float)); + + // Cleanup +- delete[] x; +- delete[] fx; ++ pffft_aligned_free(x); ++ pffft_aligned_free(fx); + } + + diff --git a/src/override/diffs/plugin.cpp.diff b/src/override/diffs/plugin.cpp.diff index 6e8392e6..e95f3772 100644 --- a/src/override/diffs/plugin.cpp.diff +++ b/src/override/diffs/plugin.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin.cpp 2022-07-12 09:46:20.716165650 +0100 -+++ plugin.cpp 2022-05-27 23:15:35.681273727 +0100 +--- ../Rack/src/plugin.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ plugin.cpp 2022-09-21 19:41:45.884648820 +0100 @@ -1,342 +1,41 @@ -#include -#include From 7655bb5f0b73bafe8380619bea866d9f48fd91d5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 18:16:45 +0000 Subject: [PATCH 102/451] Import Vector.hpp fix from Rack, before 2.2 update Signed-off-by: falkTX --- include/simd/Vector.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/simd/Vector.hpp b/include/simd/Vector.hpp index 7dd77ada..3ca26d59 100644 --- a/include/simd/Vector.hpp +++ b/include/simd/Vector.hpp @@ -359,12 +359,12 @@ inline Vector operator~(const Vector& a) { /** `a << b` */ inline Vector operator<<(const Vector& a, const int& b) { - return Vector(_mm_slli_epi32(a.v, b)); + return Vector(_mm_sll_epi32(a.v, _mm_cvtsi32_si128(b))); } /** `a >> b` */ inline Vector operator>>(const Vector& a, const int& b) { - return Vector(_mm_srli_epi32(a.v, b)); + return Vector(_mm_srl_epi32(a.v, _mm_cvtsi32_si128(b))); } From 16acb8079a7c60e8a51fa7ae62b3b09c5a8e8bee Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 18:25:30 +0000 Subject: [PATCH 103/451] Cleanup Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 2 +- src/CardinalRemote/main.cpp | 2 +- src/override/plugin.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 4357c220..b19fd77f 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -255,7 +255,7 @@ struct Initializer factoryTemplatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); // Log environment - INFO("%s %s %s, compatible with Rack v%s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); + INFO("%s %s %s, compatible with Rack version %s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); INFO("%s", system::getOperatingSystemInfo().c_str()); INFO("Binary filename: %s", getBinaryFilename()); INFO("Bundle path: %s", plugin->getBundlePath()); diff --git a/src/CardinalRemote/main.cpp b/src/CardinalRemote/main.cpp index 4ac0be22..a2329fea 100644 --- a/src/CardinalRemote/main.cpp +++ b/src/CardinalRemote/main.cpp @@ -106,7 +106,7 @@ int main(const int argc, const char* argv[]) asset::userDir = asset::systemDir; // Log environment - INFO("%s %s v%s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str()); + INFO("%s %s version %s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str()); INFO("%s", system::getOperatingSystemInfo().c_str()); // INFO("Binary filename: %s", getBinaryFilename()); INFO("System directory: %s", asset::systemDir.c_str()); diff --git a/src/override/plugin.cpp b/src/override/plugin.cpp index a23b26cb..058c4b4c 100644 --- a/src/override/plugin.cpp +++ b/src/override/plugin.cpp @@ -47,6 +47,7 @@ static const std::map pluginSlugFallbacks = { {"VultModules", "VultModulesFree"}, {"AudibleInstrumentsPreview", "AudibleInstruments"}, {"SequelSequencers", "DanielDavies"}, + {"DelexanderVol1", "DelexandraVol1"}, // {"", ""}, }; From 8cdc958c1e91143d72f555ea285067c6cf5c0d9d Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 19:35:55 +0000 Subject: [PATCH 104/451] Standardize native audio behaviour for all systems Signed-off-by: falkTX --- dpf | 2 +- include/simd-compat/pmmintrin.h | 5 ++++- src/override/MenuBar.cpp | 8 +++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dpf b/dpf index 85cd6c40..cfbc53bf 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 85cd6c40df9b80db20c54c5e558ba3eccf34aef9 +Subproject commit cfbc53bf939794fe99c57a4a8e000ec360e14262 diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index fe72b9e0..1f7da292 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -30,7 +30,10 @@ # undef _WIN32 # endif -# include "../simde/simde/x86/sse3.h" +// assume SSE3 only on macOS +# ifndef ARCH_MAC +# include "../simde/simde/x86/sse3.h" +# endif # ifdef _WIN32_WAS_DEFINED # define _WIN32 diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 1b2326ea..c848e05c 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -670,7 +670,13 @@ struct EngineButton : MenuButton { } if (supportsBufferSizeChanges()) { - static const std::vector bufferSizes = {256, 512, 1024, 2048, 4096, 8192, 16384}; + static const std::vector bufferSizes = { + #ifdef DISTRHO_OS_WASM + 256, 512, 1024, 2048, 4096, 8192, 16384 + #else + 128, 256, 512, 1024, 2048, 4096, 8192 + #endif + }; const uint32_t currentBufferSize = getBufferSize(); menu->addChild(createSubmenuItem("Buffer Size", std::to_string(currentBufferSize), [=](ui::Menu* menu) { for (uint32_t bufferSize : bufferSizes) { From e22d492ea1ca889300b5ba29cae818fbec50ac0c Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 25 Nov 2022 23:27:26 +0000 Subject: [PATCH 105/451] Memory alignment is needed on macOS after all Signed-off-by: falkTX --- dpf | 2 +- include/engine/Port.hpp | 4 ---- include/simd/Vector.hpp | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/dpf b/dpf index cfbc53bf..2f9564a2 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit cfbc53bf939794fe99c57a4a8e000ec360e14262 +Subproject commit 2f9564a28e6e1b69f7e28b5e80ee0096fd283233 diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index 12eb1364..98a3a418 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -33,11 +33,7 @@ #include /** NOTE alignas is required in some systems in order to allow SSE usage. */ -#ifndef ARCH_MAC #define SIMD_ALIGN alignas(32) -#else -#define SIMD_ALIGN -#endif namespace rack { diff --git a/include/simd/Vector.hpp b/include/simd/Vector.hpp index 3ca26d59..520bfa03 100644 --- a/include/simd/Vector.hpp +++ b/include/simd/Vector.hpp @@ -31,11 +31,7 @@ #include /** NOTE alignas is required in some systems in order to allow SSE usage. */ -#ifndef ARCH_MAC #define SIMD_ALIGN alignas(32) -#else -#define SIMD_ALIGN -#endif namespace rack { From d02a5c6796a0679e28baf0c6b140b613e6936efe Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Nov 2022 00:16:14 +0000 Subject: [PATCH 106/451] Handle plaits first playback returning -1 active engine Signed-off-by: falkTX --- plugins/AudibleInstruments | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/AudibleInstruments b/plugins/AudibleInstruments index 2a19bb25..1f279a02 160000 --- a/plugins/AudibleInstruments +++ b/plugins/AudibleInstruments @@ -1 +1 @@ -Subproject commit 2a19bb25c0da725756390ad96dca55632800c74d +Subproject commit 1f279a02d955667341d08f74ddf2054d10e82c65 From cd99938fa8f16b8105227845d1d7db1472d50c32 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Nov 2022 00:17:57 +0000 Subject: [PATCH 107/451] Assume 128 buffer size for ildaeil and host audio peaks Signed-off-by: falkTX --- plugins/Cardinal/src/HostAudio.cpp | 19 ++++++------------- plugins/Cardinal/src/Ildaeil.cpp | 8 ++++---- plugins/Cardinal/src/plugin.hpp | 11 ++++------- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index 482a8f45..dd3e584a 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -127,20 +127,13 @@ struct HostAudio2 : HostAudio<2> { #ifndef HEADLESS // for stereo meter uint32_t internalDataFrame = 0; - float internalDataBuffer[2][128]; + float internalDataBufferL[128] = {}; + float internalDataBufferR[128] = {}; volatile bool resetMeters = true; float gainMeterL = 0.0f; float gainMeterR = 0.0f; #endif - HostAudio2() - : HostAudio<2>() - { -#ifndef HEADLESS - std::memset(internalDataBuffer, 0, sizeof(internalDataBuffer)); -#endif - } - #ifndef HEADLESS void onReset() override { @@ -230,8 +223,8 @@ struct HostAudio2 : HostAudio<2> { } const uint32_t j = internalDataFrame++; - internalDataBuffer[0][j] = valueL; - internalDataBuffer[1][j] = valueR; + internalDataBufferL[j] = valueL; + internalDataBufferR[j] = valueR; if (internalDataFrame == 128) { @@ -240,10 +233,10 @@ struct HostAudio2 : HostAudio<2> { if (resetMeters) gainMeterL = gainMeterR = 0.0f; - gainMeterL = std::max(gainMeterL, d_findMaxNormalizedFloat(internalDataBuffer[0], 128)); + gainMeterL = std::max(gainMeterL, d_findMaxNormalizedFloat128(internalDataBufferL)); if (in2connected) - gainMeterR = std::max(gainMeterR, d_findMaxNormalizedFloat(internalDataBuffer[1], 128)); + gainMeterR = std::max(gainMeterR, d_findMaxNormalizedFloat128(internalDataBufferR)); else gainMeterR = gainMeterL; diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 7cc21926..85690040 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -488,16 +488,16 @@ struct IldaeilModule : Module { if (resetMeterIn) meterInL = meterInR = 0.0f; - meterInL = std::max(meterInL, d_findMaxNormalizedFloat(audioDataIn1, BUFFER_SIZE)); - meterInR = std::max(meterInR, d_findMaxNormalizedFloat(audioDataIn2, BUFFER_SIZE)); + meterInL = std::max(meterInL, d_findMaxNormalizedFloat128(audioDataIn1)); + meterInR = std::max(meterInR, d_findMaxNormalizedFloat128(audioDataIn2)); fCarlaPluginDescriptor->process(fCarlaPluginHandle, ins, outs, BUFFER_SIZE, midiEvents, midiEventCount); if (resetMeterOut) meterOutL = meterOutR = 0.0f; - meterOutL = std::max(meterOutL, d_findMaxNormalizedFloat(audioDataOut1, BUFFER_SIZE)); - meterOutR = std::max(meterOutR, d_findMaxNormalizedFloat(audioDataOut2, BUFFER_SIZE)); + meterOutL = std::max(meterOutL, d_findMaxNormalizedFloat128(audioDataOut1)); + meterOutR = std::max(meterOutR, d_findMaxNormalizedFloat128(audioDataOut2)); resetMeterIn = resetMeterOut = false; } diff --git a/plugins/Cardinal/src/plugin.hpp b/plugins/Cardinal/src/plugin.hpp index 96a5a9bb..304a3f8e 100644 --- a/plugins/Cardinal/src/plugin.hpp +++ b/plugins/Cardinal/src/plugin.hpp @@ -56,19 +56,16 @@ extern std::vector hostTerminalModels; * Find the highest absolute and normalized value within a float array. */ static inline -float d_findMaxNormalizedFloat(const float floats[], const std::size_t count) +float d_findMaxNormalizedFloat128(const float floats[128]) { - DISTRHO_SAFE_ASSERT_RETURN(floats != nullptr, 0.0f); - DISTRHO_SAFE_ASSERT_RETURN(count > 0, 0.0f); + static constexpr const float kEmptyFloats[128] = {}; - static constexpr const float kEmptyFloats[8192] = {}; - - if (count <= 8192 && std::memcmp(floats, kEmptyFloats, count) == 0) + if (std::memcmp(floats, kEmptyFloats, sizeof(float)*128) == 0) return 0.0f; float tmp, maxf2 = std::abs(floats[0]); - for (std::size_t i=1; i Date: Sat, 26 Nov 2022 01:23:56 +0000 Subject: [PATCH 108/451] Fix possible out of bounds read on host audio 2 meters Signed-off-by: falkTX --- plugins/Cardinal/src/plugin.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Cardinal/src/plugin.hpp b/plugins/Cardinal/src/plugin.hpp index 304a3f8e..1e922d19 100644 --- a/plugins/Cardinal/src/plugin.hpp +++ b/plugins/Cardinal/src/plugin.hpp @@ -70,7 +70,7 @@ float d_findMaxNormalizedFloat128(const float floats[128]) if (!std::isfinite(floats[i])) __builtin_unreachable(); - tmp = std::abs(*floats++); + tmp = std::abs(floats[i]); if (tmp > maxf2) maxf2 = tmp; From f3fb9a779d5ed6159344ec5ac048f227a5b26922 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 26 Nov 2022 10:15:14 +0000 Subject: [PATCH 109/451] Fix out of bounds read in drumkit modules Signed-off-by: falkTX --- dpf | 2 +- plugins/DrumKit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dpf b/dpf index 2f9564a2..5ee7fab8 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 2f9564a28e6e1b69f7e28b5e80ee0096fd283233 +Subproject commit 5ee7fab819433f1338e5290a0e03b358c59c44f3 diff --git a/plugins/DrumKit b/plugins/DrumKit index d44b52e9..f2a7d717 160000 --- a/plugins/DrumKit +++ b/plugins/DrumKit @@ -1 +1 @@ -Subproject commit d44b52e9bf8915c06382bfd1a41a460bafbfd671 +Subproject commit f2a7d717e2ae066ba0127fa5ffade775baba1512 From afdd6e0e91a233f679c6240f05ddedc39594d687 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Sat, 26 Nov 2022 09:32:10 +0100 Subject: [PATCH 110/451] feat: add example patch with a classic subtractive polysynth setup Signed-off-by: Christopher Arndt --- .../SpotlightKid_-_Classic-Polysynth.vcv | 743 ++++++++++++++++++ 1 file changed, 743 insertions(+) create mode 100644 patches/examples/SpotlightKid_-_Classic-Polysynth.vcv diff --git a/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv b/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv new file mode 100644 index 00000000..11cc76fc --- /dev/null +++ b/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv @@ -0,0 +1,743 @@ +{ + "version": "2.1.2", + "zoom": 1.0, + "modules": [ + { + "id": 5726895899473528, + "plugin": "Fundamental", + "model": "ADSR", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.73012268543243408, + "id": 1 + }, + { + "value": 0.73614501953125, + "id": 2 + }, + { + "value": 0.70723104476928711, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + } + ], + "leftModuleId": 5337037007035013, + "rightModuleId": 4828178296911509, + "pos": [ + 58, + 0 + ] + }, + { + "id": 4828178296911509, + "plugin": "Fundamental", + "model": "VCA-1", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + } + ], + "leftModuleId": 5726895899473528, + "rightModuleId": 6408981600715695, + "pos": [ + 67, + 0 + ] + }, + { + "id": 5337037007035013, + "plugin": "Fundamental", + "model": "ADSR", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.69156646728515625, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.65542322397232056, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + } + ], + "leftModuleId": 8662611283913679, + "rightModuleId": 5726895899473528, + "pos": [ + 49, + 0 + ] + }, + { + "id": 5012071172439093, + "plugin": "Bogaudio", + "model": "Bogaudio-VCO", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": -0.10602404922246933, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": -0.66505992412567139, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 1.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + } + ], + "leftModuleId": 7829403555464046, + "rightModuleId": 3498834829604531, + "data": { + "poly_input": 0, + "dc_correction": true + }, + "pos": [ + 9, + 0 + ] + }, + { + "id": 3498834829604531, + "plugin": "Bogaudio", + "model": "Bogaudio-VCO", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.10602407157421112, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 1.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + } + ], + "leftModuleId": 5012071172439093, + "rightModuleId": 6599230938402504, + "data": { + "poly_input": 0, + "dc_correction": true + }, + "pos": [ + 19, + 0 + ] + }, + { + "id": 6408981600715695, + "plugin": "Bogaudio", + "model": "Bogaudio-LFO", + "version": "2.0", + "params": [ + { + "value": 1.4879528284072876, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + } + ], + "leftModuleId": 4828178296911509, + "rightModuleId": 1204823109328701, + "data": { + "offset_cv_to_smoothing": false + }, + "pos": [ + 70, + 0 + ] + }, + { + "id": 8662611283913679, + "plugin": "Bogaudio", + "model": "Bogaudio-VCF", + "version": "2.0", + "params": [ + { + "value": 0.10240961611270905, + "id": 0 + }, + { + "value": 0.21445769071578979, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.33428090810775757, + "id": 5 + } + ], + "leftModuleId": 6599230938402504, + "rightModuleId": 5337037007035013, + "data": { + "bandwidthMode": "pitched" + }, + "pos": [ + 39, + 0 + ] + }, + { + "id": 1204823109328701, + "plugin": "Fundamental", + "model": "8vert", + "version": "2.0", + "params": [ + { + "value": 0.16385534405708313, + "id": 0 + }, + { + "value": 0.099999845027923584, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 6408981600715695, + "pos": [ + 80, + 0 + ] + }, + { + "id": 6599230938402504, + "plugin": "Bogaudio", + "model": "Bogaudio-VCM", + "version": "2.0", + "params": [ + { + "value": 0.89999997615814209, + "id": 0 + }, + { + "value": 0.89999997615814209, + "id": 1 + }, + { + "value": 0.89999997615814209, + "id": 2 + }, + { + "value": 0.89999997615814209, + "id": 3 + }, + { + "value": 0.80000001192092896, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + } + ], + "leftModuleId": 3498834829604531, + "rightModuleId": 8662611283913679, + "data": { + "disableOutputLimit": false + }, + "pos": [ + 29, + 0 + ] + }, + { + "id": 7829403555464046, + "plugin": "Bogaudio", + "model": "Bogaudio-Matrix44", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.070000037550926208, + "id": 1 + }, + { + "value": 0.035000000149011612, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 1.0, + "id": 4 + }, + { + "value": -0.069999769330024719, + "id": 5 + }, + { + "value": 0.035000000149011612, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + } + ], + "rightModuleId": 5012071172439093, + "data": { + "clipping_mode": 0, + "input_gain_db": 0.0, + "sum": true, + "indicator_knobs": true, + "unipolar": false + }, + "pos": [ + -1, + 0 + ] + }, + { + "id": 2610715620592544, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "data": { + "filepath": "", + "lang": "None", + "etext": "A classic polyphonic 2-oscillator synthesizer\n---------------------------------------------\n\n* 2 VCOs with blendable sawtooth and pulse waves\n* 1 multi-mode filter\n* 1 filter envelope\n* 1 VCA envelope\n* 1 multi-waveform LFO\n\nNotes:\n\n* The LFO is patched to oscillator pitch by default.\n The amount can be controlled via the 2A and 2B level\n knobs of the \"Matrix44\" mixer module.\n* You can control additional destinations with the LFO by \n patching its output(s) into the \"Matrix44\" module's input \n (optionally via the \"8Vert\" attenuator module) and\n then the outputs of the \"Matrix44\" module into the \n destinations. Then use its corresponding level knobs to \n control the amount.\n* The pitch bend amount can be controlled via the 3A and 3B\n level knobs of the \"Matrix44\" module (3.5% is roughly 2\n semitones).\n* The number of polyphonic voices can be set via the \n context menu of the \"Cardinal Host MIDI\" module.\n\n\n\n\n\n", + "width": 30 + }, + "pos": [ + 45, + 1 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.70632630586624146, + "id": 0 + } + ], + "data": { + "dcFilter": true + }, + "pos": [ + 80, + 1 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "rightModuleId": 4, + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 6, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + -1, + 1 + ] + }, + { + "id": 4, + "plugin": "Cardinal", + "model": "HostParameters", + "version": "2.0", + "params": [], + "leftModuleId": 2, + "data": { + "smooth": true + }, + "pos": [ + 8, + 1 + ] + } + ], + "cables": [ + { + "id": 5155876120487880, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 5726895899473528, + "inputId": 4, + "color": "#ff9352" + }, + { + "id": 781753834216137, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 5726895899473528, + "inputId": 5, + "color": "#ffd452" + }, + { + "id": 3464471860196875, + "outputModuleId": 5726895899473528, + "outputId": 0, + "inputModuleId": 4828178296911509, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 3735627013913285, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 5337037007035013, + "inputId": 4, + "color": "#ff9352" + }, + { + "id": 580842343744148, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 5337037007035013, + "inputId": 5, + "color": "#ffd452" + }, + { + "id": 3568029120047108, + "outputModuleId": 8662611283913679, + "outputId": 0, + "inputModuleId": 4828178296911509, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 498514594501880, + "outputModuleId": 5337037007035013, + "outputId": 0, + "inputModuleId": 8662611283913679, + "inputId": 0, + "color": "#a8ff52" + }, + { + "id": 1797497447138497, + "outputModuleId": 6408981600715695, + "outputId": 3, + "inputModuleId": 1204823109328701, + "inputId": 0, + "color": "#6752ff" + }, + { + "id": 4517203320689158, + "outputModuleId": 6408981600715695, + "outputId": 3, + "inputModuleId": 1204823109328701, + "inputId": 1, + "color": "#e952ff" + }, + { + "id": 3320898588984728, + "outputModuleId": 4828178296911509, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 6368912553945733, + "outputModuleId": 5012071172439093, + "outputId": 0, + "inputModuleId": 6599230938402504, + "inputId": 0, + "color": "#ffd452" + }, + { + "id": 7452422491828867, + "outputModuleId": 5012071172439093, + "outputId": 1, + "inputModuleId": 6599230938402504, + "inputId": 2, + "color": "#527dff" + }, + { + "id": 8322447986534562, + "outputModuleId": 3498834829604531, + "outputId": 0, + "inputModuleId": 6599230938402504, + "inputId": 4, + "color": "#67ff52" + }, + { + "id": 7931051349285735, + "outputModuleId": 3498834829604531, + "outputId": 1, + "inputModuleId": 6599230938402504, + "inputId": 6, + "color": "#52ffff" + }, + { + "id": 6034011788891270, + "outputModuleId": 4, + "outputId": 0, + "inputModuleId": 6599230938402504, + "inputId": 1, + "color": "#e952ff" + }, + { + "id": 5198909862757200, + "outputModuleId": 4, + "outputId": 1, + "inputModuleId": 6599230938402504, + "inputId": 3, + "color": "#ff52d4" + }, + { + "id": 8852665925615104, + "outputModuleId": 4, + "outputId": 2, + "inputModuleId": 6599230938402504, + "inputId": 5, + "color": "#ff9352" + }, + { + "id": 8906204691632270, + "outputModuleId": 4, + "outputId": 3, + "inputModuleId": 6599230938402504, + "inputId": 7, + "color": "#ffd452" + }, + { + "id": 5415548314308516, + "outputModuleId": 6599230938402504, + "outputId": 0, + "inputModuleId": 8662611283913679, + "inputId": 3, + "color": "#e8ff52" + }, + { + "id": 8251957244621037, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 7829403555464046, + "inputId": 0, + "color": "#52ff7d" + }, + { + "id": 696754494174847, + "outputModuleId": 1204823109328701, + "outputId": 1, + "inputModuleId": 7829403555464046, + "inputId": 1, + "color": "#527dff" + }, + { + "id": 8414987939373829, + "outputModuleId": 7829403555464046, + "outputId": 0, + "inputModuleId": 5012071172439093, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 3908893753031146, + "outputModuleId": 7829403555464046, + "outputId": 1, + "inputModuleId": 3498834829604531, + "inputId": 0, + "color": "#a852ff" + }, + { + "id": 5892222261492300, + "outputModuleId": 2, + "outputId": 4, + "inputModuleId": 7829403555464046, + "inputId": 2, + "color": "#e952ff" + } + ] +} From ca67db4964c5f61ef08d8baefa964281ea8460e7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 27 Nov 2022 00:48:05 +0000 Subject: [PATCH 111/451] Enable LTO in preparation for release Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 734b7d90..9ce78163 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 35 + CACHE_VERSION: 36 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'false' + WITH_LTO: 'true' jobs: linux-arm64: From 51940c50927cac22bfea24863ccdc2f083d0800c Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Sun, 27 Nov 2022 00:35:48 +0100 Subject: [PATCH 112/451] fix: classic polysynth example produced no sound without host automation Signed-off-by: Christopher Arndt --- .../SpotlightKid_-_Classic-Polysynth.vcv | 44 +++---------------- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv b/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv index 11cc76fc..c44e21f7 100644 --- a/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv +++ b/patches/examples/SpotlightKid_-_Classic-Polysynth.vcv @@ -21,7 +21,7 @@ "id": 2 }, { - "value": 0.70723104476928711, + "value": 0.64457994699478149, "id": 3 }, { @@ -268,11 +268,11 @@ "version": "2.0", "params": [ { - "value": 0.10240961611270905, + "value": 0.17951798439025879, "id": 0 }, { - "value": 0.21445769071578979, + "value": 0.27710825204849243, "id": 1 }, { @@ -354,7 +354,7 @@ "version": "2.0", "params": [ { - "value": 0.89999997615814209, + "value": 0.0, "id": 0 }, { @@ -362,7 +362,7 @@ "id": 1 }, { - "value": 0.89999997615814209, + "value": 0.0, "id": 2 }, { @@ -481,7 +481,7 @@ "data": { "filepath": "", "lang": "None", - "etext": "A classic polyphonic 2-oscillator synthesizer\n---------------------------------------------\n\n* 2 VCOs with blendable sawtooth and pulse waves\n* 1 multi-mode filter\n* 1 filter envelope\n* 1 VCA envelope\n* 1 multi-waveform LFO\n\nNotes:\n\n* The LFO is patched to oscillator pitch by default.\n The amount can be controlled via the 2A and 2B level\n knobs of the \"Matrix44\" mixer module.\n* You can control additional destinations with the LFO by \n patching its output(s) into the \"Matrix44\" module's input \n (optionally via the \"8Vert\" attenuator module) and\n then the outputs of the \"Matrix44\" module into the \n destinations. Then use its corresponding level knobs to \n control the amount.\n* The pitch bend amount can be controlled via the 3A and 3B\n level knobs of the \"Matrix44\" module (3.5% is roughly 2\n semitones).\n* The number of polyphonic voices can be set via the \n context menu of the \"Cardinal Host MIDI\" module.\n\n\n\n\n\n", + "etext": "A classic polyphonic 2-oscillator synthesizer\n---------------------------------------------\n\n* 2 VCOs with blendable sawtooth and pulse waves\n* 1 multi-mode filter\n* 1 filter envelope\n* 1 VCA envelope\n* 1 multi-waveform LFO\n\nNotes:\n\n* The LFO is patched to oscillator pitch by default.\n The amount can be controlled via the 2A and 2B level\n knobs of the \"Matrix44\" mixer module.\n* You can control additional destinations with the LFO by \n patching its output(s) into the \"Matrix44\" module's input \n (optionally via the \"8Vert\" attenuator module) and\n then the outputs of the \"Matrix44\" module into the \n destinations. Then use its corresponding level knobs to \n control the amount.\n* The pitch bend amount can be controlled via the 3A and 3B\n level knobs of the \"Matrix44\" module (3.5% is roughly 2\n semitones).\n* The number of polyphonic voices can be set via the \n context menu of the \"Cardinal Host MIDI\" module.\n\n\n\n\n\n\n", "width": 30 }, "pos": [ @@ -659,38 +659,6 @@ "inputId": 6, "color": "#52ffff" }, - { - "id": 6034011788891270, - "outputModuleId": 4, - "outputId": 0, - "inputModuleId": 6599230938402504, - "inputId": 1, - "color": "#e952ff" - }, - { - "id": 5198909862757200, - "outputModuleId": 4, - "outputId": 1, - "inputModuleId": 6599230938402504, - "inputId": 3, - "color": "#ff52d4" - }, - { - "id": 8852665925615104, - "outputModuleId": 4, - "outputId": 2, - "inputModuleId": 6599230938402504, - "inputId": 5, - "color": "#ff9352" - }, - { - "id": 8906204691632270, - "outputModuleId": 4, - "outputId": 3, - "inputModuleId": 6599230938402504, - "inputId": 7, - "color": "#ffd452" - }, { "id": 5415548314308516, "outputModuleId": 6599230938402504, From 454573b851d8807c727bf0b4486c96eab43a5e5e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 14 Oct 2022 23:53:25 +0100 Subject: [PATCH 113/451] Turn off LTO again after release Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ce78163..734b7d90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 36 + CACHE_VERSION: 35 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'true' + WITH_LTO: 'false' jobs: linux-arm64: From d6aaff743a22cf8a379bc9091f7367a135ca7bd6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 29 Nov 2022 08:37:40 +0000 Subject: [PATCH 114/451] Update docs/DIFFERENCES.md for Rack 2.2 comparison Signed-off-by: falkTX --- docs/DIFFERENCES.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index 8ba03e03..c5c52db0 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -20,21 +20,22 @@ Bellow follows a list of features comparing the official plugin to Cardinal. | Contains internal modules | Core only | Everything is internal | | | Loads external modules | Yes | No | | | Supports closed-source modules | Yes | No | | -| Supports physical devices | Yes | No | Audio + MIDI only through the DAW/Host or via JACK in standalone | -| Plugin in AU format | No | Yes | | +| Supports physical devices | Yes | No (*) | CardinalNative binary provides native audio+midi as standalone | +| Plugin in AU format | Yes | Yes | | | Plugin in LV2 format | No | Yes | | | Plugin in VST2 format | Yes | Yes | | -| Plugin in VST3 format | No | Yes | | -| Plugin in CLAP format | No | WIP | | +| Plugin in VST3 format | Yes | Yes | | +| Plugin in CLAP format | Yes | Yes | | | Plugin inside itself | No, will crash | Yes | Technical limitations prevent Rack Pro from loading inside itself | +| Module processing order | Same as insertion order | Based on cable connections | In Cardinal module processing order changes automatically depending on cable connections | | 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 | +| Supports ARM systems | WIP | Yes | This means Apple M1 too, yes | | Supports BSD systems | No | Yes | Available as FreeBSD port | | Supports RISC-V systems | No | Yes | | | Synth plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | FX plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | Raw-CV plugin variant | Unsupported | 8 audio IO + 10 CV IO | Available in JACK, LV2 and VST3 formats, not possible in AU and VST2 | -| Arbitrary parameter automation | Yes | No | Unsupported in Cardinal, tricky to do for many plugin formats at once | +| Arbitrary parameter automation | Yes | No | | | Integrated plugin host | No, Host payed separately | Yes, using Carla or Ildaeil | | | Host sync/timing | Using MIDI signals | Using dedicated module | | | Linux/X11 event handling | Runs on 2nd thread | Runs on main/GUI thread | | From 377cf01ddc703c1d68b5ecfb0b755f3d84493c5c Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 30 Nov 2022 21:50:45 +0000 Subject: [PATCH 115/451] Add stoermelder-packone Signed-off-by: falkTX --- .gitmodules | 3 ++ plugins/Makefile | 23 +++++++++- plugins/plugins.cpp | 86 +++++++++++++++++++++++++++++++++++++ plugins/stoermelder-packone | 1 + 4 files changed, 111 insertions(+), 2 deletions(-) create mode 160000 plugins/stoermelder-packone diff --git a/.gitmodules b/.gitmodules index 028e6d86..9544b04a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -221,3 +221,6 @@ [submodule "plugins/RebelTech"] path = plugins/RebelTech url = https://github.com/hemmer/rebel-tech-vcv.git +[submodule "plugins/stoermelder-packone"] + path = plugins/stoermelder-packone + url = https://github.com/stoermelder/vcvrack-packone.git diff --git a/plugins/Makefile b/plugins/Makefile index c37314e5..bf267382 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -902,7 +902,19 @@ PLUGIN_FILES += $(filter-out sonusmodular/src/sonusmodular.cpp,$(wildcard sonusm PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/*.cpp)) # -------------------------------------------------------------- +# stoermelder-packone +STOERMELDER_PACKONE_IGNORED = AudioInterface64 MidiCat MidiKey MidiMon MidiPlug MidiStep Strip StripBay StripPp + +# FIXME +STOERMELDER_PACKONE_IGNORED += Raw + +PLUGIN_FILES += $(filter-out $(STOERMELDER_PACKONE_IGNORED:%=stoermelder-packone/src/%.cpp),$(wildcard stoermelder-packone/src/*.cpp stoermelder-packone/src/mb/*.cpp)) + +# modules/types which are present in other plugins +STOERMELDER_PACKONE_CUSTOM = + +# -------------------------------------------------------------- # unless_modules PLUGIN_FILES += $(filter-out unless_modules/src/unless.cpp,$(wildcard unless_modules/src/*.cpp)) @@ -1773,8 +1785,7 @@ $(BUILD_DIR)/ImpromptuModular/src/ImpromptuModular.cpp.o: ImpromptuModular/src/I $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM),$(call custom_module_names,$(m),ImpromptuModular)) \ -DpluginInstance=pluginInstance__ImpromptuModular \ - -Dinit=init__ImpromptuModular \ - -UBUILDING_PLUGIN_MODULES + -Dinit=init__ImpromptuModular $(BUILD_DIR)/ImpromptuModular%.cpp.o: ImpromptuModular%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @@ -2011,6 +2022,14 @@ $(BUILD_DIR)/sonusmodular/%.cpp.o: sonusmodular/%.cpp $(foreach m,$(SONUSMODULAR_CUSTOM),$(call custom_module_names,$(m),sonusmodular)) \ -DpluginInstance=pluginInstance__sonusmodular +$(BUILD_DIR)/stoermelder-packone/%.cpp.o: stoermelder-packone/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(STOERMELDER_PACKONE_CUSTOM),$(call custom_module_names,$(m),stoermelder_packone)) \ + -DpluginInstance=pluginInstance__stoermelder_packone \ + -Dinit=init__stoermelder_packone + $(BUILD_DIR)/stocaudio/%.cpp.o: stocaudio/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 1ce711b1..fe3ada9f 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -715,6 +715,21 @@ void addThemeMenuItems(Menu*, ModuleTheme*) {} // stocaudio #include "stocaudio/src/plugin.hpp" +// stoermelder-packone +#include "stoermelder-packone/src/plugin.hpp" +Model* modelAudioInterface64; +Model* modelMidiCat; +Model* modelMidiCatMem; +Model* modelMidiCatCtx; +Model* modelMidiKey; +Model* modelMidiMon; +Model* modelMidiPlug; +Model* modelMidiStep; +Model* modelRaw; +Model* modelStrip; +Model* modelStripBay4; +Model* modelStripPp; + // unless_modules #include "unless_modules/src/unless.hpp" @@ -826,6 +841,7 @@ Plugin* pluginInstance__RebelTech; Plugin* pluginInstance__repelzen; Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; +extern Plugin* pluginInstance__stoermelder_packone; Plugin* pluginInstance__unless_modules; Plugin* pluginInstance__ValleyAudio; Plugin* pluginInstance__Voxglitch; @@ -2591,6 +2607,7 @@ static void initStatic__PathSet() p->addModel(modelIceTray); p->addModel(modelAstroVibe); p->addModel(modelGlassPane); + p->addModel(modelPlusPane); p->addModel(modelNudge); p->addModel(modelOneShot); } @@ -2744,6 +2761,74 @@ static void initStatic__stocaudio() } } +static void initStatic__stoermelder_packone() +{ + Plugin* const p = new Plugin; + pluginInstance__stoermelder_packone = p; + + const StaticPluginLoader spl(p, "stoermelder-packone"); + if (spl.ok()) + { + p->addModel(modelCVMap); + p->addModel(modelCVMapCtx); + p->addModel(modelCVMapMicro); + p->addModel(modelCVPam); + p->addModel(modelRotorA); + p->addModel(modelReMoveLite); + p->addModel(modelBolt); + p->addModel(modelInfix); + p->addModel(modelInfixMicro); + p->addModel(modelEightFace); + p->addModel(modelEightFaceX2); + p->addModel(modelSipo); + p->addModel(modelFourRounds); + p->addModel(modelArena); + p->addModel(modelMaze); + p->addModel(modelHive); + p->addModel(modelIntermix); + p->addModel(modelIntermixGate); + p->addModel(modelIntermixEnv); + p->addModel(modelIntermixFade); + p->addModel(modelSail); + p->addModel(modelPile); + p->addModel(modelPilePoly); + p->addModel(modelMirror); + p->addModel(modelAffix); + p->addModel(modelAffixMicro); + p->addModel(modelGrip); + p->addModel(modelGlue); + p->addModel(modelGoto); + p->addModel(modelStroke); + p->addModel(modelSpin); + p->addModel(modelTransit); + p->addModel(modelTransitEx); + p->addModel(modelX4); + p->addModel(modelMacro); + p->addModel(modelOrbit); + p->addModel(modelEightFaceMk2); + p->addModel(modelEightFaceMk2Ex); + p->addModel(modelDirt); + p->addModel(modelMb); + p->addModel(modelMe); + + // NOTE disabled in Cardinal due to curl usage + // p->addModel(modelRaw); + spl.removeModule("Raw"); + + spl.removeModule("AudioInterface64"); + spl.removeModule("MidiCat"); + spl.removeModule("MidiCatEx"); + spl.removeModule("MidiCatCtx"); + spl.removeModule("MidiKey"); + spl.removeModule("MidiMon"); + spl.removeModule("MidiPlug"); + spl.removeModule("MidiStep"); + spl.removeModule("Strip"); + spl.removeModule("StripBay4"); + spl.removeModule("StripPp"); + } +} + static void initStatic__unless_modules() { Plugin* const p = new Plugin; @@ -2942,6 +3027,7 @@ void initStaticPlugins() initStatic__repelzen(); initStatic__sonusmodular(); initStatic__stocaudio(); + initStatic__stoermelder_packone(), initStatic__unless_modules(); initStatic__ValleyAudio(); initStatic__Voxglitch(); diff --git a/plugins/stoermelder-packone b/plugins/stoermelder-packone new file mode 160000 index 00000000..9b9c203c --- /dev/null +++ b/plugins/stoermelder-packone @@ -0,0 +1 @@ +Subproject commit 9b9c203cbd8b58b3dc95dafc355b43c1fce6dc11 From dca76207e73c105207ddc26bd2404c25a8d36e33 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 30 Nov 2022 21:52:32 +0000 Subject: [PATCH 116/451] Alternative approach to custom module widget behaviour Signed-off-by: falkTX --- include/helpers.hpp | 2 +- include/rack.hpp | 35 - plugins/BidooDark/plugin.cpp | 3 +- plugins/WhatTheRack | 2 +- plugins/forsitan-modulare | 2 +- src/CardinalModuleWidget.cpp | 267 +---- src/Makefile | 2 + src/override/.generate-diffs.sh | 1 + src/override/ModuleWidget.cpp | 1151 ++++++++++++++++++++++ src/override/diffs/Engine.cpp.diff | 4 +- src/override/diffs/MenuBar.cpp.diff | 24 +- src/override/diffs/Model.cpp.diff | 4 +- src/override/diffs/ModuleWidget.cpp.diff | 517 ++++++++++ src/override/diffs/OpenGlWidget.cpp.diff | 4 +- src/override/diffs/Scene.cpp.diff | 4 +- src/override/diffs/Window.cpp.diff | 4 +- src/override/diffs/blendish.c.diff | 4 +- src/override/diffs/common.cpp.diff | 4 +- src/override/diffs/context.cpp.diff | 13 +- src/override/diffs/minblep.cpp.diff | 4 +- src/override/diffs/plugin.cpp.diff | 16 +- 21 files changed, 1727 insertions(+), 340 deletions(-) delete mode 100644 include/rack.hpp create mode 100644 src/override/ModuleWidget.cpp create mode 100644 src/override/diffs/ModuleWidget.cpp.diff diff --git a/include/helpers.hpp b/include/helpers.hpp index 6c21c345..8ffbe7f5 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/include/rack.hpp b/include/rack.hpp deleted file mode 100644 index 3ca4cc64..00000000 --- a/include/rack.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho - * - * 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. - */ - -#pragma once - -#include_next - -#ifdef BUILDING_PLUGIN_MODULES -namespace rack { -namespace app { -struct CardinalModuleWidget : ModuleWidget { - CardinalModuleWidget() : ModuleWidget() {} - DEPRECATED CardinalModuleWidget(engine::Module* module) : ModuleWidget() { - setModule(module); - } - void onButton(const ButtonEvent& e) override; -}; -} -} -# define ModuleWidget CardinalModuleWidget -#endif diff --git a/plugins/BidooDark/plugin.cpp b/plugins/BidooDark/plugin.cpp index 9e2a23d9..0fc3ddfd 100644 --- a/plugins/BidooDark/plugin.cpp +++ b/plugins/BidooDark/plugin.cpp @@ -1,5 +1,4 @@ #include "../Bidoo/src/plugin.hpp" -#undef ModuleWidget void InstantiateExpanderItem::onAction(const event::Action &e) { engine::Module* module = model->createModule(); @@ -36,5 +35,5 @@ void BidooWidget::prepareThemes(const std::string& filename) { } void BidooWidget::step() { - CardinalModuleWidget::step(); + ModuleWidget::step(); } diff --git a/plugins/WhatTheRack b/plugins/WhatTheRack index e3733784..82c3c5e1 160000 --- a/plugins/WhatTheRack +++ b/plugins/WhatTheRack @@ -1 +1 @@ -Subproject commit e373378491d2cf3b8257137d154aef1d389c5204 +Subproject commit 82c3c5e11176c364b61d501059d9182e86464eca diff --git a/plugins/forsitan-modulare b/plugins/forsitan-modulare index 056cc2ec..494fefaf 160000 --- a/plugins/forsitan-modulare +++ b/plugins/forsitan-modulare @@ -1 +1 @@ -Subproject commit 056cc2ec9186a4175d9214eee91e4ff5cc2e5fb1 +Subproject commit 494fefaf38cb48928a165fd20d1535a0690bf613 diff --git a/src/CardinalModuleWidget.cpp b/src/CardinalModuleWidget.cpp index 39aa43ab..854e2fd1 100644 --- a/src/CardinalModuleWidget.cpp +++ b/src/CardinalModuleWidget.cpp @@ -40,94 +40,11 @@ #include #include +#undef ModuleWidget + namespace rack { namespace app { -struct CardinalModuleWidget : ModuleWidget { - CardinalModuleWidget() : ModuleWidget() {} - DEPRECATED CardinalModuleWidget(engine::Module* module) : ModuleWidget() { - setModule(module); - } - void onButton(const ButtonEvent& e) override; -}; - -struct ModuleWidget::Internal { - math::Vec dragOffset; - math::Vec dragRackPos; - bool dragEnabled; - widget::Widget* panel; -}; - -static void CardinalModuleWidget__loadDialog(ModuleWidget* const w) -{ - std::string presetDir = w->model->getUserPresetDirectory(); - system::createDirectories(presetDir); - - WeakPtr weakThis = w; - - async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { - // Delete directories if empty - DEFER({ - try { - system::remove(presetDir); - system::remove(system::getDirectory(presetDir)); - } - catch (Exception& e) { - // Ignore exceptions if directory cannot be removed. - } - }); - - if (!weakThis) - return; - if (!pathC) - return; - - try { - weakThis->loadAction(pathC); - } - catch (Exception& e) { - async_dialog_message(e.what()); - } - - std::free(pathC); - }); -} - -void CardinalModuleWidget__saveDialog(ModuleWidget* const w) -{ - const std::string presetDir = w->model->getUserPresetDirectory(); - system::createDirectories(presetDir); - - WeakPtr weakThis = w; - - async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { - // Delete directories if empty - DEFER({ - try { - system::remove(presetDir); - system::remove(system::getDirectory(presetDir)); - } - catch (Exception& e) { - // Ignore exceptions if directory cannot be removed. - } - }); - - if (!weakThis) - return; - if (!pathC) - return; - - std::string path = pathC; - std::free(pathC); - - // Automatically append .vcvm extension - if (system::getExtension(path) != ".vcvm") - path += ".vcvm"; - - weakThis->save(path); - }); -} - // Create ModulePresetPathItems for each patch in a directory. static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget, std::string presetDir) { bool foundPresets = false; @@ -165,117 +82,6 @@ static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget } }; -static void CardinalModuleWidget__createContextMenu(ModuleWidget* const w, - plugin::Model* const model, - engine::Module* const module) { - DISTRHO_SAFE_ASSERT_RETURN(model != nullptr,); - - ui::Menu* menu = createMenu(); - - WeakPtr weakThis = w; - - // Brand and module name - menu->addChild(createMenuLabel(model->name)); - menu->addChild(createMenuLabel(model->plugin->brand)); - - // Info - menu->addChild(createSubmenuItem("Info", "", [model](ui::Menu* menu) { - model->appendContextMenu(menu); - })); - - // Preset - menu->addChild(createSubmenuItem("Preset", "", [weakThis](ui::Menu* menu) { - menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [weakThis]() { - if (!weakThis) - return; - weakThis->copyClipboard(); - })); - - menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [weakThis]() { - if (!weakThis) - return; - weakThis->pasteClipboardAction(); - })); - - menu->addChild(createMenuItem("Open", "", [weakThis]() { - if (!weakThis) - return; - CardinalModuleWidget__loadDialog(weakThis); - })); - - /* TODO requires setting up user dir - menu->addChild(createMenuItem("Save as", "", [weakThis]() { - if (!weakThis) - return; - CardinalModuleWidget__saveDialog(weakThis); - })); - - // Scan `/presets//` for presets. - menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("User presets")); - appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); - */ - - // Scan `/presets/` for presets. - appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); - })); - - // Initialize - menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [weakThis]() { - if (!weakThis) - return; - weakThis->resetAction(); - })); - - // Randomize - menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [weakThis]() { - if (!weakThis) - return; - weakThis->randomizeAction(); - })); - - // Disconnect cables - menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [weakThis]() { - if (!weakThis) - return; - weakThis->disconnectAction(); - })); - - // Bypass - std::string bypassText = RACK_MOD_CTRL_NAME "+E"; - bool bypassed = module && module->isBypassed(); - if (bypassed) - bypassText += " " CHECKMARK_STRING; - menu->addChild(createMenuItem("Bypass", bypassText, [weakThis, bypassed]() { - if (!weakThis) - return; - weakThis->bypassAction(!bypassed); - })); - - // Duplicate - menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [weakThis]() { - if (!weakThis) - return; - weakThis->cloneAction(false); - })); - - // Duplicate with cables - menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [weakThis]() { - if (!weakThis) - return; - weakThis->cloneAction(true); - })); - - // Delete - menu->addChild(createMenuItem("Delete", "Backspace/Delete", [weakThis]() { - if (!weakThis) - return; - weakThis->removeAction(); - }, false, true)); - - w->appendContextMenu(menu); -} - static void CardinalModuleWidget__saveSelectionDialog(RackWidget* const w) { std::string selectionDir = asset::user("selections"); @@ -304,75 +110,6 @@ static void CardinalModuleWidget__saveSelectionDialog(RackWidget* const w) }); } -void CardinalModuleWidget::onButton(const ButtonEvent& e) -{ - const bool selected = APP->scene->rack->isSelected(this); - - if (selected) { - if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { - if (e.action == GLFW_PRESS) { - // Open selection context menu on right-click - ui::Menu* menu = createMenu(); - patchUtils::appendSelectionContextMenu(menu); - } - e.consume(this); - } - - if (e.button == GLFW_MOUSE_BUTTON_LEFT) { - if (e.action == GLFW_PRESS) { - // Toggle selection on Shift-click - if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, false); - e.consume(NULL); - return; - } - - // If module positions are locked, don't consume left-click - if (settings::lockModules) { - return; - } - - internal->dragOffset = e.pos; - } - - e.consume(this); - } - - return; - } - - // Dispatch event to children - Widget::onButton(e); - e.stopPropagating(); - if (e.isConsumed()) - return; - - if (e.button == GLFW_MOUSE_BUTTON_LEFT) { - if (e.action == GLFW_PRESS) { - // Toggle selection on Shift-click - if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, true); - e.consume(NULL); - return; - } - - // If module positions are locked, don't consume left-click - if (settings::lockModules) { - return; - } - - internal->dragOffset = e.pos; - } - e.consume(this); - } - - // Open context menu on right-click - if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { - CardinalModuleWidget__createContextMenu(this, model, module); - e.consume(this); - } -} - } } diff --git a/src/Makefile b/src/Makefile index c2d1895a..aa5219e8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -140,6 +140,7 @@ RACK_FILES += override/plugin.cpp RACK_FILES += override/Engine.cpp RACK_FILES += override/MenuBar.cpp RACK_FILES += override/Model.cpp +RACK_FILES += override/ModuleWidget.cpp RACK_FILES += override/OpenGlWidget.cpp RACK_FILES += override/Scene.cpp @@ -164,6 +165,7 @@ IGNORED_FILES += Rack/src/rtmidi.cpp IGNORED_FILES += Rack/src/app/AudioDisplay.cpp IGNORED_FILES += Rack/src/app/MenuBar.cpp IGNORED_FILES += Rack/src/app/MidiDisplay.cpp +IGNORED_FILES += Rack/src/app/ModuleWidget.cpp IGNORED_FILES += Rack/src/app/Scene.cpp IGNORED_FILES += Rack/src/app/TipWindow.cpp IGNORED_FILES += Rack/src/dsp/minblep.cpp diff --git a/src/override/.generate-diffs.sh b/src/override/.generate-diffs.sh index 6e723942..df024be6 100755 --- a/src/override/.generate-diffs.sh +++ b/src/override/.generate-diffs.sh @@ -7,6 +7,7 @@ diff -U3 ../Rack/src/common.cpp common.cpp > diffs/common.cpp.diff diff -U3 ../Rack/src/context.cpp context.cpp > diffs/context.cpp.diff diff -U3 ../Rack/src/plugin.cpp plugin.cpp > diffs/plugin.cpp.diff diff -U3 ../Rack/src/app/MenuBar.cpp MenuBar.cpp > diffs/MenuBar.cpp.diff +diff -U3 ../Rack/src/app/ModuleWidget.cpp ModuleWidget.cpp > diffs/ModuleWidget.cpp.diff diff -U3 ../Rack/src/app/Scene.cpp Scene.cpp > diffs/Scene.cpp.diff diff -U3 ../Rack/src/engine/Engine.cpp Engine.cpp > diffs/Engine.cpp.diff diff -U3 ../Rack/src/dsp/minblep.cpp minblep.cpp > diffs/minblep.cpp.diff diff --git a/src/override/ModuleWidget.cpp b/src/override/ModuleWidget.cpp new file mode 100644 index 00000000..438b8cf5 --- /dev/null +++ b/src/override/ModuleWidget.cpp @@ -0,0 +1,1151 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +/** + * This file is an edited version of VCVRack's ModuleWidget.cpp + * Copyright (C) 2016-2021 VCV. + * + * 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 (at your option) any later version. + */ + +#include "../../CardinalCommon.hpp" + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace rack { +namespace app { + + +static const char PRESET_FILTERS[] = "VCV Rack module preset (.vcvm):vcvm"; + + +struct ModuleWidget::Internal { + /** The module position clicked on to start dragging in the rack. + */ + math::Vec dragOffset; + + /** Global rack position the user clicked on. + */ + math::Vec dragRackPos; + bool dragEnabled = true; + + widget::Widget* panel = NULL; +}; + + +ModuleWidget::ModuleWidget() { + internal = new Internal; + box.size = math::Vec(0, RACK_GRID_HEIGHT); +} + +ModuleWidget::~ModuleWidget() { + clearChildren(); + setModule(NULL); + delete internal; +} + +plugin::Model* ModuleWidget::getModel() { + return model; +} + +void ModuleWidget::setModel(plugin::Model* model) { + assert(!this->model); + this->model = model; +} + +engine::Module* ModuleWidget::getModule() { + return module; +} + +void ModuleWidget::setModule(engine::Module* module) { + if (this->module) { + APP->engine->removeModule(this->module); + delete this->module; + this->module = NULL; + } + this->module = module; +} + +widget::Widget* ModuleWidget::getPanel() { + return internal->panel; +} + +void ModuleWidget::setPanel(widget::Widget* panel) { + // Remove existing panel + if (internal->panel) { + removeChild(internal->panel); + delete internal->panel; + internal->panel = NULL; + } + + if (panel) { + addChildBottom(panel); + internal->panel = panel; + box.size.x = std::round(panel->box.size.x / RACK_GRID_WIDTH) * RACK_GRID_WIDTH; + // If width is zero, set it to 12HP for sanity + if (box.size.x == 0.0) + box.size.x = 12 * RACK_GRID_WIDTH; + } +} + +void ModuleWidget::setPanel(std::shared_ptr svg) { + // Create SvgPanel + SvgPanel* panel = new SvgPanel; + panel->setBackground(svg); + setPanel(panel); +} + +void ModuleWidget::addParam(ParamWidget* param) { + addChild(param); +} + +void ModuleWidget::addInput(PortWidget* input) { + // Check that the port is an input + assert(input->type == engine::Port::INPUT); + // Check that the port doesn't have a duplicate ID + PortWidget* input2 = getInput(input->portId); + assert(!input2); + // Add port + addChild(input); +} + +void ModuleWidget::addOutput(PortWidget* output) { + // Check that the port is an output + assert(output->type == engine::Port::OUTPUT); + // Check that the port doesn't have a duplicate ID + PortWidget* output2 = getOutput(output->portId); + assert(!output2); + // Add port + addChild(output); +} + +template +T* getFirstDescendantOfTypeWithCondition(widget::Widget* w, F f) { + T* t = dynamic_cast(w); + if (t && f(t)) + return t; + + for (widget::Widget* child : w->children) { + T* foundT = getFirstDescendantOfTypeWithCondition(child, f); + if (foundT) + return foundT; + } + return NULL; +} + +ParamWidget* ModuleWidget::getParam(int paramId) { + return getFirstDescendantOfTypeWithCondition(this, [&](ParamWidget* pw) -> bool { + return pw->paramId == paramId; + }); +} + +PortWidget* ModuleWidget::getInput(int portId) { + return getFirstDescendantOfTypeWithCondition(this, [&](PortWidget* pw) -> bool { + return pw->type == engine::Port::INPUT && pw->portId == portId; + }); +} + +PortWidget* ModuleWidget::getOutput(int portId) { + return getFirstDescendantOfTypeWithCondition(this, [&](PortWidget* pw) -> bool { + return pw->type == engine::Port::OUTPUT && pw->portId == portId; + }); +} + +template +void doIfTypeRecursive(widget::Widget* w, F f) { + T* t = dynamic_cast(w); + if (t) + f(t); + + for (widget::Widget* child : w->children) { + doIfTypeRecursive(child, f); + } +} + +std::vector ModuleWidget::getParams() { + std::vector pws; + doIfTypeRecursive(this, [&](ParamWidget* pw) { + pws.push_back(pw); + }); + return pws; +} + +std::vector ModuleWidget::getPorts() { + std::vector pws; + doIfTypeRecursive(this, [&](PortWidget* pw) { + pws.push_back(pw); + }); + return pws; +} + +std::vector ModuleWidget::getInputs() { + std::vector pws; + doIfTypeRecursive(this, [&](PortWidget* pw) { + if (pw->type == engine::Port::INPUT) + pws.push_back(pw); + }); + return pws; +} + +std::vector ModuleWidget::getOutputs() { + std::vector pws; + doIfTypeRecursive(this, [&](PortWidget* pw) { + if (pw->type == engine::Port::OUTPUT) + pws.push_back(pw); + }); + return pws; +} + +void ModuleWidget::draw(const DrawArgs& args) { + nvgScissor(args.vg, RECT_ARGS(args.clipBox)); + + if (module && module->isBypassed()) { + nvgAlpha(args.vg, 0.33); + } + + Widget::draw(args); + + // Meter + if (module && settings::cpuMeter) { + float sampleRate = APP->engine->getSampleRate(); + const float* meterBuffer = module->meterBuffer(); + int meterLength = module->meterLength(); + int meterIndex = module->meterIndex(); + + // // Text background + // nvgBeginPath(args.vg); + // nvgRect(args.vg, 0.0, box.size.y - infoHeight, box.size.x, infoHeight); + // nvgFillColor(args.vg, nvgRGBAf(0, 0, 0, 0.75)); + // nvgFill(args.vg); + + // Draw time plot + const float plotHeight = box.size.y - BND_WIDGET_HEIGHT; + nvgBeginPath(args.vg); + nvgMoveTo(args.vg, 0.0, plotHeight); + math::Vec p1; + for (int i = 0; i < meterLength; i++) { + int index = math::eucMod(meterIndex + i + 1, meterLength); + float meter = math::clamp(meterBuffer[index] * sampleRate, 0.f, 1.f); + meter = std::max(0.f, meter); + math::Vec p; + p.x = (float) i / (meterLength - 1) * box.size.x; + p.y = (1.f - meter) * plotHeight; + if (i == 0) { + nvgLineTo(args.vg, VEC_ARGS(p)); + } + else { + math::Vec p2 = p; + p2.x -= 0.5f / (meterLength - 1) * box.size.x; + nvgBezierTo(args.vg, VEC_ARGS(p1), VEC_ARGS(p2), VEC_ARGS(p)); + } + p1 = p; + p1.x += 0.5f / (meterLength - 1) * box.size.x; + } + nvgLineTo(args.vg, box.size.x, plotHeight); + nvgClosePath(args.vg); + NVGcolor color = componentlibrary::SCHEME_ORANGE; + nvgFillColor(args.vg, color::alpha(color, 0.75)); + nvgFill(args.vg); + nvgStrokeWidth(args.vg, 2.0); + nvgStrokeColor(args.vg, color); + nvgStroke(args.vg); + + // Text background + bndMenuBackground(args.vg, 0.0, plotHeight, box.size.x, BND_WIDGET_HEIGHT, BND_CORNER_ALL); + + // Text + float percent = meterBuffer[meterIndex] * sampleRate * 100.f; + // float microseconds = meterBuffer[meterIndex] * 1e6f; + std::string meterText = string::f("%.1f", percent); + // Only append "%" if wider than 2 HP + if (box.getWidth() > RACK_GRID_WIDTH * 2) + meterText += "%"; + math::Vec pt; + pt.x = box.size.x - bndLabelWidth(args.vg, -1, meterText.c_str()) + 3; + pt.y = plotHeight + 0.5; + bndMenuLabel(args.vg, VEC_ARGS(pt), INFINITY, BND_WIDGET_HEIGHT, -1, meterText.c_str()); + } + + // Selection + if (APP->scene->rack->isSelected(this)) { + nvgBeginPath(args.vg); + nvgRect(args.vg, 0.0, 0.0, VEC_ARGS(box.size)); + nvgFillColor(args.vg, nvgRGBAf(1, 0, 0, 0.25)); + nvgFill(args.vg); + nvgStrokeWidth(args.vg, 2.0); + nvgStrokeColor(args.vg, nvgRGBAf(1, 0, 0, 0.5)); + nvgStroke(args.vg); + } + + nvgResetScissor(args.vg); +} + +void ModuleWidget::drawLayer(const DrawArgs& args, int layer) { + if (layer == -1) { + nvgBeginPath(args.vg); + float r = 20; // Blur radius + float c = 20; // Corner radius + math::Rect shadowBox = box.zeroPos().grow(math::Vec(10, -30)); + math::Rect shadowOutsideBox = shadowBox.grow(math::Vec(r, r)); + nvgRect(args.vg, RECT_ARGS(shadowOutsideBox)); + NVGcolor shadowColor = nvgRGBAf(0, 0, 0, 0.2); + NVGcolor transparentColor = nvgRGBAf(0, 0, 0, 0); + nvgFillPaint(args.vg, nvgBoxGradient(args.vg, RECT_ARGS(shadowBox), c, r, shadowColor, transparentColor)); + nvgFill(args.vg); + } + else { + Widget::drawLayer(args, layer); + } +} + +void ModuleWidget::onHover(const HoverEvent& e) { + if (APP->scene->rack->isSelected(this)) { + e.consume(this); + } + + OpaqueWidget::onHover(e); +} + +void ModuleWidget::onHoverKey(const HoverKeyEvent& e) { + if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { + if (e.keyName == "c" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + copyClipboard(); + e.consume(this); + } + if (e.keyName == "v" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + if (pasteClipboardAction()) { + e.consume(this); + } + } + if (e.keyName == "d" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + cloneAction(false); + e.consume(this); + } + if (e.keyName == "d" && (e.mods & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT)) { + cloneAction(true); + e.consume(this); + } + if (e.keyName == "i" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + resetAction(); + e.consume(this); + } + if (e.keyName == "r" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + randomizeAction(); + e.consume(this); + } + if (e.keyName == "u" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + disconnectAction(); + e.consume(this); + } + if (e.keyName == "e" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + bypassAction(!module->isBypassed()); + e.consume(this); + } + if ((e.key == GLFW_KEY_DELETE || e.key == GLFW_KEY_BACKSPACE) && (e.mods & RACK_MOD_MASK) == 0) { + // Deletes `this` + removeAction(); + e.consume(NULL); + return; + } + if (e.key == GLFW_KEY_F1 && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { + std::string manualUrl = model->getManualUrl(); + if (!manualUrl.empty()) + system::openBrowser(manualUrl); + e.consume(this); + } + } + + if (e.isConsumed()) + return; + OpaqueWidget::onHoverKey(e); +} + +void ModuleWidget::onButton(const ButtonEvent& e) { + const bool selected = APP->scene->rack->isSelected(this); + + if (selected) { + if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { + if (e.action == GLFW_PRESS) { + // Open selection context menu on right-click + ui::Menu* menu = createMenu(); + patchUtils::appendSelectionContextMenu(menu); + } + e.consume(this); + } + + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, false); + e.consume(NULL); + return; + } + + // If module positions are locked, don't consume left-click + if (settings::lockModules) { + return; + } + + internal->dragOffset = e.pos; + } + + e.consume(this); + } + + return; + } + + // Dispatch event to children + Widget::onButton(e); + e.stopPropagating(); + if (e.isConsumed()) + return; + + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, true); + e.consume(NULL); + return; + } + + // If module positions are locked, don't consume left-click + if (settings::lockModules) { + return; + } + + internal->dragOffset = e.pos; + } + e.consume(this); + } + + // Open context menu on right-click + if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { + createContextMenu(); + e.consume(this); + } +} + +void ModuleWidget::onDragStart(const DragStartEvent& e) { + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + // HACK Disable FramebufferWidget redrawing subpixels while dragging + APP->window->fbDirtyOnSubpixelChange() = false; + + // Clear dragRack so dragging in not enabled until mouse is moved a bit. + internal->dragRackPos = math::Vec(NAN, NAN); + + // Prepare initial position of modules for history. + APP->scene->rack->updateModuleOldPositions(); + } +} + +void ModuleWidget::onDragEnd(const DragEndEvent& e) { + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + APP->window->fbDirtyOnSubpixelChange() = true; + + // The next time the module is dragged, it should always move immediately + internal->dragEnabled = true; + + history::ComplexAction* h = APP->scene->rack->getModuleDragAction(); + if (!h->isEmpty()) + APP->history->push(h); + else + delete h; + } +} + +void ModuleWidget::onDragMove(const DragMoveEvent& e) { + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + math::Vec mousePos = APP->scene->rack->getMousePos(); + + if (!internal->dragEnabled) { + // Set dragRackPos on the first time after dragging + if (!internal->dragRackPos.isFinite()) + internal->dragRackPos = mousePos; + // Check if the mouse has moved enough to start dragging the module. + const float minDist = RACK_GRID_WIDTH; + if (internal->dragRackPos.minus(mousePos).square() >= std::pow(minDist, 2)) + internal->dragEnabled = true; + } + + // Move module + if (internal->dragEnabled) { + // Round y coordinate to nearest rack height + math::Vec pos = mousePos; + pos.x -= internal->dragOffset.x; + pos.y -= RACK_GRID_HEIGHT / 2; + + if (APP->scene->rack->isSelected(this)) { + pos = (pos / RACK_GRID_SIZE).round() * RACK_GRID_SIZE; + math::Vec delta = pos.minus(box.pos); + APP->scene->rack->setSelectionPosNearest(delta); + } + else { + if (settings::squeezeModules) { + APP->scene->rack->setModulePosSqueeze(this, pos); + } + else { + if ((APP->window->getMods() & RACK_MOD_MASK) == RACK_MOD_CTRL) + APP->scene->rack->setModulePosForce(this, pos); + else + APP->scene->rack->setModulePosNearest(this, pos); + } + } + } + } +} + +void ModuleWidget::onDragHover(const DragHoverEvent& e) { + if (APP->scene->rack->isSelected(this)) { + e.consume(this); + } + + OpaqueWidget::onDragHover(e); +} + +json_t* ModuleWidget::toJson() { + json_t* moduleJ = APP->engine->moduleToJson(module); + return moduleJ; +} + +void ModuleWidget::fromJson(json_t* moduleJ) { + APP->engine->moduleFromJson(module, moduleJ); +} + +bool ModuleWidget::pasteJsonAction(json_t* moduleJ) { + engine::Module::jsonStripIds(moduleJ); + + json_t* oldModuleJ = toJson(); + DEFER({json_decref(oldModuleJ);}); + + try { + fromJson(moduleJ); + } + catch (Exception& e) { + WARN("%s", e.what()); + return false; + } + + // history::ModuleChange + history::ModuleChange* h = new history::ModuleChange; + h->name = "paste module preset"; + h->moduleId = module->id; + json_incref(oldModuleJ); + h->oldModuleJ = oldModuleJ; + json_incref(moduleJ); + h->newModuleJ = moduleJ; + APP->history->push(h); + return true; +} + +void ModuleWidget::copyClipboard() { + json_t* moduleJ = toJson(); + engine::Module::jsonStripIds(moduleJ); + + DEFER({json_decref(moduleJ);}); + char* json = json_dumps(moduleJ, JSON_INDENT(2)); + DEFER({std::free(json);}); + glfwSetClipboardString(APP->window->win, json); +} + +bool ModuleWidget::pasteClipboardAction() { + const char* json = glfwGetClipboardString(APP->window->win); + if (!json) { + WARN("Could not get text from clipboard."); + return false; + } + + json_error_t error; + json_t* moduleJ = json_loads(json, 0, &error); + if (!moduleJ) { + WARN("JSON parsing error at %s %d:%d %s", error.source, error.line, error.column, error.text); + return false; + } + DEFER({json_decref(moduleJ);}); + + return pasteJsonAction(moduleJ); +} + +void ModuleWidget::load(std::string filename) { + FILE* file = std::fopen(filename.c_str(), "r"); + if (!file) + throw Exception("Could not load patch file %s", filename.c_str()); + DEFER({std::fclose(file);}); + + INFO("Loading preset %s", filename.c_str()); + + json_error_t error; + json_t* moduleJ = json_loadf(file, 0, &error); + if (!moduleJ) + throw Exception("File is not a valid patch file. JSON parsing error at %s %d:%d %s", error.source, error.line, error.column, error.text); + DEFER({json_decref(moduleJ);}); + + engine::Module::jsonStripIds(moduleJ); + fromJson(moduleJ); +} + +void ModuleWidget::loadAction(std::string filename) { + // history::ModuleChange + history::ModuleChange* h = new history::ModuleChange; + h->name = "load module preset"; + h->moduleId = module->id; + h->oldModuleJ = toJson(); + + try { + load(filename); + } + catch (Exception& e) { + delete h; + throw; + } + + // TODO We can use `moduleJ` here instead to save a toJson() call. + h->newModuleJ = toJson(); + APP->history->push(h); +} + +void ModuleWidget::loadTemplate() { + std::string templatePath = system::join(model->getUserPresetDirectory(), "template.vcvm"); + try { + load(templatePath); + } + catch (Exception& e) { + // Do nothing + } +} + +void ModuleWidget::loadDialog() { + std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); + + WeakPtr weakThis = this; + + async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { + // Delete directories if empty + DEFER({ + try { + system::remove(presetDir); + system::remove(system::getDirectory(presetDir)); + } + catch (Exception& e) { + // Ignore exceptions if directory cannot be removed. + } + }); + + if (!weakThis) + return; + if (!pathC) + return; + + try { + weakThis->loadAction(pathC); + } + catch (Exception& e) { + async_dialog_message(e.what()); + } + + std::free(pathC); + }); +} + +void ModuleWidget::save(std::string filename) { + INFO("Saving preset %s", filename.c_str()); + + json_t* moduleJ = toJson(); + assert(moduleJ); + DEFER({json_decref(moduleJ);}); + + engine::Module::jsonStripIds(moduleJ); + + FILE* file = std::fopen(filename.c_str(), "w"); + if (!file) { + std::string message = string::f("Could not save preset to file %s", filename.c_str()); + osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, message.c_str()); + return; + } + DEFER({std::fclose(file);}); + + json_dumpf(moduleJ, file, JSON_INDENT(2)); +} + +void ModuleWidget::saveTemplate() { + std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); + std::string templatePath = system::join(presetDir, "template.vcvm"); + save(templatePath); +} + +void ModuleWidget::saveTemplateDialog() { + if (hasTemplate()) { + std::string message = string::f("Overwrite default preset for %s?", model->getFullName().c_str()); + if (!osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, message.c_str())) + return; + } + saveTemplate(); +} + +bool ModuleWidget::hasTemplate() { + std::string presetDir = model->getUserPresetDirectory(); + std::string templatePath = system::join(presetDir, "template.vcvm"); + return system::exists(templatePath);; +} + +void ModuleWidget::clearTemplate() { + std::string presetDir = model->getUserPresetDirectory(); + std::string templatePath = system::join(presetDir, "template.vcvm"); + system::remove(templatePath); +} + +void ModuleWidget::clearTemplateDialog() { + std::string message = string::f("Delete default preset for %s?", model->getFullName().c_str()); + if (!osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, message.c_str())) + return; + clearTemplate(); +} + +void ModuleWidget::saveDialog() { + const std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); + + WeakPtr weakThis = this; + + async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { + // Delete directories if empty + DEFER({ + try { + system::remove(presetDir); + system::remove(system::getDirectory(presetDir)); + } + catch (Exception& e) { + // Ignore exceptions if directory cannot be removed. + } + }); + + if (!weakThis) + return; + if (!pathC) + return; + + std::string path = pathC; + std::free(pathC); + + // Automatically append .vcvm extension + if (system::getExtension(path) != ".vcvm") + path += ".vcvm"; + + weakThis->save(path); + }); +} + +void ModuleWidget::disconnect() { + for (PortWidget* pw : getPorts()) { + APP->scene->rack->clearCablesOnPort(pw); + } +} + +void ModuleWidget::resetAction() { + assert(module); + + // history::ModuleChange + history::ModuleChange* h = new history::ModuleChange; + h->name = "reset module"; + h->moduleId = module->id; + h->oldModuleJ = toJson(); + + APP->engine->resetModule(module); + + h->newModuleJ = toJson(); + APP->history->push(h); +} + +void ModuleWidget::randomizeAction() { + assert(module); + + // history::ModuleChange + history::ModuleChange* h = new history::ModuleChange; + h->name = "randomize module"; + h->moduleId = module->id; + h->oldModuleJ = toJson(); + + APP->engine->randomizeModule(module); + + h->newModuleJ = toJson(); + APP->history->push(h); +} + +void ModuleWidget::appendDisconnectActions(history::ComplexAction* complexAction) { + for (PortWidget* pw : getPorts()) { + for (CableWidget* cw : APP->scene->rack->getCompleteCablesOnPort(pw)) { + // history::CableRemove + history::CableRemove* h = new history::CableRemove; + h->setCable(cw); + complexAction->push(h); + // Delete cable + APP->scene->rack->removeCable(cw); + delete cw; + } + }; +} + +void ModuleWidget::disconnectAction() { + history::ComplexAction* complexAction = new history::ComplexAction; + complexAction->name = "disconnect cables"; + appendDisconnectActions(complexAction); + + if (!complexAction->isEmpty()) + APP->history->push(complexAction); + else + delete complexAction; +} + +void ModuleWidget::cloneAction(bool cloneCables) { + // history::ComplexAction + history::ComplexAction* h = new history::ComplexAction; + h->name = "duplicate module"; + + // Save patch store in this module so we can copy it below + APP->engine->prepareSaveModule(module); + + // JSON serialization is the obvious way to do this + json_t* moduleJ = toJson(); + DEFER({ + json_decref(moduleJ); + }); + engine::Module::jsonStripIds(moduleJ); + + // Clone Module + INFO("Creating module %s", model->getFullName().c_str()); + engine::Module* clonedModule = model->createModule(); + + // Set ID here so we can copy module storage dir + clonedModule->id = random::u64() % (1ull << 53); + system::copy(module->getPatchStorageDirectory(), clonedModule->getPatchStorageDirectory()); + + // This doesn't need a lock (via Engine::moduleFromJson()) because the Module is not added to the Engine yet. + try { + clonedModule->fromJson(moduleJ); + } + catch (Exception& e) { + WARN("%s", e.what()); + } + APP->engine->addModule(clonedModule); + + // Clone ModuleWidget + INFO("Creating module widget %s", model->getFullName().c_str()); + ModuleWidget* clonedModuleWidget = model->createModuleWidget(clonedModule); + APP->scene->rack->updateModuleOldPositions(); + APP->scene->rack->addModule(clonedModuleWidget); + // Place module to the right of `this` module, by forcing it to 1 HP to the right. + math::Vec clonedPos = box.pos; + clonedPos.x += clonedModuleWidget->box.getWidth(); + if (settings::squeezeModules) + APP->scene->rack->squeezeModulePos(clonedModuleWidget, clonedPos); + else + APP->scene->rack->setModulePosNearest(clonedModuleWidget, clonedPos); + h->push(APP->scene->rack->getModuleDragAction()); + APP->scene->rack->updateExpanders(); + + // history::ModuleAdd + history::ModuleAdd* hma = new history::ModuleAdd; + hma->setModule(clonedModuleWidget); + h->push(hma); + + if (cloneCables) { + // Clone cables attached to input ports + for (PortWidget* pw : getInputs()) { + for (CableWidget* cw : APP->scene->rack->getCompleteCablesOnPort(pw)) { + // Create cable attached to cloned ModuleWidget's input + engine::Cable* clonedCable = new engine::Cable; + clonedCable->inputModule = clonedModule; + clonedCable->inputId = cw->cable->inputId; + // If cable is self-patched, attach to cloned module instead + if (cw->cable->outputModule == module) + clonedCable->outputModule = clonedModule; + else + clonedCable->outputModule = cw->cable->outputModule; + clonedCable->outputId = cw->cable->outputId; + APP->engine->addCable(clonedCable); + + app::CableWidget* clonedCw = new app::CableWidget; + clonedCw->setCable(clonedCable); + clonedCw->color = cw->color; + APP->scene->rack->addCable(clonedCw); + + // history::CableAdd + history::CableAdd* hca = new history::CableAdd; + hca->setCable(clonedCw); + h->push(hca); + } + } + } + + APP->history->push(h); +} + +void ModuleWidget::bypassAction(bool bypassed) { + assert(module); + + // history::ModuleBypass + history::ModuleBypass* h = new history::ModuleBypass; + h->moduleId = module->id; + h->bypassed = bypassed; + if (!bypassed) + h->name = "un-bypass module"; + APP->history->push(h); + + APP->engine->bypassModule(module, bypassed); +} + +void ModuleWidget::removeAction() { + history::ComplexAction* h = new history::ComplexAction; + h->name = "delete module"; + + // Disconnect cables + appendDisconnectActions(h); + + // Unset module position from rack. + APP->scene->rack->updateModuleOldPositions(); + if (settings::squeezeModules) + APP->scene->rack->unsqueezeModulePos(this); + h->push(APP->scene->rack->getModuleDragAction()); + + // history::ModuleRemove + history::ModuleRemove* moduleRemove = new history::ModuleRemove; + moduleRemove->setModule(this); + h->push(moduleRemove); + + APP->history->push(h); + + // This removes the module and transfers ownership to caller + APP->scene->rack->removeModule(this); + delete this; + + APP->scene->rack->updateExpanders(); +} + + +// Create ModulePresetPathItems for each patch in a directory. +static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget, std::string presetDir) { + bool hasPresets = false; + if (system::isDirectory(presetDir)) { + // Note: This is not cached, so opening this menu each time might have a bit of latency. + std::vector entries = system::getEntries(presetDir); + std::sort(entries.begin(), entries.end()); + for (std::string path : entries) { + std::string name = system::getStem(path); + // Remove "1_", "42_", "001_", etc at the beginning of preset filenames + std::regex r("^\\d+_"); + name = std::regex_replace(name, r, ""); + + if (system::isDirectory(path)) { + hasPresets = true; + + menu->addChild(createSubmenuItem(name, "", [=](ui::Menu* menu) { + if (!moduleWidget) + return; + appendPresetItems(menu, moduleWidget, path); + })); + } + else if (system::getExtension(path) == ".vcvm" && name != "template") { + hasPresets = true; + + menu->addChild(createMenuItem(name, "", [=]() { + if (!moduleWidget) + return; + try { + moduleWidget->loadAction(path); + } + catch (Exception& e) { + osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, e.what()); + } + })); + } + } + } + if (!hasPresets) { + menu->addChild(createMenuLabel("(None)")); + } +}; + + +void ModuleWidget::createContextMenu() { + ui::Menu* menu = createMenu(); + assert(model); + + WeakPtr weakThis = this; + + // Brand and module name + menu->addChild(createMenuLabel(model->name)); + menu->addChild(createMenuLabel(model->plugin->brand)); + + // Info + menu->addChild(createSubmenuItem("Info", "", [weakThis](ui::Menu* menu) { + if (!weakThis) + return; + weakThis->model->appendContextMenu(menu); + })); + + // Preset + menu->addChild(createSubmenuItem("Preset", "", [weakThis](ui::Menu* menu) { + menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [weakThis]() { + if (!weakThis) + return; + weakThis->copyClipboard(); + })); + + menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [weakThis]() { + if (!weakThis) + return; + weakThis->pasteClipboardAction(); + })); + + menu->addChild(createMenuItem("Open", "", [weakThis]() { + if (!weakThis) + return; + weakThis->loadDialog(); + })); + + /* TODO requires setting up user dir + menu->addChild(createMenuItem("Save as", "", [weakThis]() { + if (!weakThis) + return; + CardinalModuleWidget__saveDialog(weakThis); + })); + + // Scan `/presets//` for presets. + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("User presets")); + appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); + */ + + // Scan `/presets/` for presets. + appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); + })); + + // Initialize + menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [weakThis]() { + if (!weakThis) + return; + weakThis->resetAction(); + })); + + // Randomize + menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [weakThis]() { + if (!weakThis) + return; + weakThis->randomizeAction(); + })); + + // Disconnect cables + menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [weakThis]() { + if (!weakThis) + return; + weakThis->disconnectAction(); + })); + + // Bypass + std::string bypassText = RACK_MOD_CTRL_NAME "+E"; + bool bypassed = module && module->isBypassed(); + if (bypassed) + bypassText += " " CHECKMARK_STRING; + menu->addChild(createMenuItem("Bypass", bypassText, [weakThis, bypassed]() { + if (!weakThis) + return; + weakThis->bypassAction(!bypassed); + })); + + // Duplicate + menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [weakThis]() { + if (!weakThis) + return; + weakThis->cloneAction(false); + })); + + // Duplicate with cables + menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [weakThis]() { + if (!weakThis) + return; + weakThis->cloneAction(true); + })); + + // Delete + menu->addChild(createMenuItem("Delete", "Backspace/Delete", [weakThis]() { + if (!weakThis) + return; + weakThis->removeAction(); + }, false, true)); + + appendContextMenu(menu); +} + +math::Vec ModuleWidget::getGridPosition() { + return ((getPosition() - RACK_OFFSET) / RACK_GRID_SIZE).round(); +} + +void ModuleWidget::setGridPosition(math::Vec pos) { + setPosition(pos * RACK_GRID_SIZE + RACK_OFFSET); +} + +math::Vec ModuleWidget::getGridSize() { + return (getSize() / RACK_GRID_SIZE).round(); +} + +math::Rect ModuleWidget::getGridBox() { + return math::Rect(getGridPosition(), getGridSize()); +} + +math::Vec& ModuleWidget::dragOffset() { + return internal->dragOffset; +} + +bool& ModuleWidget::dragEnabled() { + return internal->dragEnabled; +} + +engine::Module* ModuleWidget::releaseModule() { + engine::Module* module = this->module; + this->module = NULL; + return module; +} + + +} // namespace app +} // namespace rack \ No newline at end of file diff --git a/src/override/diffs/Engine.cpp.diff b/src/override/diffs/Engine.cpp.diff index 7b8616de..59d94965 100644 --- a/src/override/diffs/Engine.cpp.diff +++ b/src/override/diffs/Engine.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/engine/Engine.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ Engine.cpp 2022-11-25 17:57:38.799958734 +0000 +--- ../Rack/src/engine/Engine.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ Engine.cpp 2022-11-25 22:31:29.000000000 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index 0e9f9ad9..186ef5f8 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/MenuBar.cpp 2022-09-21 19:49:12.198540676 +0100 -+++ MenuBar.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/app/MenuBar.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ MenuBar.cpp 2022-11-25 23:27:58.000000000 +0000 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin @@ -446,7 +446,7 @@ struct EngineButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); -@@ -541,268 +648,40 @@ +@@ -541,268 +648,46 @@ settings::cpuMeter ^= true; })); @@ -725,7 +725,13 @@ - if (osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, "All plugins have been downloaded. Close and re-launch Rack to load new updates.")) { - APP->window->close(); + if (supportsBufferSizeChanges()) { -+ static const std::vector bufferSizes = {256, 512, 1024, 2048, 4096, 8192, 16384}; ++ static const std::vector bufferSizes = { ++ #ifdef DISTRHO_OS_WASM ++ 256, 512, 1024, 2048, 4096, 8192, 16384 ++ #else ++ 128, 256, 512, 1024, 2048, 4096, 8192 ++ #endif ++ }; + const uint32_t currentBufferSize = getBufferSize(); + menu->addChild(createSubmenuItem("Buffer Size", std::to_string(currentBufferSize), [=](ui::Menu* menu) { + for (uint32_t bufferSize : bufferSizes) { @@ -742,7 +748,7 @@ } }; -@@ -813,65 +692,23 @@ +@@ -813,65 +698,23 @@ struct HelpButton : MenuButton { @@ -814,7 +820,7 @@ } }; -@@ -921,7 +758,9 @@ +@@ -921,7 +764,9 @@ struct MenuBar : widget::OpaqueWidget { MeterLabel* meterLabel; @@ -825,7 +831,7 @@ const float margin = 5; box.size.y = BND_WIDGET_HEIGHT + 2 * margin; -@@ -930,7 +769,7 @@ +@@ -930,7 +775,7 @@ layout->spacing = math::Vec(0, 0); addChild(layout); @@ -834,7 +840,7 @@ fileButton->text = "File"; layout->addChild(fileButton); -@@ -946,10 +785,6 @@ +@@ -946,10 +791,6 @@ engineButton->text = "Engine"; layout->addChild(engineButton); @@ -845,7 +851,7 @@ HelpButton* helpButton = new HelpButton; helpButton->text = "Help"; layout->addChild(helpButton); -@@ -984,7 +819,11 @@ +@@ -984,7 +825,11 @@ widget::Widget* createMenuBar() { diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index 1c251b2e..cbe6c0f1 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin/Model.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ Model.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/plugin/Model.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ Model.cpp 2022-11-23 23:06:41.000000000 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/ModuleWidget.cpp.diff b/src/override/diffs/ModuleWidget.cpp.diff new file mode 100644 index 00000000..1c9300b8 --- /dev/null +++ b/src/override/diffs/ModuleWidget.cpp.diff @@ -0,0 +1,517 @@ +--- ../Rack/src/app/ModuleWidget.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ ModuleWidget.cpp 2022-11-30 20:10:06.000000000 +0000 +@@ -1,3 +1,32 @@ ++/* ++ * DISTRHO Cardinal Plugin ++ * Copyright (C) 2021-2022 Filipe Coelho ++ * ++ * 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. ++ */ ++ ++/** ++ * This file is an edited version of VCVRack's ModuleWidget.cpp ++ * Copyright (C) 2016-2021 VCV. ++ * ++ * 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 (at your option) any later version. ++ */ ++ ++#include "../../CardinalCommon.hpp" ++ + #include + #include + +@@ -368,71 +397,71 @@ + } + + void ModuleWidget::onButton(const ButtonEvent& e) { +- bool selected = APP->scene->rack->isSelected(this); +- +- if (selected) { +- if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { +- if (e.action == GLFW_PRESS) { +- // Open selection context menu on right-click +- ui::Menu* menu = createMenu(); +- APP->scene->rack->appendSelectionContextMenu(menu); +- } +- e.consume(this); +- } +- +- if (e.button == GLFW_MOUSE_BUTTON_LEFT) { +- if (e.action == GLFW_PRESS) { +- // Toggle selection on Shift-click +- if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { +- APP->scene->rack->select(this, false); +- e.consume(NULL); +- return; +- } +- +- // If module positions are locked, don't consume left-click +- if (settings::lockModules) { +- return; +- } ++ const bool selected = APP->scene->rack->isSelected(this); + +- internal->dragOffset = e.pos; +- } +- +- e.consume(this); +- } +- +- return; +- } +- +- // Dispatch event to children +- Widget::onButton(e); +- e.stopPropagating(); +- if (e.isConsumed()) +- return; +- +- if (e.button == GLFW_MOUSE_BUTTON_LEFT) { +- if (e.action == GLFW_PRESS) { +- // Toggle selection on Shift-click +- if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { +- APP->scene->rack->select(this, true); +- e.consume(NULL); +- return; +- } +- +- // If module positions are locked, don't consume left-click +- if (settings::lockModules) { +- return; +- } +- +- internal->dragOffset = e.pos; +- } +- e.consume(this); +- } +- +- // Open context menu on right-click +- if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { +- createContextMenu(); +- e.consume(this); +- } ++ if (selected) { ++ if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { ++ if (e.action == GLFW_PRESS) { ++ // Open selection context menu on right-click ++ ui::Menu* menu = createMenu(); ++ patchUtils::appendSelectionContextMenu(menu); ++ } ++ e.consume(this); ++ } ++ ++ if (e.button == GLFW_MOUSE_BUTTON_LEFT) { ++ if (e.action == GLFW_PRESS) { ++ // Toggle selection on Shift-click ++ if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { ++ APP->scene->rack->select(this, false); ++ e.consume(NULL); ++ return; ++ } ++ ++ // If module positions are locked, don't consume left-click ++ if (settings::lockModules) { ++ return; ++ } ++ ++ internal->dragOffset = e.pos; ++ } ++ ++ e.consume(this); ++ } ++ ++ return; ++ } ++ ++ // Dispatch event to children ++ Widget::onButton(e); ++ e.stopPropagating(); ++ if (e.isConsumed()) ++ return; ++ ++ if (e.button == GLFW_MOUSE_BUTTON_LEFT) { ++ if (e.action == GLFW_PRESS) { ++ // Toggle selection on Shift-click ++ if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { ++ APP->scene->rack->select(this, true); ++ e.consume(NULL); ++ return; ++ } ++ ++ // If module positions are locked, don't consume left-click ++ if (settings::lockModules) { ++ return; ++ } ++ ++ internal->dragOffset = e.pos; ++ } ++ e.consume(this); ++ } ++ ++ // Open context menu on right-click ++ if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { ++ createContextMenu(); ++ e.consume(this); ++ } + } + + void ModuleWidget::onDragStart(const DragStartEvent& e) { +@@ -624,36 +653,37 @@ + } + + void ModuleWidget::loadDialog() { +- std::string presetDir = model->getUserPresetDirectory(); +- system::createDirectories(presetDir); ++ std::string presetDir = model->getUserPresetDirectory(); ++ system::createDirectories(presetDir); + +- // Delete directories if empty +- DEFER({ +- try { +- system::remove(presetDir); +- system::remove(system::getDirectory(presetDir)); +- } +- catch (Exception& e) { +- // Ignore exceptions if directory cannot be removed. +- } +- }); ++ WeakPtr weakThis = this; + +- osdialog_filters* filters = osdialog_filters_parse(PRESET_FILTERS); +- DEFER({osdialog_filters_free(filters);}); ++ async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { ++ // Delete directories if empty ++ DEFER({ ++ try { ++ system::remove(presetDir); ++ system::remove(system::getDirectory(presetDir)); ++ } ++ catch (Exception& e) { ++ // Ignore exceptions if directory cannot be removed. ++ } ++ }); ++ ++ if (!weakThis) ++ return; ++ if (!pathC) ++ return; ++ ++ try { ++ weakThis->loadAction(pathC); ++ } ++ catch (Exception& e) { ++ async_dialog_message(e.what()); ++ } + +- char* pathC = osdialog_file(OSDIALOG_OPEN, presetDir.c_str(), NULL, filters); +- if (!pathC) { +- // No path selected +- return; +- } +- DEFER({std::free(pathC);}); +- +- try { +- loadAction(pathC); +- } +- catch (Exception& e) { +- osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, e.what()); +- } ++ std::free(pathC); ++ }); + } + + void ModuleWidget::save(std::string filename) { +@@ -712,36 +742,37 @@ + } + + void ModuleWidget::saveDialog() { +- std::string presetDir = model->getUserPresetDirectory(); +- system::createDirectories(presetDir); ++ const std::string presetDir = model->getUserPresetDirectory(); ++ system::createDirectories(presetDir); + +- // Delete directories if empty +- DEFER({ +- try { +- system::remove(presetDir); +- system::remove(system::getDirectory(presetDir)); +- } +- catch (Exception& e) { +- // Ignore exceptions if directory cannot be removed. +- } +- }); +- +- osdialog_filters* filters = osdialog_filters_parse(PRESET_FILTERS); +- DEFER({osdialog_filters_free(filters);}); +- +- char* pathC = osdialog_file(OSDIALOG_SAVE, presetDir.c_str(), "Untitled.vcvm", filters); +- if (!pathC) { +- // No path selected +- return; +- } +- DEFER({std::free(pathC);}); ++ WeakPtr weakThis = this; + +- std::string path = pathC; +- // Automatically append .vcvm extension +- if (system::getExtension(path) != ".vcvm") +- path += ".vcvm"; ++ async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { ++ // Delete directories if empty ++ DEFER({ ++ try { ++ system::remove(presetDir); ++ system::remove(system::getDirectory(presetDir)); ++ } ++ catch (Exception& e) { ++ // Ignore exceptions if directory cannot be removed. ++ } ++ }); ++ ++ if (!weakThis) ++ return; ++ if (!pathC) ++ return; ++ ++ std::string path = pathC; ++ std::free(pathC); ++ ++ // Automatically append .vcvm extension ++ if (system::getExtension(path) != ".vcvm") ++ path += ".vcvm"; + +- save(path); ++ weakThis->save(path); ++ }); + } + + void ModuleWidget::disconnect() { +@@ -981,118 +1012,108 @@ + + WeakPtr weakThis = this; + +- // Brand and module name +- menu->addChild(createMenuLabel(model->name)); +- menu->addChild(createMenuLabel(model->plugin->brand)); +- +- // Info +- menu->addChild(createSubmenuItem("Info", "", [=](ui::Menu* menu) { +- model->appendContextMenu(menu); +- })); +- +- // Preset +- menu->addChild(createSubmenuItem("Preset", "", [=](ui::Menu* menu) { +- menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [=]() { +- if (!weakThis) +- return; +- weakThis->copyClipboard(); +- })); +- +- menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [=]() { +- if (!weakThis) +- return; +- weakThis->pasteClipboardAction(); +- })); +- +- menu->addChild(createMenuItem("Open", "", [=]() { +- if (!weakThis) +- return; +- weakThis->loadDialog(); +- })); +- +- menu->addChild(createMenuItem("Save as", "", [=]() { +- if (!weakThis) +- return; +- weakThis->saveDialog(); +- })); +- +- menu->addChild(createMenuItem("Save default", "", [=]() { +- if (!weakThis) +- return; +- weakThis->saveTemplateDialog(); +- })); +- +- menu->addChild(createMenuItem("Clear default", "", [=]() { +- if (!weakThis) +- return; +- weakThis->clearTemplateDialog(); +- }, !weakThis->hasTemplate())); +- +- // Scan `/presets//` for presets. +- menu->addChild(new ui::MenuSeparator); +- menu->addChild(createMenuLabel("User presets")); +- appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); +- +- // Scan `/presets/` for presets. +- menu->addChild(new ui::MenuSeparator); +- menu->addChild(createMenuLabel("Factory presets")); +- appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); +- })); ++ // Brand and module name ++ menu->addChild(createMenuLabel(model->name)); ++ menu->addChild(createMenuLabel(model->plugin->brand)); + +- // Initialize +- menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [=]() { ++ // Info ++ menu->addChild(createSubmenuItem("Info", "", [weakThis](ui::Menu* menu) { + if (!weakThis) + return; +- weakThis->resetAction(); +- })); ++ weakThis->model->appendContextMenu(menu); ++ })); + +- // Randomize +- menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [=]() { +- if (!weakThis) +- return; +- weakThis->randomizeAction(); +- })); +- +- // Disconnect cables +- menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [=]() { +- if (!weakThis) +- return; +- weakThis->disconnectAction(); +- })); +- +- // Bypass +- std::string bypassText = RACK_MOD_CTRL_NAME "+E"; +- bool bypassed = module && module->isBypassed(); +- if (bypassed) +- bypassText += " " CHECKMARK_STRING; +- menu->addChild(createMenuItem("Bypass", bypassText, [=]() { +- if (!weakThis) +- return; +- weakThis->bypassAction(!bypassed); +- })); +- +- // Duplicate +- menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [=]() { +- if (!weakThis) +- return; +- weakThis->cloneAction(false); +- })); +- +- // Duplicate with cables +- menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [=]() { +- if (!weakThis) +- return; +- weakThis->cloneAction(true); +- })); +- +- // Delete +- menu->addChild(createMenuItem("Delete", "Backspace/Delete", [=]() { +- if (!weakThis) +- return; +- weakThis->removeAction(); +- }, false, true)); ++ // Preset ++ menu->addChild(createSubmenuItem("Preset", "", [weakThis](ui::Menu* menu) { ++ menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->copyClipboard(); ++ })); ++ ++ menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->pasteClipboardAction(); ++ })); ++ ++ menu->addChild(createMenuItem("Open", "", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->loadDialog(); ++ })); ++ ++ /* TODO requires setting up user dir ++ menu->addChild(createMenuItem("Save as", "", [weakThis]() { ++ if (!weakThis) ++ return; ++ CardinalModuleWidget__saveDialog(weakThis); ++ })); ++ ++ // Scan `/presets//` for presets. ++ menu->addChild(new ui::MenuSeparator); ++ menu->addChild(createMenuLabel("User presets")); ++ appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); ++ */ ++ ++ // Scan `/presets/` for presets. ++ appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); ++ })); ++ ++ // Initialize ++ menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->resetAction(); ++ })); ++ ++ // Randomize ++ menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->randomizeAction(); ++ })); ++ ++ // Disconnect cables ++ menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->disconnectAction(); ++ })); ++ ++ // Bypass ++ std::string bypassText = RACK_MOD_CTRL_NAME "+E"; ++ bool bypassed = module && module->isBypassed(); ++ if (bypassed) ++ bypassText += " " CHECKMARK_STRING; ++ menu->addChild(createMenuItem("Bypass", bypassText, [weakThis, bypassed]() { ++ if (!weakThis) ++ return; ++ weakThis->bypassAction(!bypassed); ++ })); ++ ++ // Duplicate ++ menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->cloneAction(false); ++ })); ++ ++ // Duplicate with cables ++ menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->cloneAction(true); ++ })); ++ ++ // Delete ++ menu->addChild(createMenuItem("Delete", "Backspace/Delete", [weakThis]() { ++ if (!weakThis) ++ return; ++ weakThis->removeAction(); ++ }, false, true)); + +- appendContextMenu(menu); ++ appendContextMenu(menu); + } + + math::Vec ModuleWidget::getGridPosition() { diff --git a/src/override/diffs/OpenGlWidget.cpp.diff b/src/override/diffs/OpenGlWidget.cpp.diff index 1fb7156e..3a18876c 100644 --- a/src/override/diffs/OpenGlWidget.cpp.diff +++ b/src/override/diffs/OpenGlWidget.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 19:49:12.201540766 +0100 -+++ OpenGlWidget.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/widget/OpenGlWidget.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ OpenGlWidget.cpp 2022-11-23 23:06:41.000000000 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index b364a2ac..5fac20af 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/Scene.cpp 2022-09-21 19:49:12.199540706 +0100 -+++ Scene.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/app/Scene.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ Scene.cpp 2022-11-25 22:32:04.000000000 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index 2e273a4b..be862b64 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/window/Window.cpp 2022-09-21 19:49:12.202540796 +0100 -+++ Window.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/window/Window.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ Window.cpp 2022-11-25 22:32:06.000000000 +0000 @@ -1,33 +1,87 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/blendish.c.diff b/src/override/diffs/blendish.c.diff index 90a2481b..907df01f 100644 --- a/src/override/diffs/blendish.c.diff +++ b/src/override/diffs/blendish.c.diff @@ -1,5 +1,5 @@ ---- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 19:49:29.973066921 +0100 -+++ blendish.c 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/dep/oui-blendish/blendish.c 2022-11-23 23:11:56.000000000 +0000 ++++ blendish.c 2022-11-23 23:06:41.000000000 +0000 @@ -61,7 +61,7 @@ } diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index 3a415867..36b5215d 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/common.cpp 2022-09-21 19:49:12.199540706 +0100 -+++ common.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/common.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ common.cpp 2022-11-25 22:32:13.000000000 +0000 @@ -1,33 +1,77 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/context.cpp.diff b/src/override/diffs/context.cpp.diff index 8b6fa4d4..837b5b93 100644 --- a/src/override/diffs/context.cpp.diff +++ b/src/override/diffs/context.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/context.cpp 2022-09-21 19:49:12.199540706 +0100 -+++ context.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/context.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ context.cpp 2022-11-25 22:31:32.000000000 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -31,21 +31,22 @@ #include #include #include -@@ -6,9 +33,13 @@ +@@ -6,10 +33,14 @@ #include #include +#ifdef NDEBUG +# undef DEBUG +#endif - --namespace rack { ++ +#include "DistrhoUtils.hpp" -+namespace rack { + namespace rack { +- Context::~Context() { // Deleting NULL is safe in C++. + @@ -44,7 +75,7 @@ static thread_local Context* threadContext = NULL; diff --git a/src/override/diffs/minblep.cpp.diff b/src/override/diffs/minblep.cpp.diff index 5d549e80..b97a6f7b 100644 --- a/src/override/diffs/minblep.cpp.diff +++ b/src/override/diffs/minblep.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/dsp/minblep.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ minblep.cpp 2022-09-21 19:41:45.884648820 +0100 +--- ../Rack/src/dsp/minblep.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ minblep.cpp 2022-11-23 23:06:41.000000000 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/plugin.cpp.diff b/src/override/diffs/plugin.cpp.diff index e95f3772..c2c7027c 100644 --- a/src/override/diffs/plugin.cpp.diff +++ b/src/override/diffs/plugin.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ plugin.cpp 2022-09-21 19:41:45.884648820 +0100 +--- ../Rack/src/plugin.cpp 2022-11-23 23:11:38.000000000 +0000 ++++ plugin.cpp 2022-11-25 23:27:58.000000000 +0000 @@ -1,342 +1,41 @@ -#include -#include @@ -372,7 +372,15 @@ /** Given slug => fallback slug. -@@ -389,8 +88,19 @@ +@@ -348,6 +47,7 @@ + {"VultModules", "VultModulesFree"}, + {"AudibleInstrumentsPreview", "AudibleInstruments"}, + {"SequelSequencers", "DanielDavies"}, ++ {"DelexanderVol1", "DelexandraVol1"}, + // {"", ""}, + }; + +@@ -389,8 +89,19 @@ */ using PluginModuleSlug = std::tuple; static const std::map moduleSlugFallbacks = { @@ -393,7 +401,7 @@ // {{"", ""}, {"", ""}}, }; -@@ -478,7 +188,6 @@ +@@ -478,7 +189,6 @@ } From 7a9365ed0d1af21dc5dce1181de9b69d2aead5a7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 30 Nov 2022 21:57:33 +0000 Subject: [PATCH 117/451] Update PathSet, patch stoermelder-packone Mb Signed-off-by: falkTX --- plugins/PathSet | 2 +- plugins/stoermelder-packone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PathSet b/plugins/PathSet index 30e35f94..66e69a2f 160000 --- a/plugins/PathSet +++ b/plugins/PathSet @@ -1 +1 @@ -Subproject commit 30e35f9414329ed6545ef328fd5951d4cf583362 +Subproject commit 66e69a2f2047e3dab06275b12852e56d143388cf diff --git a/plugins/stoermelder-packone b/plugins/stoermelder-packone index 9b9c203c..a8568502 160000 --- a/plugins/stoermelder-packone +++ b/plugins/stoermelder-packone @@ -1 +1 @@ -Subproject commit 9b9c203cbd8b58b3dc95dafc355b43c1fce6dc11 +Subproject commit a8568502e2fa589d1dee50e32a7cb8311f404090 From 26f981f843d70594f3d507803ae955717b1bd9e4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 09:40:45 +0000 Subject: [PATCH 118/451] More details for Stoermelder Pack-One, dynamic theme changes Signed-off-by: falkTX --- README.md | 1 + docs/LICENSES.md | 3 +++ include/engine/Port.hpp | 2 +- include/simd/Vector.hpp | 2 +- plugins/Makefile | 10 +++++++--- plugins/plugins.cpp | 8 ++------ plugins/stoermelder-packone | 2 +- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1606cc7d..acc8c842 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,7 @@ At the moment the following 3rd-party modules are provided: - repelzen - Sonus Modular - stocaudio +- Stoermelder Pack-One - unless_modules - Valley - Voxglitch diff --git a/docs/LICENSES.md b/docs/LICENSES.md index fda67aa2..825879e4 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -75,6 +75,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | RebelTech | GPL-2.0-or-later | | | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | +| Stoermelder Pack-One | GPL-3.0-or-later | | | unless_modules | GPL-3.0-or-later | | | Valley | GPL-3.0-or-later | | | Voxglitch | GPL-3.0-or-later | | @@ -212,6 +213,8 @@ Below is a list of artwork licenses from plugins | RebelTech/* | CC-BY-NC-4.0 | | | sonusmodular/* | GPL-3.0-or-later | [Same license as source code](https://gitlab.com/sonusdept/sonusmodular/-/issues/14) | | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | +| stoermelder-packone/* | GPL-3.0-or-later | No artwork specific license provided | +| stoermelder-packone/fonts/RedkostComic.otf | OFL-1.1-RFN | | | unless_modules/* | CC-BY-NC-ND-4.0 | | | unless_modules/font/CuteFont-Regular.ttf| OFL-1.1 | | | unless_modules/font/Terminus.ttf | GPL-2.0-or-later | [Starting from v4.32, font license is OFL-1.1](https://files.ax86.net/terminus-ttf/#license) | diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index 98a3a418..748e71fc 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -33,7 +33,7 @@ #include /** NOTE alignas is required in some systems in order to allow SSE usage. */ -#define SIMD_ALIGN alignas(32) +#define SIMD_ALIGN alignas(16) namespace rack { diff --git a/include/simd/Vector.hpp b/include/simd/Vector.hpp index 520bfa03..091af1b1 100644 --- a/include/simd/Vector.hpp +++ b/include/simd/Vector.hpp @@ -31,7 +31,7 @@ #include /** NOTE alignas is required in some systems in order to allow SSE usage. */ -#define SIMD_ALIGN alignas(32) +#define SIMD_ALIGN alignas(16) namespace rack { diff --git a/plugins/Makefile b/plugins/Makefile index bf267382..67331759 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -904,10 +904,14 @@ PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/* # -------------------------------------------------------------- # stoermelder-packone -STOERMELDER_PACKONE_IGNORED = AudioInterface64 MidiCat MidiKey MidiMon MidiPlug MidiStep Strip StripBay StripPp +# will never work +STOERMELDER_PACKONE_IGNORED = AudioInterface64 -# FIXME -STOERMELDER_PACKONE_IGNORED += Raw +# maybe? +STOERMELDER_PACKONE_IGNORED += MidiCat MidiCatCtx MidiCatMem MidiKey MidiMon MidiPlug MidiStep + +# TODO osdialog replacements +STOERMELDER_PACKONE_IGNORED += Strip StripBay StripPp PLUGIN_FILES += $(filter-out $(STOERMELDER_PACKONE_IGNORED:%=stoermelder-packone/src/%.cpp),$(wildcard stoermelder-packone/src/*.cpp stoermelder-packone/src/mb/*.cpp)) diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index fe3ada9f..9e7c5069 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -719,13 +719,12 @@ void addThemeMenuItems(Menu*, ModuleTheme*) {} #include "stoermelder-packone/src/plugin.hpp" Model* modelAudioInterface64; Model* modelMidiCat; -Model* modelMidiCatMem; Model* modelMidiCatCtx; +Model* modelMidiCatMem; Model* modelMidiKey; Model* modelMidiMon; Model* modelMidiPlug; Model* modelMidiStep; -Model* modelRaw; Model* modelStrip; Model* modelStripBay4; Model* modelStripPp; @@ -2810,10 +2809,7 @@ static void initStatic__stoermelder_packone() p->addModel(modelDirt); p->addModel(modelMb); p->addModel(modelMe); - - // NOTE disabled in Cardinal due to curl usage - // p->addModel(modelRaw); - spl.removeModule("Raw"); + p->addModel(modelRaw); spl.removeModule("AudioInterface64"); spl.removeModule("MidiCat"); diff --git a/plugins/stoermelder-packone b/plugins/stoermelder-packone index a8568502..eb4f150f 160000 --- a/plugins/stoermelder-packone +++ b/plugins/stoermelder-packone @@ -1 +1 @@ -Subproject commit a8568502e2fa589d1dee50e32a7cb8311f404090 +Subproject commit eb4f150fa707ed5562d5aaeb2a04cc81b6097c39 From 977ea87310162f4571f317e07a3fe7687b954f18 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 18:13:20 +0000 Subject: [PATCH 119/451] Finalize stoermelder-p1 changes, all but audio and midi modules Signed-off-by: falkTX --- plugins/Makefile | 7 +++---- plugins/plugins.cpp | 12 ++++++------ plugins/stoermelder-packone | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 67331759..811d21a4 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -904,15 +904,14 @@ PLUGIN_FILES += $(filter-out stocaudio/src/plugin.cpp,$(wildcard stocaudio/src/* # -------------------------------------------------------------- # stoermelder-packone +STOERMELDER_PACKONE_IGNORED = pluginsettings + # will never work -STOERMELDER_PACKONE_IGNORED = AudioInterface64 +STOERMELDER_PACKONE_IGNORED += AudioInterface64 # maybe? STOERMELDER_PACKONE_IGNORED += MidiCat MidiCatCtx MidiCatMem MidiKey MidiMon MidiPlug MidiStep -# TODO osdialog replacements -STOERMELDER_PACKONE_IGNORED += Strip StripBay StripPp - PLUGIN_FILES += $(filter-out $(STOERMELDER_PACKONE_IGNORED:%=stoermelder-packone/src/%.cpp),$(wildcard stoermelder-packone/src/*.cpp stoermelder-packone/src/mb/*.cpp)) # modules/types which are present in other plugins diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 9e7c5069..8e27e251 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -725,9 +725,9 @@ Model* modelMidiKey; Model* modelMidiMon; Model* modelMidiPlug; Model* modelMidiStep; -Model* modelStrip; -Model* modelStripBay4; -Model* modelStripPp; +StoermelderSettings pluginSettings; +void StoermelderSettings::saveToJson() {} +void StoermelderSettings::readFromJson() {} // unless_modules #include "unless_modules/src/unless.hpp" @@ -2810,6 +2810,9 @@ static void initStatic__stoermelder_packone() p->addModel(modelMb); p->addModel(modelMe); p->addModel(modelRaw); + p->addModel(modelStrip); + p->addModel(modelStripBay4); + p->addModel(modelStripPp); spl.removeModule("AudioInterface64"); spl.removeModule("MidiCat"); @@ -2819,9 +2822,6 @@ static void initStatic__stoermelder_packone() spl.removeModule("MidiMon"); spl.removeModule("MidiPlug"); spl.removeModule("MidiStep"); - spl.removeModule("Strip"); - spl.removeModule("StripBay4"); - spl.removeModule("StripPp"); } } diff --git a/plugins/stoermelder-packone b/plugins/stoermelder-packone index eb4f150f..ec3c0972 160000 --- a/plugins/stoermelder-packone +++ b/plugins/stoermelder-packone @@ -1 +1 @@ -Subproject commit eb4f150fa707ed5562d5aaeb2a04cc81b6097c39 +Subproject commit ec3c0972440edddfb00d5e5ad189f345c68be471 From da56d13cf7a33c73f0b3c4a86615d9b0f6c51e36 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 19:06:00 +0000 Subject: [PATCH 120/451] Finalize stoermelder-packone Signed-off-by: falkTX --- plugins/Makefile | 10 ++++++---- plugins/plugins.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 811d21a4..c0d7374c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -915,7 +915,8 @@ STOERMELDER_PACKONE_IGNORED += MidiCat MidiCatCtx MidiCatMem MidiKey MidiMon Mid PLUGIN_FILES += $(filter-out $(STOERMELDER_PACKONE_IGNORED:%=stoermelder-packone/src/%.cpp),$(wildcard stoermelder-packone/src/*.cpp stoermelder-packone/src/mb/*.cpp)) # modules/types which are present in other plugins -STOERMELDER_PACKONE_CUSTOM = +STOERMELDER_PACKONE_CUSTOM = LongPressButton +STOERMELDER_PACKONE_CUSTOM_PER_FILE = InputLedDisplay IntermixEnvModule # -------------------------------------------------------------- # unless_modules @@ -2029,9 +2030,10 @@ $(BUILD_DIR)/stoermelder-packone/%.cpp.o: stoermelder-packone/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ - $(foreach m,$(STOERMELDER_PACKONE_CUSTOM),$(call custom_module_names,$(m),stoermelder_packone)) \ - -DpluginInstance=pluginInstance__stoermelder_packone \ - -Dinit=init__stoermelder_packone + $(foreach m,$(STOERMELDER_PACKONE_CUSTOM),$(call custom_module_names,$(m),stoermelder_p1)) \ + $(foreach m,$(STOERMELDER_PACKONE_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),stoermelder_p1_$(shell basename $*))) \ + -DpluginInstance=pluginInstance__stoermelder_p1 \ + -Dinit=init__stoermelder_p1 $(BUILD_DIR)/stocaudio/%.cpp.o: stocaudio/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 8e27e251..6a9bb5e1 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -840,7 +840,7 @@ Plugin* pluginInstance__RebelTech; Plugin* pluginInstance__repelzen; Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; -extern Plugin* pluginInstance__stoermelder_packone; +extern Plugin* pluginInstance__stoermelder_p1; Plugin* pluginInstance__unless_modules; Plugin* pluginInstance__ValleyAudio; Plugin* pluginInstance__Voxglitch; @@ -2760,10 +2760,10 @@ static void initStatic__stocaudio() } } -static void initStatic__stoermelder_packone() +static void initStatic__stoermelder_p1() { Plugin* const p = new Plugin; - pluginInstance__stoermelder_packone = p; + pluginInstance__stoermelder_p1 = p; const StaticPluginLoader spl(p, "stoermelder-packone"); if (spl.ok()) @@ -3023,7 +3023,7 @@ void initStaticPlugins() initStatic__repelzen(); initStatic__sonusmodular(); initStatic__stocaudio(); - initStatic__stoermelder_packone(), + initStatic__stoermelder_p1(), initStatic__unless_modules(); initStatic__ValleyAudio(); initStatic__Voxglitch(); From b98283034d963a8d9810b5104f6b3931c6bd55d7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 20:42:15 +0000 Subject: [PATCH 121/451] Reduce diff vs Rack, regarding ModuleWidget.cpp file Signed-off-by: falkTX --- src/CardinalModuleWidget.cpp | 37 -- src/override/ModuleWidget.cpp | 488 ++++++++++--------- src/override/diffs/Engine.cpp.diff | 4 +- src/override/diffs/MenuBar.cpp.diff | 4 +- src/override/diffs/Model.cpp.diff | 4 +- src/override/diffs/ModuleWidget.cpp.diff | 592 +++++------------------ src/override/diffs/OpenGlWidget.cpp.diff | 4 +- src/override/diffs/Scene.cpp.diff | 4 +- src/override/diffs/Window.cpp.diff | 4 +- src/override/diffs/blendish.c.diff | 4 +- src/override/diffs/common.cpp.diff | 4 +- src/override/diffs/context.cpp.diff | 13 +- src/override/diffs/minblep.cpp.diff | 4 +- src/override/diffs/plugin.cpp.diff | 4 +- 14 files changed, 404 insertions(+), 766 deletions(-) diff --git a/src/CardinalModuleWidget.cpp b/src/CardinalModuleWidget.cpp index 854e2fd1..7adc2fc5 100644 --- a/src/CardinalModuleWidget.cpp +++ b/src/CardinalModuleWidget.cpp @@ -45,43 +45,6 @@ namespace rack { namespace app { -// Create ModulePresetPathItems for each patch in a directory. -static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget, std::string presetDir) { - bool foundPresets = false; - - if (system::isDirectory(presetDir)) - { - // Note: This is not cached, so opening this menu each time might have a bit of latency. - std::vector entries = system::getEntries(presetDir); - std::sort(entries.begin(), entries.end()); - for (std::string path : entries) { - std::string name = system::getStem(path); - // Remove "1_", "42_", "001_", etc at the beginning of preset filenames - std::regex r("^\\d+_"); - name = std::regex_replace(name, r, ""); - - if (system::getExtension(path) == ".vcvm" && name != "template") - { - if (!foundPresets) - menu->addChild(new ui::MenuSeparator); - - foundPresets = true; - - menu->addChild(createMenuItem(name, "", [=]() { - if (!moduleWidget) - return; - try { - moduleWidget->loadAction(path); - } - catch (Exception& e) { - async_dialog_message(e.what()); - } - })); - } - } - } -}; - static void CardinalModuleWidget__saveSelectionDialog(RackWidget* const w) { std::string selectionDir = asset::user("selections"); diff --git a/src/override/ModuleWidget.cpp b/src/override/ModuleWidget.cpp index 438b8cf5..002c510f 100644 --- a/src/override/ModuleWidget.cpp +++ b/src/override/ModuleWidget.cpp @@ -397,71 +397,71 @@ void ModuleWidget::onHoverKey(const HoverKeyEvent& e) { } void ModuleWidget::onButton(const ButtonEvent& e) { - const bool selected = APP->scene->rack->isSelected(this); - - if (selected) { - if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { - if (e.action == GLFW_PRESS) { - // Open selection context menu on right-click - ui::Menu* menu = createMenu(); - patchUtils::appendSelectionContextMenu(menu); - } - e.consume(this); - } - - if (e.button == GLFW_MOUSE_BUTTON_LEFT) { - if (e.action == GLFW_PRESS) { - // Toggle selection on Shift-click - if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, false); - e.consume(NULL); - return; - } - - // If module positions are locked, don't consume left-click - if (settings::lockModules) { - return; - } - - internal->dragOffset = e.pos; - } - - e.consume(this); - } - - return; - } - - // Dispatch event to children - Widget::onButton(e); - e.stopPropagating(); - if (e.isConsumed()) - return; - - if (e.button == GLFW_MOUSE_BUTTON_LEFT) { - if (e.action == GLFW_PRESS) { - // Toggle selection on Shift-click - if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { - APP->scene->rack->select(this, true); - e.consume(NULL); - return; - } - - // If module positions are locked, don't consume left-click - if (settings::lockModules) { - return; - } - - internal->dragOffset = e.pos; - } - e.consume(this); - } - - // Open context menu on right-click - if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { - createContextMenu(); - e.consume(this); - } + bool selected = APP->scene->rack->isSelected(this); + + if (selected) { + if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { + if (e.action == GLFW_PRESS) { + // Open selection context menu on right-click + ui::Menu* menu = createMenu(); + patchUtils::appendSelectionContextMenu(menu); + } + e.consume(this); + } + + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, false); + e.consume(NULL); + return; + } + + // If module positions are locked, don't consume left-click + if (settings::lockModules) { + return; + } + + internal->dragOffset = e.pos; + } + + e.consume(this); + } + + return; + } + + // Dispatch event to children + Widget::onButton(e); + e.stopPropagating(); + if (e.isConsumed()) + return; + + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + if (e.action == GLFW_PRESS) { + // Toggle selection on Shift-click + if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { + APP->scene->rack->select(this, true); + e.consume(NULL); + return; + } + + // If module positions are locked, don't consume left-click + if (settings::lockModules) { + return; + } + + internal->dragOffset = e.pos; + } + e.consume(this); + } + + // Open context menu on right-click + if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { + createContextMenu(); + e.consume(this); + } } void ModuleWidget::onDragStart(const DragStartEvent& e) { @@ -653,37 +653,39 @@ void ModuleWidget::loadTemplate() { } void ModuleWidget::loadDialog() { - std::string presetDir = model->getUserPresetDirectory(); - system::createDirectories(presetDir); - - WeakPtr weakThis = this; - - async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { - // Delete directories if empty - DEFER({ - try { - system::remove(presetDir); - system::remove(system::getDirectory(presetDir)); - } - catch (Exception& e) { - // Ignore exceptions if directory cannot be removed. - } - }); - - if (!weakThis) - return; - if (!pathC) - return; - - try { - weakThis->loadAction(pathC); - } - catch (Exception& e) { - async_dialog_message(e.what()); - } - - std::free(pathC); - }); + std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); + + WeakPtr weakThis = this; + async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { + + // Delete directories if empty + DEFER({ + try { + system::remove(presetDir); + system::remove(system::getDirectory(presetDir)); + } + catch (Exception& e) { + // Ignore exceptions if directory cannot be removed. + } + }); + + if (!weakThis) + return; + if (!pathC) { + // No path selected + return; + } + DEFER({std::free(pathC);}); + + try { + weakThis->loadAction(pathC); + } + catch (Exception& e) { + async_dialog_message(e.what()); + } + + }); } void ModuleWidget::save(std::string filename) { @@ -742,37 +744,38 @@ void ModuleWidget::clearTemplateDialog() { } void ModuleWidget::saveDialog() { - const std::string presetDir = model->getUserPresetDirectory(); - system::createDirectories(presetDir); - - WeakPtr weakThis = this; - - async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { - // Delete directories if empty - DEFER({ - try { - system::remove(presetDir); - system::remove(system::getDirectory(presetDir)); - } - catch (Exception& e) { - // Ignore exceptions if directory cannot be removed. - } - }); - - if (!weakThis) - return; - if (!pathC) - return; - - std::string path = pathC; - std::free(pathC); - - // Automatically append .vcvm extension - if (system::getExtension(path) != ".vcvm") - path += ".vcvm"; - - weakThis->save(path); - }); + std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); + + WeakPtr weakThis = this; + async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { + + // Delete directories if empty + DEFER({ + try { + system::remove(presetDir); + system::remove(system::getDirectory(presetDir)); + } + catch (Exception& e) { + // Ignore exceptions if directory cannot be removed. + } + }); + + if (!weakThis) + return; + if (!pathC) { + // No path selected + return; + } + DEFER({std::free(pathC);}); + + std::string path = pathC; + // Automatically append .vcvm extension + if (system::getExtension(path) != ".vcvm") + path += ".vcvm"; + + weakThis->save(path); + }); } void ModuleWidget::disconnect() { @@ -975,16 +978,12 @@ static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget std::regex r("^\\d+_"); name = std::regex_replace(name, r, ""); - if (system::isDirectory(path)) { - hasPresets = true; - - menu->addChild(createSubmenuItem(name, "", [=](ui::Menu* menu) { - if (!moduleWidget) - return; - appendPresetItems(menu, moduleWidget, path); - })); + if (false) { } else if (system::getExtension(path) == ".vcvm" && name != "template") { + if (!hasPresets) + menu->addChild(new ui::MenuSeparator); + hasPresets = true; menu->addChild(createMenuItem(name, "", [=]() { @@ -994,15 +993,12 @@ static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget moduleWidget->loadAction(path); } catch (Exception& e) { - osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, e.what()); + async_dialog_message(e.what()); } })); } } } - if (!hasPresets) { - menu->addChild(createMenuLabel("(None)")); - } }; @@ -1012,108 +1008,122 @@ void ModuleWidget::createContextMenu() { WeakPtr weakThis = this; - // Brand and module name - menu->addChild(createMenuLabel(model->name)); - menu->addChild(createMenuLabel(model->plugin->brand)); + // Brand and module name + menu->addChild(createMenuLabel(model->name)); + menu->addChild(createMenuLabel(model->plugin->brand)); + + // Info + menu->addChild(createSubmenuItem("Info", "", [=](ui::Menu* menu) { + model->appendContextMenu(menu); + })); + + // Preset + menu->addChild(createSubmenuItem("Preset", "", [=](ui::Menu* menu) { + menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [=]() { + if (!weakThis) + return; + weakThis->copyClipboard(); + })); + + menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [=]() { + if (!weakThis) + return; + weakThis->pasteClipboardAction(); + })); + + menu->addChild(createMenuItem("Open", "", [=]() { + if (!weakThis) + return; + weakThis->loadDialog(); + })); + + /* TODO requires setting up user dir + menu->addChild(createMenuItem("Save as", "", [=]() { + if (!weakThis) + return; + weakThis->saveDialog(); + })); + + menu->addChild(createMenuItem("Save default", "", [=]() { + if (!weakThis) + return; + weakThis->saveTemplateDialog(); + })); + + menu->addChild(createMenuItem("Clear default", "", [=]() { + if (!weakThis) + return; + weakThis->clearTemplateDialog(); + }, !weakThis->hasTemplate())); + + // Scan `/presets//` for presets. + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("User presets")); + appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); + */ + + // Scan `/presets/` for presets. + /* TODO enable only after setting up user dir + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("Factory presets")); + */ + appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); + })); + + // Initialize + menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [=]() { + if (!weakThis) + return; + weakThis->resetAction(); + })); + + // Randomize + menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [=]() { + if (!weakThis) + return; + weakThis->randomizeAction(); + })); + + // Disconnect cables + menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [=]() { + if (!weakThis) + return; + weakThis->disconnectAction(); + })); + + // Bypass + std::string bypassText = RACK_MOD_CTRL_NAME "+E"; + bool bypassed = module && module->isBypassed(); + if (bypassed) + bypassText += " " CHECKMARK_STRING; + menu->addChild(createMenuItem("Bypass", bypassText, [=]() { + if (!weakThis) + return; + weakThis->bypassAction(!bypassed); + })); + + // Duplicate + menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [=]() { + if (!weakThis) + return; + weakThis->cloneAction(false); + })); - // Info - menu->addChild(createSubmenuItem("Info", "", [weakThis](ui::Menu* menu) { + // Duplicate with cables + menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [=]() { if (!weakThis) return; - weakThis->model->appendContextMenu(menu); - })); - - // Preset - menu->addChild(createSubmenuItem("Preset", "", [weakThis](ui::Menu* menu) { - menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [weakThis]() { - if (!weakThis) - return; - weakThis->copyClipboard(); - })); - - menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [weakThis]() { - if (!weakThis) - return; - weakThis->pasteClipboardAction(); - })); - - menu->addChild(createMenuItem("Open", "", [weakThis]() { - if (!weakThis) - return; - weakThis->loadDialog(); - })); - - /* TODO requires setting up user dir - menu->addChild(createMenuItem("Save as", "", [weakThis]() { - if (!weakThis) - return; - CardinalModuleWidget__saveDialog(weakThis); - })); - - // Scan `/presets//` for presets. - menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("User presets")); - appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); - */ - - // Scan `/presets/` for presets. - appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); - })); - - // Initialize - menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [weakThis]() { - if (!weakThis) - return; - weakThis->resetAction(); - })); - - // Randomize - menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [weakThis]() { - if (!weakThis) - return; - weakThis->randomizeAction(); - })); - - // Disconnect cables - menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [weakThis]() { - if (!weakThis) - return; - weakThis->disconnectAction(); - })); - - // Bypass - std::string bypassText = RACK_MOD_CTRL_NAME "+E"; - bool bypassed = module && module->isBypassed(); - if (bypassed) - bypassText += " " CHECKMARK_STRING; - menu->addChild(createMenuItem("Bypass", bypassText, [weakThis, bypassed]() { - if (!weakThis) - return; - weakThis->bypassAction(!bypassed); - })); - - // Duplicate - menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [weakThis]() { - if (!weakThis) - return; - weakThis->cloneAction(false); - })); - - // Duplicate with cables - menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [weakThis]() { - if (!weakThis) - return; - weakThis->cloneAction(true); - })); - - // Delete - menu->addChild(createMenuItem("Delete", "Backspace/Delete", [weakThis]() { - if (!weakThis) - return; - weakThis->removeAction(); - }, false, true)); - - appendContextMenu(menu); + weakThis->cloneAction(true); + })); + + // Delete + menu->addChild(createMenuItem("Delete", "Backspace/Delete", [=]() { + if (!weakThis) + return; + weakThis->removeAction(); + }, false, true)); + + appendContextMenu(menu); } math::Vec ModuleWidget::getGridPosition() { @@ -1148,4 +1158,4 @@ engine::Module* ModuleWidget::releaseModule() { } // namespace app -} // namespace rack \ No newline at end of file +} // namespace rack diff --git a/src/override/diffs/Engine.cpp.diff b/src/override/diffs/Engine.cpp.diff index 59d94965..89c13e40 100644 --- a/src/override/diffs/Engine.cpp.diff +++ b/src/override/diffs/Engine.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/engine/Engine.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ Engine.cpp 2022-11-25 22:31:29.000000000 +0000 +--- ../Rack/src/engine/Engine.cpp 2022-09-21 20:25:53.592040301 +0100 ++++ Engine.cpp 2022-11-29 19:49:19.196926572 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index 186ef5f8..ece100e0 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/MenuBar.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ MenuBar.cpp 2022-11-25 23:27:58.000000000 +0000 +--- ../Rack/src/app/MenuBar.cpp 2022-09-21 20:25:53.590040258 +0100 ++++ MenuBar.cpp 2022-11-29 19:49:19.196926572 +0000 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index cbe6c0f1..f1ad26c0 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin/Model.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ Model.cpp 2022-11-23 23:06:41.000000000 +0000 +--- ../Rack/src/plugin/Model.cpp 2022-09-21 20:25:53.592040301 +0100 ++++ Model.cpp 2022-09-21 20:18:50.294557597 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/ModuleWidget.cpp.diff b/src/override/diffs/ModuleWidget.cpp.diff index 1c9300b8..c32ce74f 100644 --- a/src/override/diffs/ModuleWidget.cpp.diff +++ b/src/override/diffs/ModuleWidget.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/ModuleWidget.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ ModuleWidget.cpp 2022-11-30 20:10:06.000000000 +0000 +--- ../Rack/src/app/ModuleWidget.cpp 2022-09-21 20:25:53.590040258 +0100 ++++ ModuleWidget.cpp 2022-12-01 20:41:02.583687336 +0000 @@ -1,3 +1,32 @@ +/* + * DISTRHO Cardinal Plugin @@ -33,485 +33,151 @@ #include #include -@@ -368,71 +397,71 @@ - } - - void ModuleWidget::onButton(const ButtonEvent& e) { -- bool selected = APP->scene->rack->isSelected(this); -- -- if (selected) { -- if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { -- if (e.action == GLFW_PRESS) { -- // Open selection context menu on right-click -- ui::Menu* menu = createMenu(); +@@ -375,7 +404,7 @@ + if (e.action == GLFW_PRESS) { + // Open selection context menu on right-click + ui::Menu* menu = createMenu(); - APP->scene->rack->appendSelectionContextMenu(menu); -- } -- e.consume(this); -- } -- -- if (e.button == GLFW_MOUSE_BUTTON_LEFT) { -- if (e.action == GLFW_PRESS) { -- // Toggle selection on Shift-click -- if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { -- APP->scene->rack->select(this, false); -- e.consume(NULL); -- return; -- } -- -- // If module positions are locked, don't consume left-click -- if (settings::lockModules) { -- return; -- } -+ const bool selected = APP->scene->rack->isSelected(this); - -- internal->dragOffset = e.pos; -- } -- -- e.consume(this); -- } -- -- return; -- } -- -- // Dispatch event to children -- Widget::onButton(e); -- e.stopPropagating(); -- if (e.isConsumed()) -- return; -- -- if (e.button == GLFW_MOUSE_BUTTON_LEFT) { -- if (e.action == GLFW_PRESS) { -- // Toggle selection on Shift-click -- if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { -- APP->scene->rack->select(this, true); -- e.consume(NULL); -- return; -- } -- -- // If module positions are locked, don't consume left-click -- if (settings::lockModules) { -- return; -- } -- -- internal->dragOffset = e.pos; -- } -- e.consume(this); -- } -- -- // Open context menu on right-click -- if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { -- createContextMenu(); -- e.consume(this); -- } -+ if (selected) { -+ if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { -+ if (e.action == GLFW_PRESS) { -+ // Open selection context menu on right-click -+ ui::Menu* menu = createMenu(); -+ patchUtils::appendSelectionContextMenu(menu); -+ } -+ e.consume(this); -+ } -+ -+ if (e.button == GLFW_MOUSE_BUTTON_LEFT) { -+ if (e.action == GLFW_PRESS) { -+ // Toggle selection on Shift-click -+ if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { -+ APP->scene->rack->select(this, false); -+ e.consume(NULL); -+ return; -+ } -+ -+ // If module positions are locked, don't consume left-click -+ if (settings::lockModules) { -+ return; -+ } -+ -+ internal->dragOffset = e.pos; -+ } -+ -+ e.consume(this); -+ } -+ -+ return; -+ } -+ -+ // Dispatch event to children -+ Widget::onButton(e); -+ e.stopPropagating(); -+ if (e.isConsumed()) -+ return; -+ -+ if (e.button == GLFW_MOUSE_BUTTON_LEFT) { -+ if (e.action == GLFW_PRESS) { -+ // Toggle selection on Shift-click -+ if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) { -+ APP->scene->rack->select(this, true); -+ e.consume(NULL); -+ return; -+ } -+ -+ // If module positions are locked, don't consume left-click -+ if (settings::lockModules) { -+ return; -+ } -+ -+ internal->dragOffset = e.pos; -+ } -+ e.consume(this); -+ } -+ -+ // Open context menu on right-click -+ if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) { -+ createContextMenu(); -+ e.consume(this); -+ } - } - - void ModuleWidget::onDragStart(const DragStartEvent& e) { -@@ -624,36 +653,37 @@ - } - - void ModuleWidget::loadDialog() { -- std::string presetDir = model->getUserPresetDirectory(); -- system::createDirectories(presetDir); -+ std::string presetDir = model->getUserPresetDirectory(); -+ system::createDirectories(presetDir); - -- // Delete directories if empty -- DEFER({ -- try { -- system::remove(presetDir); -- system::remove(system::getDirectory(presetDir)); -- } -- catch (Exception& e) { -- // Ignore exceptions if directory cannot be removed. -- } -- }); -+ WeakPtr weakThis = this; ++ patchUtils::appendSelectionContextMenu(menu); + } + e.consume(this); + } +@@ -627,6 +656,9 @@ + std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); + ++ WeakPtr weakThis = this; ++ async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { ++ + // Delete directories if empty + DEFER({ + try { +@@ -638,10 +670,8 @@ + } + }); - osdialog_filters* filters = osdialog_filters_parse(PRESET_FILTERS); - DEFER({osdialog_filters_free(filters);}); -+ async_dialog_filebrowser(false, nullptr, presetDir.c_str(), "Load preset", [=](char* pathC) { -+ // Delete directories if empty -+ DEFER({ -+ try { -+ system::remove(presetDir); -+ system::remove(system::getDirectory(presetDir)); -+ } -+ catch (Exception& e) { -+ // Ignore exceptions if directory cannot be removed. -+ } -+ }); -+ -+ if (!weakThis) -+ return; -+ if (!pathC) -+ return; -+ -+ try { -+ weakThis->loadAction(pathC); -+ } -+ catch (Exception& e) { -+ async_dialog_message(e.what()); -+ } - -- char* pathC = osdialog_file(OSDIALOG_OPEN, presetDir.c_str(), NULL, filters); -- if (!pathC) { -- // No path selected -- return; -- } -- DEFER({std::free(pathC);}); - -- try { +- char* pathC = osdialog_file(OSDIALOG_OPEN, presetDir.c_str(), NULL, filters); ++ if (!weakThis) ++ return; + if (!pathC) { + // No path selected + return; +@@ -649,11 +679,13 @@ + DEFER({std::free(pathC);}); + + try { - loadAction(pathC); -- } -- catch (Exception& e) { ++ weakThis->loadAction(pathC); + } + catch (Exception& e) { - osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, e.what()); -- } -+ std::free(pathC); -+ }); ++ async_dialog_message(e.what()); + } ++ ++ }); } void ModuleWidget::save(std::string filename) { -@@ -712,36 +742,37 @@ - } +@@ -715,6 +747,9 @@ + std::string presetDir = model->getUserPresetDirectory(); + system::createDirectories(presetDir); - void ModuleWidget::saveDialog() { -- std::string presetDir = model->getUserPresetDirectory(); -- system::createDirectories(presetDir); -+ const std::string presetDir = model->getUserPresetDirectory(); -+ system::createDirectories(presetDir); ++ WeakPtr weakThis = this; ++ async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { ++ + // Delete directories if empty + DEFER({ + try { +@@ -726,10 +761,8 @@ + } + }); -- // Delete directories if empty -- DEFER({ -- try { -- system::remove(presetDir); -- system::remove(system::getDirectory(presetDir)); -- } -- catch (Exception& e) { -- // Ignore exceptions if directory cannot be removed. -- } -- }); -- - osdialog_filters* filters = osdialog_filters_parse(PRESET_FILTERS); - DEFER({osdialog_filters_free(filters);}); - - char* pathC = osdialog_file(OSDIALOG_SAVE, presetDir.c_str(), "Untitled.vcvm", filters); -- if (!pathC) { -- // No path selected -- return; -- } -- DEFER({std::free(pathC);}); -+ WeakPtr weakThis = this; - -- std::string path = pathC; -- // Automatically append .vcvm extension -- if (system::getExtension(path) != ".vcvm") -- path += ".vcvm"; -+ async_dialog_filebrowser(true, "preset.vcvm", presetDir.c_str(), "Save preset", [=](char* pathC) { -+ // Delete directories if empty -+ DEFER({ -+ try { -+ system::remove(presetDir); -+ system::remove(system::getDirectory(presetDir)); -+ } -+ catch (Exception& e) { -+ // Ignore exceptions if directory cannot be removed. -+ } -+ }); -+ -+ if (!weakThis) -+ return; -+ if (!pathC) -+ return; -+ -+ std::string path = pathC; -+ std::free(pathC); -+ -+ // Automatically append .vcvm extension -+ if (system::getExtension(path) != ".vcvm") -+ path += ".vcvm"; ++ if (!weakThis) ++ return; + if (!pathC) { + // No path selected + return; +@@ -741,7 +774,8 @@ + if (system::getExtension(path) != ".vcvm") + path += ".vcvm"; - save(path); -+ weakThis->save(path); -+ }); ++ weakThis->save(path); ++ }); } void ModuleWidget::disconnect() { -@@ -981,118 +1012,108 @@ - - WeakPtr weakThis = this; - -- // Brand and module name -- menu->addChild(createMenuLabel(model->name)); -- menu->addChild(createMenuLabel(model->plugin->brand)); -- -- // Info -- menu->addChild(createSubmenuItem("Info", "", [=](ui::Menu* menu) { -- model->appendContextMenu(menu); -- })); -- -- // Preset -- menu->addChild(createSubmenuItem("Preset", "", [=](ui::Menu* menu) { -- menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [=]() { -- if (!weakThis) -- return; -- weakThis->copyClipboard(); -- })); -- -- menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [=]() { -- if (!weakThis) -- return; -- weakThis->pasteClipboardAction(); -- })); -- -- menu->addChild(createMenuItem("Open", "", [=]() { -- if (!weakThis) -- return; -- weakThis->loadDialog(); -- })); -- -- menu->addChild(createMenuItem("Save as", "", [=]() { -- if (!weakThis) -- return; -- weakThis->saveDialog(); -- })); -- -- menu->addChild(createMenuItem("Save default", "", [=]() { -- if (!weakThis) -- return; -- weakThis->saveTemplateDialog(); -- })); -- -- menu->addChild(createMenuItem("Clear default", "", [=]() { -- if (!weakThis) -- return; -- weakThis->clearTemplateDialog(); -- }, !weakThis->hasTemplate())); -- -- // Scan `/presets//` for presets. -- menu->addChild(new ui::MenuSeparator); -- menu->addChild(createMenuLabel("User presets")); -- appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); -- -- // Scan `/presets/` for presets. -- menu->addChild(new ui::MenuSeparator); -- menu->addChild(createMenuLabel("Factory presets")); -- appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); -- })); -+ // Brand and module name -+ menu->addChild(createMenuLabel(model->name)); -+ menu->addChild(createMenuLabel(model->plugin->brand)); - -- // Initialize -- menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [=]() { -+ // Info -+ menu->addChild(createSubmenuItem("Info", "", [weakThis](ui::Menu* menu) { - if (!weakThis) - return; -- weakThis->resetAction(); -- })); -+ weakThis->model->appendContextMenu(menu); -+ })); - -- // Randomize -- menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [=]() { -- if (!weakThis) -- return; -- weakThis->randomizeAction(); -- })); -- -- // Disconnect cables -- menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [=]() { -- if (!weakThis) -- return; -- weakThis->disconnectAction(); -- })); -- -- // Bypass -- std::string bypassText = RACK_MOD_CTRL_NAME "+E"; -- bool bypassed = module && module->isBypassed(); -- if (bypassed) -- bypassText += " " CHECKMARK_STRING; -- menu->addChild(createMenuItem("Bypass", bypassText, [=]() { -- if (!weakThis) -- return; -- weakThis->bypassAction(!bypassed); -- })); -- -- // Duplicate -- menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [=]() { -- if (!weakThis) -- return; -- weakThis->cloneAction(false); -- })); -- -- // Duplicate with cables -- menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [=]() { -- if (!weakThis) -- return; -- weakThis->cloneAction(true); -- })); -- -- // Delete -- menu->addChild(createMenuItem("Delete", "Backspace/Delete", [=]() { -- if (!weakThis) -- return; -- weakThis->removeAction(); -- }, false, true)); -+ // Preset -+ menu->addChild(createSubmenuItem("Preset", "", [weakThis](ui::Menu* menu) { -+ menu->addChild(createMenuItem("Copy", RACK_MOD_CTRL_NAME "+C", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->copyClipboard(); -+ })); -+ -+ menu->addChild(createMenuItem("Paste", RACK_MOD_CTRL_NAME "+V", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->pasteClipboardAction(); -+ })); -+ -+ menu->addChild(createMenuItem("Open", "", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->loadDialog(); -+ })); -+ -+ /* TODO requires setting up user dir -+ menu->addChild(createMenuItem("Save as", "", [weakThis]() { -+ if (!weakThis) -+ return; -+ CardinalModuleWidget__saveDialog(weakThis); -+ })); -+ -+ // Scan `/presets//` for presets. -+ menu->addChild(new ui::MenuSeparator); -+ menu->addChild(createMenuLabel("User presets")); -+ appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); -+ */ -+ -+ // Scan `/presets/` for presets. -+ appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); -+ })); -+ -+ // Initialize -+ menu->addChild(createMenuItem("Initialize", RACK_MOD_CTRL_NAME "+I", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->resetAction(); -+ })); -+ -+ // Randomize -+ menu->addChild(createMenuItem("Randomize", RACK_MOD_CTRL_NAME "+R", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->randomizeAction(); -+ })); -+ -+ // Disconnect cables -+ menu->addChild(createMenuItem("Disconnect cables", RACK_MOD_CTRL_NAME "+U", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->disconnectAction(); -+ })); -+ -+ // Bypass -+ std::string bypassText = RACK_MOD_CTRL_NAME "+E"; -+ bool bypassed = module && module->isBypassed(); -+ if (bypassed) -+ bypassText += " " CHECKMARK_STRING; -+ menu->addChild(createMenuItem("Bypass", bypassText, [weakThis, bypassed]() { -+ if (!weakThis) -+ return; -+ weakThis->bypassAction(!bypassed); -+ })); -+ -+ // Duplicate -+ menu->addChild(createMenuItem("Duplicate", RACK_MOD_CTRL_NAME "+D", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->cloneAction(false); -+ })); -+ -+ // Duplicate with cables -+ menu->addChild(createMenuItem("└ with cables", RACK_MOD_SHIFT_NAME "+" RACK_MOD_CTRL_NAME "+D", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->cloneAction(true); -+ })); -+ -+ // Delete -+ menu->addChild(createMenuItem("Delete", "Backspace/Delete", [weakThis]() { -+ if (!weakThis) -+ return; -+ weakThis->removeAction(); -+ }, false, true)); - -- appendContextMenu(menu); -+ appendContextMenu(menu); - } - - math::Vec ModuleWidget::getGridPosition() { +@@ -944,16 +978,12 @@ + std::regex r("^\\d+_"); + name = std::regex_replace(name, r, ""); + +- if (system::isDirectory(path)) { +- hasPresets = true; +- +- menu->addChild(createSubmenuItem(name, "", [=](ui::Menu* menu) { +- if (!moduleWidget) +- return; +- appendPresetItems(menu, moduleWidget, path); +- })); ++ if (false) { + } + else if (system::getExtension(path) == ".vcvm" && name != "template") { ++ if (!hasPresets) ++ menu->addChild(new ui::MenuSeparator); ++ + hasPresets = true; + + menu->addChild(createMenuItem(name, "", [=]() { +@@ -963,15 +993,12 @@ + moduleWidget->loadAction(path); + } + catch (Exception& e) { +- osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, e.what()); ++ async_dialog_message(e.what()); + } + })); + } + } + } +- if (!hasPresets) { +- menu->addChild(createMenuLabel("(None)")); +- } + }; + + +@@ -1010,6 +1037,7 @@ + weakThis->loadDialog(); + })); + ++ /* TODO requires setting up user dir + menu->addChild(createMenuItem("Save as", "", [=]() { + if (!weakThis) + return; +@@ -1032,10 +1060,13 @@ + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("User presets")); + appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); ++ */ + + // Scan `/presets/` for presets. ++ /* TODO enable only after setting up user dir + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("Factory presets")); ++ */ + appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); + })); + +@@ -1127,4 +1158,4 @@ + + + } // namespace app +-} // namespace rack +\ No newline at end of file ++} // namespace rack diff --git a/src/override/diffs/OpenGlWidget.cpp.diff b/src/override/diffs/OpenGlWidget.cpp.diff index 3a18876c..261123fa 100644 --- a/src/override/diffs/OpenGlWidget.cpp.diff +++ b/src/override/diffs/OpenGlWidget.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/widget/OpenGlWidget.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ OpenGlWidget.cpp 2022-11-23 23:06:41.000000000 +0000 +--- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 20:25:53.593040323 +0100 ++++ OpenGlWidget.cpp 2022-09-21 20:18:50.294557597 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index 5fac20af..4d1da9f7 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/Scene.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ Scene.cpp 2022-11-25 22:32:04.000000000 +0000 +--- ../Rack/src/app/Scene.cpp 2022-09-21 20:25:53.591040280 +0100 ++++ Scene.cpp 2022-09-21 20:18:50.294557597 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index be862b64..c9866e9c 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/window/Window.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ Window.cpp 2022-11-25 22:32:06.000000000 +0000 +--- ../Rack/src/window/Window.cpp 2022-09-21 20:25:53.593040323 +0100 ++++ Window.cpp 2022-09-21 20:18:50.294557597 +0100 @@ -1,33 +1,87 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/blendish.c.diff b/src/override/diffs/blendish.c.diff index 907df01f..d1c1b8a0 100644 --- a/src/override/diffs/blendish.c.diff +++ b/src/override/diffs/blendish.c.diff @@ -1,5 +1,5 @@ ---- ../Rack/dep/oui-blendish/blendish.c 2022-11-23 23:11:56.000000000 +0000 -+++ blendish.c 2022-11-23 23:06:41.000000000 +0000 +--- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 20:26:10.733413463 +0100 ++++ blendish.c 2022-09-21 20:18:50.294557597 +0100 @@ -61,7 +61,7 @@ } diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index 36b5215d..2569432c 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/common.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ common.cpp 2022-11-25 22:32:13.000000000 +0000 +--- ../Rack/src/common.cpp 2022-09-21 20:25:53.591040280 +0100 ++++ common.cpp 2022-09-21 20:18:50.294557597 +0100 @@ -1,33 +1,77 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/context.cpp.diff b/src/override/diffs/context.cpp.diff index 837b5b93..d34fba38 100644 --- a/src/override/diffs/context.cpp.diff +++ b/src/override/diffs/context.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/context.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ context.cpp 2022-11-25 22:31:32.000000000 +0000 +--- ../Rack/src/context.cpp 2022-09-21 20:25:53.591040280 +0100 ++++ context.cpp 2022-09-21 20:18:50.294557597 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -31,22 +31,21 @@ #include #include #include -@@ -6,10 +33,14 @@ +@@ -6,9 +33,13 @@ #include #include +#ifdef NDEBUG +# undef DEBUG +#endif -+ + +-namespace rack { +#include "DistrhoUtils.hpp" - namespace rack { ++namespace rack { -- Context::~Context() { // Deleting NULL is safe in C++. - @@ -44,7 +75,7 @@ static thread_local Context* threadContext = NULL; diff --git a/src/override/diffs/minblep.cpp.diff b/src/override/diffs/minblep.cpp.diff index b97a6f7b..2af153a4 100644 --- a/src/override/diffs/minblep.cpp.diff +++ b/src/override/diffs/minblep.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/dsp/minblep.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ minblep.cpp 2022-11-23 23:06:41.000000000 +0000 +--- ../Rack/src/dsp/minblep.cpp 2022-09-21 20:25:53.592040301 +0100 ++++ minblep.cpp 2022-09-21 20:18:50.295557620 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/plugin.cpp.diff b/src/override/diffs/plugin.cpp.diff index c2c7027c..c49eb23d 100644 --- a/src/override/diffs/plugin.cpp.diff +++ b/src/override/diffs/plugin.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin.cpp 2022-11-23 23:11:38.000000000 +0000 -+++ plugin.cpp 2022-11-25 23:27:58.000000000 +0000 +--- ../Rack/src/plugin.cpp 2022-09-21 20:25:53.592040301 +0100 ++++ plugin.cpp 2022-11-29 19:49:19.197926669 +0000 @@ -1,342 +1,41 @@ -#include -#include From 646befd590202e6daa383ced5cc9fffb87af01f9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 20:44:58 +0000 Subject: [PATCH 122/451] Fix Wine workaround Signed-off-by: falkTX --- src/override/common.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/override/common.cpp b/src/override/common.cpp index 191914e3..b61839f0 100644 --- a/src/override/common.cpp +++ b/src/override/common.cpp @@ -38,9 +38,11 @@ #include FILE* fopen_u8(const char* filename, const char* mode) { + if (FILE* const f = _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str())) + return f; if (std::strncmp(filename, "\\\\?\\", 4) == 0 && std::getenv("CARDINAL_UNDER_WINE") != nullptr) - filename = "Z:\\dev\\null"; - return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str()); + return _wfopen(L"Z:\\dev\\null", rack::string::UTF8toUTF16(mode).c_str()); + return nullptr; } #elif defined(DISTRHO_OS_WASM) From 1fe187b511642aa632b88888c23e7832dc90921d Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 21:01:15 +0000 Subject: [PATCH 123/451] Dark style for PathSet PlusPane Signed-off-by: falkTX --- src/custom/dep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 0cebcd0c..34c971e8 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -379,6 +379,7 @@ static const struct { { kModePathSet, "/PathSet/res/IceTray.svg", {}, -1 }, { kModePathSet, "/PathSet/res/Nudge.svg", {}, -1 }, { kModePathSet, "/PathSet/res/OneShot.svg", {}, -1 }, + { kModePathSet, "/PathSet/res/PlusPane.svg", {}, -1 }, { kModePathSet, "/PathSet/res/ShiftyExpander.svg", {}, -1 }, { kModePathSet, "/PathSet/res/ShiftyMod.svg", {}, -1 }, // BSD-3-Clause From 55c87c2ed8de7c65694e9f19f2ae7703466f0920 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 21:12:37 +0000 Subject: [PATCH 124/451] Update MindMeldModular, brings Patch Master Signed-off-by: falkTX --- plugins/Makefile | 1 + plugins/MindMeldModular | 2 +- plugins/plugins.cpp | 46 +++++++++++++++++++++++++++-------------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index c0d7374c..bfd8065c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -766,6 +766,7 @@ PLUGIN_FILES += $(wildcard MindMeldModular/src/*.cpp) PLUGIN_FILES += $(wildcard MindMeldModular/src/comp/*.cpp) PLUGIN_FILES += $(wildcard MindMeldModular/src/EqMaster/*.cpp) PLUGIN_FILES += $(wildcard MindMeldModular/src/MixMaster/*.cpp) +PLUGIN_FILES += $(wildcard MindMeldModular/src/PatchSet/*.cpp) PLUGIN_FILES += $(wildcard MindMeldModular/src/ShapeMaster/*.cpp) PLUGIN_FILES += $(wildcard MindMeldModular/src/Utilities/*.cpp) diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index 8e413a44..c1af4c2b 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit 8e413a445c1c307f356ee96633b7f6f2b4c4749e +Subproject commit c1af4c2b4faf7b50481a2cb71996302a7f03a43e diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 6a9bb5e1..3ad486eb 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -524,18 +524,25 @@ extern int panelTheme; /* NOTE too much noise in original include, do this a different way // #include "MindMeldModular/src/MindMeldModular.hpp" */ -extern Model* modelMixMasterJr; -extern Model* modelAuxExpanderJr; -extern Model* modelMixMaster; -extern Model* modelAuxExpander; -extern Model* modelMeld; -extern Model* modelUnmeld; -extern Model* modelMSMelder; -extern Model* modelEqMaster; -extern Model* modelEqExpander; -extern Model* modelBassMaster; -extern Model* modelBassMasterJr; -extern Model* modelShapeMaster; +extern Model *modelPatchMaster; +extern Model *modelPatchMasterBlank; +extern Model *modelRouteMasterMono5to1; +extern Model *modelRouteMasterStereo5to1; +extern Model *modelRouteMasterMono1to5; +extern Model *modelRouteMasterStereo1to5; +extern Model *modelMasterChannel; +extern Model *modelMeld; +extern Model *modelUnmeld; +extern Model *modelMSMelder; +extern Model *modelEqMaster; +extern Model *modelEqExpander; +extern Model *modelBassMaster; +extern Model *modelBassMasterJr; +extern Model *modelShapeMaster; +extern Model *modelMixMasterJr; +extern Model *modelAuxExpanderJr; +extern Model *modelMixMaster; +extern Model *modelAuxExpander; // ML_modules /* NOTE too much noise in original include, do this a different way @@ -2316,10 +2323,13 @@ static void initStatic__MindMeld() const StaticPluginLoader spl(p, "MindMeldModular"); if (spl.ok()) { - p->addModel(modelMixMasterJr); - p->addModel(modelAuxExpanderJr); - p->addModel(modelMixMaster); - p->addModel(modelAuxExpander); + p->addModel(modelPatchMaster); + p->addModel(modelPatchMasterBlank); + p->addModel(modelRouteMasterMono5to1); + p->addModel(modelRouteMasterStereo5to1); + p->addModel(modelRouteMasterMono1to5); + p->addModel(modelRouteMasterStereo1to5); + p->addModel(modelMasterChannel); p->addModel(modelMeld); p->addModel(modelUnmeld); p->addModel(modelMSMelder); @@ -2328,6 +2338,10 @@ static void initStatic__MindMeld() p->addModel(modelBassMaster); p->addModel(modelBassMasterJr); p->addModel(modelShapeMaster); + p->addModel(modelMixMasterJr); + p->addModel(modelAuxExpanderJr); + p->addModel(modelMixMaster); + p->addModel(modelAuxExpander); } } From 5b85e61d9ba55d5e790179ca670bf4bd6a10b116 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 1 Dec 2022 22:07:05 +0000 Subject: [PATCH 125/451] Update Befaco, adds PonyVCO Signed-off-by: falkTX --- plugins/Befaco | 2 +- plugins/Makefile | 2 +- plugins/plugins.cpp | 1 + src/custom/dep.cpp | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/Befaco b/plugins/Befaco index dcd9a59e..adcc9203 160000 --- a/plugins/Befaco +++ b/plugins/Befaco @@ -1 +1 @@ -Subproject commit dcd9a59ea785d7efebd39ea5564823c72f2fdddf +Subproject commit adcc9203245dae35ffc5a73020bdcc07ff90f557 diff --git a/plugins/Makefile b/plugins/Makefile index bfd8065c..7370c479 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -519,7 +519,7 @@ PLUGIN_FILES += $(wildcard Befaco/src/noise-plethora/*/*.cpp) PLUGIN_BINARIES += Befaco/src/SpringReverbIR.pcm # modules/types which are present in other plugins -BEFACO_CUSTOM = ADSR Mixer +BEFACO_CUSTOM = ADSR Mixer chowdsp # -------------------------------------------------------------- # Bidoo diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 3ad486eb..0658e7ae 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1468,6 +1468,7 @@ static void initStatic__Befaco() p->addModel(modelMex); p->addModel(modelNoisePlethora); p->addModel(modelChannelStrip); + p->addModel(modelPonyVCO); #undef modelADSR #undef modelMixer } diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 34c971e8..bac3bf39 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -475,6 +475,7 @@ static const struct { { kModeBefaco, "/Befaco/res/panels/Muxlicer.svg" }, { kModeBefaco, "/Befaco/res/panels/NoisePlethora.svg" }, { kModeBefaco, "/Befaco/res/panels/Percall.svg" }, + { kModeBefaco, "/Befaco/res/panels/PonyVCO.svg" }, { kModeBefaco, "/Befaco/res/panels/Rampage.svg" }, { kModeBefaco, "/Befaco/res/panels/STMix.svg" }, { kModeBefaco, "/Befaco/res/panels/SamplingModulator.svg" }, From d715d8c066e632ac409f11a5fd5661baf9a7fa06 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 2 Dec 2022 09:00:50 +0000 Subject: [PATCH 126/451] Find local resources dir for Windows standalones Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 5ee7fab8..e8405098 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 5ee7fab819433f1338e5290a0e03b358c59c44f3 +Subproject commit e8405098f40d0730ef4cdb4bb743897f6e7472ac From 0c00446480017c858169310d4cb913669d1b4bcd Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 2 Dec 2022 09:07:00 +0000 Subject: [PATCH 127/451] Add CardinalPortable to Windows zip build artifacts Signed-off-by: falkTX --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 734b7d90..b860f067 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -929,7 +929,10 @@ jobs: - name: Pack binaries run: | pushd bin - zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + mkdir CardinalPortable + mv CardinalNative.exe CardinalPortable/ + ln -s ../Cardinal.clap/resources CardinalPortable/ + zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap -e CardinalPortable) popd zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* - uses: actions/upload-artifact@v3 @@ -1018,7 +1021,10 @@ jobs: - name: Pack binaries run: | pushd bin - zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + mkdir CardinalPortable + mv CardinalNative.exe CardinalPortable/ + ln -s ../Cardinal.clap/resources CardinalPortable/ + zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap -e CardinalPortable) popd zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* - uses: actions/upload-artifact@v3 From ebb4091a60d1bae5ef1be469a616a003101c8250 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 2 Dec 2022 09:22:40 +0000 Subject: [PATCH 128/451] Use unzipfx approach for Windows zip executables Signed-off-by: falkTX --- .github/workflows/build.yml | 14 ++++---------- Makefile | 22 +++++++++++----------- deps/unzipfx/Makefile.win32 | 2 +- utils/distrho.rc | 1 + 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b860f067..d4a7b859 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -929,12 +929,9 @@ jobs: - name: Pack binaries run: | pushd bin - mkdir CardinalPortable - mv CardinalNative.exe CardinalPortable/ - ln -s ../Cardinal.clap/resources CardinalPortable/ - zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap -e CardinalPortable) + zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd - zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* + zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }} @@ -1021,12 +1018,9 @@ jobs: - name: Pack binaries run: | pushd bin - mkdir CardinalPortable - mv CardinalNative.exe CardinalPortable/ - ln -s ../Cardinal.clap/resources CardinalPortable/ - zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap -e CardinalPortable) + zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd - zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* + zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }} diff --git a/Makefile b/Makefile index 545f92c9..8cac0250 100644 --- a/Makefile +++ b/Makefile @@ -226,23 +226,23 @@ endif # Packaging standalone for CI unzipfx: deps/unzipfx/unzipfx2cat$(APP_EXT) CardinalJACK.zip CardinalNative.zip - cat deps/unzipfx/unzipfx2cat$(APP_EXT) CardinalJACK.zip > CardinalJACK - cat deps/unzipfx/unzipfx2cat$(APP_EXT) CardinalNative.zip > CardinalNative - chmod +x CardinalJACK CardinalNative + cat deps/unzipfx/unzipfx2cat$(APP_EXT) CardinalJACK.zip > CardinalJACK$(APP_EXT) + cat deps/unzipfx/unzipfx2cat$(APP_EXT) CardinalNative.zip > CardinalNative$(APP_EXT) + chmod +x CardinalJACK$(APP_EXT) CardinalNative$(APP_EXT) -CardinalJACK.zip: bin/Cardinal bin/CardinalFX.lv2/resources +CardinalJACK.zip: bin/Cardinal$(APP_EXT) bin/CardinalFX.lv2/resources mkdir -p build/unzipfx-jack - ln -sf ../../bin/Cardinal build/unzipfx-jack/Cardinal - ln -s ../../bin/CardinalFX.lv2/resources build/unzipfx-jack/resources + ln -sf ../../bin/Cardinal$(APP_EXT) build/unzipfx-jack/Cardinal$(APP_EXT) + ln -sf ../../bin/CardinalFX.lv2/resources build/unzipfx-jack/resources cd build/unzipfx-jack && \ - zip -r -9 ../../$@ Cardinal resources + zip -r -9 ../../$@ Cardinal$(APP_EXT) resources -CardinalNative.zip: bin/CardinalNative bin/CardinalFX.lv2/resources +CardinalNative.zip: bin/CardinalNative$(APP_EXT) bin/CardinalFX.lv2/resources mkdir -p build/unzipfx-native - ln -sf ../../bin/CardinalNative build/unzipfx-native/Cardinal - ln -s ../../bin/CardinalFX.lv2/resources build/unzipfx-native/resources + ln -sf ../../bin/CardinalNative$(APP_EXT) build/unzipfx-native/Cardinal$(APP_EXT) + ln -sf ../../bin/CardinalFX.lv2/resources build/unzipfx-native/resources cd build/unzipfx-native && \ - zip -r -9 ../../$@ Cardinal resources + zip -r -9 ../../$@ Cardinal$(APP_EXT) resources deps/unzipfx/unzipfx2cat: make -C deps/unzipfx -f Makefile.linux diff --git a/deps/unzipfx/Makefile.win32 b/deps/unzipfx/Makefile.win32 index 24c096b5..91d19a5e 100644 --- a/deps/unzipfx/Makefile.win32 +++ b/deps/unzipfx/Makefile.win32 @@ -21,7 +21,7 @@ all: unzipfx2cat.exe unzipfx2cat.exe: $(OBJ) $(CC) $^ $(LINK_FLAGS) -o $@ -icon.o: ../../../resources/ico/carla.rc +icon.o: ../../utils/distrho.rc $(WINDRES) -i $< -o $@ -O coff clean: diff --git a/utils/distrho.rc b/utils/distrho.rc index e75698d7..91e98472 100644 --- a/utils/distrho.rc +++ b/utils/distrho.rc @@ -1 +1,2 @@ +id ICON "distrho.ico" 401 ICON "distrho.ico" From a31fef512b89e627ccd3c4125efca0b0548f53e1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 2 Dec 2022 13:47:17 +0000 Subject: [PATCH 129/451] generate portable windows binaries on CI Signed-off-by: falkTX --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4a7b859..6a735a65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -920,6 +920,7 @@ jobs: run: | pushd deps/PawPaw; source local.env win32; popd xvfb-run ./utils/create-windows-installer.sh 32 + make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -1009,6 +1010,7 @@ jobs: run: | pushd deps/PawPaw; source local.env win64; popd xvfb-run ./utils/create-windows-installer.sh 64 + make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV From eddd85c45b8d4461ba77331bf437e41c6a7844e9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 2 Dec 2022 19:19:01 +0000 Subject: [PATCH 130/451] Remove superfulous zip/exe artifacts on windows builds Signed-off-by: falkTX --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a735a65..4b685278 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -937,8 +937,8 @@ jobs: with: name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }} path: | - *.exe - *.zip + Cardinal-*.exe + Cardinal-*.zip - uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: @@ -947,8 +947,8 @@ jobs: draft: false prerelease: false files: | - *.exe - *.zip + Cardinal-*.exe + Cardinal-*.zip win64: runs-on: ubuntu-22.04 @@ -1027,8 +1027,8 @@ jobs: with: name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }} path: | - *.exe - *.zip + Cardinal-*.exe + Cardinal-*.zip - uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: @@ -1037,8 +1037,8 @@ jobs: draft: false prerelease: false files: | - *.exe - *.zip + Cardinal-*.exe + Cardinal-*.zip source-tarball: runs-on: ubuntu-20.04 From a27cc93d8f588ee744ec566b371989e7b6002119 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:22:30 +0000 Subject: [PATCH 131/451] Cleanup makefiles, ensure deps see our custom includes Signed-off-by: falkTX --- Makefile | 2 +- deps/Makefile | 34 ++++++++++++++++++++++++++++++---- plugins/Makefile | 6 +++++- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8cac0250..286e1e7b 100644 --- a/Makefile +++ b/Makefile @@ -203,7 +203,7 @@ endif dgl: ifneq ($(HEADLESS),true) - $(MAKE) -C dpf/dgl opengl $(DGL_EXTRA_ARGS) + $(MAKE) opengl -C dpf/dgl $(DGL_EXTRA_ARGS) endif plugins: deps diff --git a/deps/Makefile b/deps/Makefile index f458eebc..286eb9f3 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -31,8 +31,12 @@ endif # -------------------------------------------------------------- # custom build flags -BASE_FLAGS += -I../include -BASE_FLAGS += -I../include/simd-compat +BASE_FLAGS += -I$(abspath ../include) +BASE_FLAGS += -I$(abspath ../include/simd-compat) + +ifeq ($(HAIKU)$(WASM),true) +BASE_FLAGS += -I$(abspath ../include/linux-compat) +endif ifeq ($(HEADLESS),true) ifeq ($(WITH_LTO),true) @@ -53,8 +57,9 @@ endif ifeq ($(WINDOWS),true) BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN -BASE_FLAGS += -I../include/mingw-compat -BASE_FLAGS += -I../include/mingw-std-threads +BASE_FLAGS += -D_WIN32_WINNT=0x0600 +BASE_FLAGS += -I$(abspath ../include/mingw-compat) +BASE_FLAGS += -I$(abspath ../include/mingw-std-threads) endif BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing @@ -148,6 +153,27 @@ ifeq ($(shell uname -s),Darwin) CMAKE += -DCMAKE_CROSSCOMPILING=ON CMAKE += -DCMAKE_SYSTEM_NAME=Generic endif +CMAKE += -DCMAKE_SKIP_COMPATIBILITY_TESTS=1 +CMAKE += -DCMAKE_SIZEOF_CHAR=1 +CMAKE += -DCMAKE_SIZEOF_UNSIGNED_SHORT=2 +CMAKE += -DCMAKE_SIZEOF_SHORT=2 +CMAKE += -DCMAKE_SIZEOF_INT=4 +CMAKE += -DCMAKE_SIZEOF_UNSIGNED_LONG=4 +CMAKE += -DCMAKE_SIZEOF_UNSIGNED_INT=4 +CMAKE += -DCMAKE_SIZEOF_LONG=4 +CMAKE += -DCMAKE_SIZEOF_VOID_P=4 +CMAKE += -DCMAKE_SIZEOF_FLOAT=4 +CMAKE += -DCMAKE_SIZEOF_DOUBLE=8 +CMAKE += -DCMAKE_C_SIZEOF_DATA_PTR=4 +CMAKE += -DCMAKE_CXX_SIZEOF_DATA_PTR=4 +CMAKE += -DCMAKE_HAVE_LIMITS_H=1 +CMAKE += -DCMAKE_HAVE_UNISTD_H=1 +CMAKE += -DCMAKE_HAVE_PTHREAD_H=1 +CMAKE += -DCMAKE_HAVE_SYS_PRCTL_H=1 +CMAKE += -DCMAKE_WORDS_BIGENDIAN=0 +CMAKE += -DCMAKE_DL_LIBS='' +CMAKE += -DCMAKE_C_BYTE_ORDER=LITTLE_ENDIAN +CMAKE += -DCMAKE_CXX_BYTE_ORDER=LITTLE_ENDIAN endif # fix cross-compilation for windows diff --git a/plugins/Makefile b/plugins/Makefile index 7370c479..b7971ad6 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1056,6 +1056,7 @@ BASE_FLAGS += -I../dpf/distrho BASE_FLAGS += -I../include BASE_FLAGS += -I../include/osdialog-stub BASE_FLAGS += -I../include/simd-compat +BASE_FLAGS += -I../include/simde ifeq ($(HAVE_X11),true) BASE_FLAGS += -DHAVE_X11 @@ -1151,6 +1152,10 @@ endif BASE_FLAGS += -Wno-unused-parameter BASE_FLAGS += -Wno-unused-variable +ifeq ($(CPU_ARM_OR_ARM64)$(CPU_RISCV64),true) +BASE_FLAGS += -Wno-attributes +endif + # -------------------------------------------------------------- # also from plugins @@ -1652,7 +1657,6 @@ $(BUILD_DIR)/ChowDSP/%.cpp.o: ChowDSP/%.cpp -IChowDSP/lib/chowdsp_utils/modules/chowdsp_dsp/WDF \ -Wno-deprecated-copy - $(BUILD_DIR)/dBiz/src/%.cpp.o: dBiz/src/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" From 5ec5688d629a579396ff25d571ee69733ee1a20e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:23:31 +0000 Subject: [PATCH 132/451] Windows builds now require 0x0600/Vista, in preparation for Surge Signed-off-by: falkTX --- plugins/Makefile | 1 + src/Makefile | 1 + src/Makefile.cardinal.mk | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index b7971ad6..ffcd9c25 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1110,6 +1110,7 @@ endif ifeq ($(WINDOWS),true) BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN +BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../include/mingw-compat BASE_FLAGS += -I../include/mingw-std-threads endif diff --git a/src/Makefile b/src/Makefile index aa5219e8..a35f6235 100644 --- a/src/Makefile +++ b/src/Makefile @@ -95,6 +95,7 @@ endif ifeq ($(WINDOWS),true) BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN +BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../include/mingw-compat BASE_FLAGS += -I../include/mingw-std-threads endif diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 938a3ae5..0a08ff92 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -242,6 +242,7 @@ endif ifeq ($(WINDOWS),true) BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN +BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../../include/mingw-compat BASE_FLAGS += -I../../include/mingw-std-threads endif From c269d7228a51d68cfc9a8aca964ce311a0848e19 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:25:43 +0000 Subject: [PATCH 133/451] Improve linux-compat/execinfo.h so it can be used multiple times Signed-off-by: falkTX --- include/linux-compat/execinfo.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux-compat/execinfo.h b/include/linux-compat/execinfo.h index c569c92e..3057f462 100644 --- a/include/linux-compat/execinfo.h +++ b/include/linux-compat/execinfo.h @@ -17,19 +17,25 @@ #pragma once -#define pthread_setname_np(...) +#include -int pthread_getcpuclockid(pthread_t, clockid_t* const clock_id) +static inline +int pthread_getcpuclockid_custom(pthread_t, clockid_t* const clock_id) { *clock_id = CLOCK_REALTIME; return 0; } -static int backtrace(void**, int) +#define pthread_getcpuclockid pthread_getcpuclockid_custom +#define pthread_setname_np(...) + +static inline +int backtrace(void**, int) { return 0; } +static inline char** backtrace_symbols(void* const*, int) { return nullptr; From 5226aa5c4e396a572668e7f6d54336159465ab30 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:26:37 +0000 Subject: [PATCH 134/451] Cleanup imgui code, only need to check for 1 GL3 macro Signed-off-by: falkTX --- plugins/Cardinal/src/DearImGui.cpp | 2 +- plugins/Cardinal/src/ImGuiWidget.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/Cardinal/src/DearImGui.cpp b/plugins/Cardinal/src/DearImGui.cpp index df0de0ce..79228eae 100644 --- a/plugins/Cardinal/src/DearImGui.cpp +++ b/plugins/Cardinal/src/DearImGui.cpp @@ -28,7 +28,7 @@ #include "DearImGui/imgui_draw.cpp" #include "DearImGui/imgui_tables.cpp" #include "DearImGui/imgui_widgets.cpp" -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) # include "DearImGui/imgui_impl_opengl3.cpp" #else # include "DearImGui/imgui_impl_opengl2.cpp" diff --git a/plugins/Cardinal/src/ImGuiWidget.cpp b/plugins/Cardinal/src/ImGuiWidget.cpp index ec88a824..075415bc 100644 --- a/plugins/Cardinal/src/ImGuiWidget.cpp +++ b/plugins/Cardinal/src/ImGuiWidget.cpp @@ -23,7 +23,7 @@ # include "../../../dpf/dgl/src/Resources.hpp" #endif -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) # include "DearImGui/imgui_impl_opengl3.h" #else # include "DearImGui/imgui_impl_opengl2.h" @@ -97,7 +97,7 @@ struct ImGuiWidget::PrivateData { if (created) { ImGui::SetCurrentContext(context); -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_Shutdown(); #else ImGui_ImplOpenGL2_Shutdown(); @@ -171,7 +171,7 @@ struct ImGuiWidget::PrivateData { if (created) { ImGui::SetCurrentContext(context); -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_Shutdown(); #else ImGui_ImplOpenGL2_Shutdown(); @@ -191,7 +191,7 @@ struct ImGuiWidget::PrivateData { if (doInit) { -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_Init(); #else ImGui_ImplOpenGL2_Init(); @@ -262,7 +262,7 @@ void ImGuiWidget::onContextCreate(const ContextCreateEvent& e) DISTRHO_SAFE_ASSERT_RETURN(!imData->created,); ImGui::SetCurrentContext(imData->context); -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_Init(); #else ImGui_ImplOpenGL2_Init(); @@ -275,7 +275,7 @@ void ImGuiWidget::onContextDestroy(const ContextDestroyEvent& e) if (imData->created) { ImGui::SetCurrentContext(imData->context); -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_Shutdown(); #else ImGui_ImplOpenGL2_Shutdown(); @@ -481,7 +481,7 @@ void ImGuiWidget::drawFramebufferCommon(const Vec& fbSize, const float scaleFact } } -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) // TODO? #else glMatrixMode(GL_PROJECTION); @@ -499,7 +499,7 @@ void ImGuiWidget::drawFramebufferCommon(const Vec& fbSize, const float scaleFact if (!imData->created) { -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_Init(); #else ImGui_ImplOpenGL2_Init(); @@ -511,7 +511,7 @@ void ImGuiWidget::drawFramebufferCommon(const Vec& fbSize, const float scaleFact io.DeltaTime = time - imData->lastFrameTime; imData->lastFrameTime = time; -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_NewFrame(); #else ImGui_ImplOpenGL2_NewFrame(); @@ -523,7 +523,7 @@ void ImGuiWidget::drawFramebufferCommon(const Vec& fbSize, const float scaleFact if (ImDrawData* const data = ImGui::GetDrawData()) { -#if defined(DGL_USE_GLES2) || defined(DGL_USE_GLES3) || defined(DGL_USE_OPENGL3) +#if defined(DGL_USE_OPENGL3) ImGui_ImplOpenGL3_RenderDrawData(data); #else ImGui_ImplOpenGL2_RenderDrawData(data); From faf27361cc5e90d0d7d887837aff06a905a13c44 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:32:46 +0000 Subject: [PATCH 135/451] Expand our custom simde approach to mimic more SSE/AVX headers Signed-off-by: falkTX --- include/simd-compat/emmintrin.h | 25 +++++++++++++++++++++++++ include/simd-compat/immintrin.h | 26 ++++++++++++++++++++++++++ include/simd-compat/pmmintrin.h | 4 ++-- include/simd-compat/xmmintrin.h | 25 +++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 include/simd-compat/emmintrin.h create mode 100644 include/simd-compat/immintrin.h create mode 100644 include/simd-compat/xmmintrin.h diff --git a/include/simd-compat/emmintrin.h b/include/simd-compat/emmintrin.h new file mode 100644 index 00000000..f8448608 --- /dev/null +++ b/include/simd-compat/emmintrin.h @@ -0,0 +1,25 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#pragma once + +#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +# include_next +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/sse.h" +#endif diff --git a/include/simd-compat/immintrin.h b/include/simd-compat/immintrin.h new file mode 100644 index 00000000..5400c923 --- /dev/null +++ b/include/simd-compat/immintrin.h @@ -0,0 +1,26 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#pragma once + +#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +# include_next +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/sse.h" +# include "../simde/simde/x86/sse2.h" +#endif diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 1f7da292..33ec1c4f 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -43,8 +43,8 @@ #elif defined(__EMSCRIPTEN__) # include_next -static inline -__m64 _mm_set1_pi16(short w) +static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) +_mm_set1_pi16(short w) { return __extension__ (__m64){ static_cast(w), static_cast(w) }; } diff --git a/include/simd-compat/xmmintrin.h b/include/simd-compat/xmmintrin.h new file mode 100644 index 00000000..5ee268ff --- /dev/null +++ b/include/simd-compat/xmmintrin.h @@ -0,0 +1,25 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#pragma once + +#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +# include_next +#else +# define SIMDE_ENABLE_NATIVE_ALIASES +# include "../simde/simde/x86/avx.h" +#endif From 8efc6a45e0367b5db83f44493deb4fe7a89764d6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:35:11 +0000 Subject: [PATCH 136/451] Use less disk space on CI builds, avoiding possible build failures Signed-off-by: falkTX --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b685278..d91ca361 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,7 @@ jobs: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture arm64 @@ -48,6 +49,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -118,6 +120,7 @@ jobs: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture armhf @@ -127,6 +130,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -197,11 +201,13 @@ jobs: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -273,6 +279,7 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 + sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture riscv64 @@ -282,6 +289,7 @@ jobs: echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list sudo apt-get update -qq sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -351,6 +359,7 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -402,6 +411,7 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get clean - name: Build linux x86_64 (debug) env: LDFLAGS: -static-libgcc -static-libstdc++ @@ -434,6 +444,7 @@ jobs: sudo apt-get update -qq sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev sudo apt-get install -yqq liblo-dev + sudo apt-get clean - name: Build linux x86_64 (headless) run: | make HEADLESS=true features @@ -449,6 +460,7 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev + sudo apt-get clean - name: Build linux x86_64 (sysdeps) run: | make features @@ -639,6 +651,7 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra + sudo apt-get clean - name: Bootstrap toolchain if: steps.mpb-cache.outputs.cache-hit != 'true' run: | @@ -678,6 +691,7 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra + sudo apt-get clean - name: Bootstrap toolchain if: steps.mpb-cache.outputs.cache-hit != 'true' run: | @@ -717,6 +731,7 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra + sudo apt-get clean - name: Bootstrap toolchain if: steps.mpb-cache.outputs.cache-hit != 'true' run: | @@ -773,7 +788,7 @@ jobs: source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd make features - make CIBUILD=true NOOPT=true USE_GLES2=true WITH_LTO=false -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true WITH_LTO=false -j $(nproc) - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -888,11 +903,13 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libgd3/jammy sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget + sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -978,11 +995,13 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libgd3/jammy sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget + sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable qttools5-dev qttools5-dev-tools xvfb + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -1050,6 +1069,7 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install -yqq liblo-dev + sudo apt-get clean - name: Create source tarball run: | make HEADLESS=true tarball @@ -1110,6 +1130,7 @@ jobs: sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev # runtime testing sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb + sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -1145,9 +1166,8 @@ jobs: run: | export LV2_PATH=/tmp/lv2-path mkdir ${LV2_PATH} - cp -r bin/CardinalFX.lv2 bin/CardinalSynth.lv2 \ - /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ - ${LV2_PATH} + mv bin/CardinalFX.lv2 bin/CardinalSynth.lv2 ${LV2_PATH} + cp -r /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 ${LV2_PATH} xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) - name: Test LV2 plugin run: | From 1ba43b195fe0e2f52f7e57ce8741e09755838cf7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 4 Dec 2022 20:38:19 +0000 Subject: [PATCH 137/451] Add surgext Signed-off-by: falkTX --- .gitignore | 1 + .gitmodules | 3 + Makefile | 2 +- README.md | 1 + deps/Makefile | 54 +++++++++++++ docs/LICENSES.md | 4 + jucewrapper/CMakeLists.txt | 54 +++++++++++++ plugins/Makefile | 97 ++++++++++++++++++++++- plugins/plugins.cpp | 71 ++++++++++++++++- plugins/surgext | 1 + plugins/surgext-helper/surgext-helper.cpp | 31 ++++++++ src/Makefile.cardinal.mk | 55 +++++++++++++ 12 files changed, 371 insertions(+), 3 deletions(-) create mode 160000 plugins/surgext create mode 100644 plugins/surgext-helper/surgext-helper.cpp diff --git a/.gitignore b/.gitignore index 4b7839a5..8f76e40a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ compile_commands.json /bin/ /build/ +/deps/surge-build/ /documentation.pdf /jucewrapper/build/ /jucewrapper/JUCE/ diff --git a/.gitmodules b/.gitmodules index 9544b04a..93da739d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -224,3 +224,6 @@ [submodule "plugins/stoermelder-packone"] path = plugins/stoermelder-packone url = https://github.com/stoermelder/vcvrack-packone.git +[submodule "plugins/surgext"] + path = plugins/surgext + url = https://github.com/surge-synthesizer/surge-rack.git diff --git a/Makefile b/Makefile index 286e1e7b..adb29992 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,7 @@ endif deps: ifeq ($(SYSDEPS),true) - $(MAKE) quickjs -C deps + $(MAKE) quickjs surge -C deps else $(MAKE) all -C deps endif diff --git a/README.md b/README.md index acc8c842..9e30ce0a 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ At the moment the following 3rd-party modules are provided: - Sonus Modular - stocaudio - Stoermelder Pack-One +- Surge XT - unless_modules - Valley - Voxglitch diff --git a/deps/Makefile b/deps/Makefile index 286eb9f3..70970fe2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -308,9 +308,61 @@ $(DEP_PATH)/lib/libquickjs.a: install -m644 $(CURDIR)/QuickJS/libquickjs.a $@ install -m644 $(CURDIR)/QuickJS/quickjs.h $(DEP_PATH)/include/quickjs.h +# -------------------------------------------------------------- +# SurgeXT target + +SURGE_DEP_PATH = $(abspath surge-build) +SURGE_SRC_PATH = $(abspath ../plugins/surgext/surge) +SURGE_NAMES = HysteresisProcessing Patch SolverType Tunings Wavetable clouds ghc plaits stmlib + +SURGE_CXX_FLAGS = $(filter-out -fsingle-precision-constant,$(filter-out -std=gnu++11,$(BUILD_CXX_FLAGS))) +SURGE_CXX_FLAGS += $(foreach n,$(SURGE_NAMES),-D$(n)=surgext$(n)) + +# fix JUCE build https://github.com/juce-framework/JUCE/issues/374 +ifeq ($(CPU_I386),true) +SURGE_CXX_FLAGS += -D__sigemptyset=sigemptyset +endif + +# unwanted in this build +SURGE_CXX_FLAGS += -DJUCE_DSP_ENABLE_SNAP_TO_ZERO=0 + +# possibly use fftw? +# ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) +# SURGE_CXX_FLAGS += -DJUCE_DSP_USE_STATIC_FFTW=1 +# endif + +# JUCE_USE_CURL +SURGE_ENV = env \ + AR=$(AR) \ + CC=$(CC) \ + CXX=$(CXX) \ + CFLAGS='$(BUILD_C_FLAGS) -w' \ + CXXFLAGS='$(SURGE_CXX_FLAGS) -w' \ + LDFLAGS='$(LINK_FLAGS)' + +SURGE_LIB = $(SURGE_DEP_PATH)/src/common/libsurge-common.a + +$(SURGE_LIB): $(SURGE_DEP_PATH)/Makefile + $(DEP_MAKE) -C $(SURGE_DEP_PATH) surge-common + +$(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt + mkdir -p $(SURGE_DEP_PATH) + cd $(SURGE_DEP_PATH) && \ + $(SURGE_ENV) $(CMAKE) \ + -DSURGE_COMPILE_BLOCK_SIZE=8 \ + -DSURGE_SKIP_AIRWINDOWS=TRUE \ + -DSURGE_SKIP_JUCE_FOR_RACK=TRUE \ + -DSURGE_SKIP_LUA=TRUE \ + -DSURGE_SKIP_ODDSOUND_MTS=TRUE \ + $(SURGE_SRC_PATH) + # -------------------------------------------------------------- # Build targets +ifneq ($(NOPLUGINS),true) +TARGETS += $(SURGE_LIB) +endif + TARGETS += $(DEP_PATH)/lib/libjansson.a TARGETS += $(DEP_PATH)/lib/libquickjs.a TARGETS += $(DEP_PATH)/lib/libsamplerate.a @@ -340,6 +392,7 @@ clean: rm -rf $(DEP_PATH)/libsamplerate-0.1.9 rm -rf $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 rm -rf $(DEP_PATH)/zstd-1.4.5 + rm -rf $(SURGE_DEP_PATH) download: \ $(DEP_PATH)/jansson-2.12 \ @@ -349,5 +402,6 @@ download: \ $(DEP_PATH)/zstd-1.4.5/.stamp-patched quickjs: $(DEP_PATH)/lib/libquickjs.a +surge: $(SURGE_LIB) # -------------------------------------------------------------- diff --git a/docs/LICENSES.md b/docs/LICENSES.md index 825879e4..f1913787 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -76,6 +76,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | | Stoermelder Pack-One | GPL-3.0-or-later | | +| Surge XT | GPL-3.0-or-later | | | unless_modules | GPL-3.0-or-later | | | Valley | GPL-3.0-or-later | | | Voxglitch | GPL-3.0-or-later | | @@ -215,6 +216,9 @@ Below is a list of artwork licenses from plugins | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | | stoermelder-packone/* | GPL-3.0-or-later | No artwork specific license provided | | stoermelder-packone/fonts/RedkostComic.otf | OFL-1.1-RFN | | +| surgext/* | GPL-3.0-or-later | | +| surgext/xt/* | CC-BY-NC-SA-4.0 | | +| surgext/xt/fonts/quicksand/* | OFL-1.1-RFN | | | unless_modules/* | CC-BY-NC-ND-4.0 | | | unless_modules/font/CuteFont-Regular.ttf| OFL-1.1 | | | unless_modules/font/Terminus.ttf | GPL-2.0-or-later | [Starting from v4.32, font license is OFL-1.1](https://files.ax86.net/terminus-ttf/#license) | diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index d47ce34e..6b34c824 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -89,6 +89,30 @@ set_property(TARGET libspeexdsp PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR add_library(libzstd STATIC IMPORTED) set_property(TARGET libzstd PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libzstd.a") +set(SURGE_DEP_PATH "${PROJECT_SOURCE_DIR}/../deps/surge-build") + +add_library(surgedep01 STATIC IMPORTED) +add_library(surgedep02 STATIC IMPORTED) +add_library(surgedep03 STATIC IMPORTED) +add_library(surgedep04 STATIC IMPORTED) +add_library(surgedep05 STATIC IMPORTED) +add_library(surgedep06 STATIC IMPORTED) +add_library(surgedep07 STATIC IMPORTED) +add_library(surgedep08 STATIC IMPORTED) +add_library(surgedep09 STATIC IMPORTED) +add_library(surgedep10 STATIC IMPORTED) + +set_property(TARGET surgedep01 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/src/common/libsurge-common.a") +set_property(TARGET surgedep02 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/src/common/libjuce_dsp_rack_sub.a") +set_property(TARGET surgedep03 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/airwindows/libairwindows.a") +set_property(TARGET surgedep04 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/eurorack/libeurorack.a") +set_property(TARGET surgedep05 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/fmt/libfmt.a") +set_property(TARGET surgedep06 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sqlite-3.23.3/libsqlite.a") +set_property(TARGET surgedep07 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libsst-plugininfra.a") +set_property(TARGET surgedep08 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/filesystem/libfilesystem.a") +set_property(TARGET surgedep09 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a") +set_property(TARGET surgedep10 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a") + # dependencies find_package(PkgConfig REQUIRED) @@ -181,6 +205,16 @@ target_link_libraries(Cardinal ysfx zita_resampler dgl + surgedep01 + surgedep02 + surgedep03 + surgedep04 + surgedep05 + surgedep06 + surgedep07 + surgedep08 + surgedep09 + surgedep10 libaubio libarchive libjansson @@ -274,6 +308,16 @@ target_link_libraries(CardinalFX ysfx zita_resampler dgl + surgedep01 + surgedep02 + surgedep03 + surgedep04 + surgedep05 + surgedep06 + surgedep07 + surgedep08 + surgedep09 + surgedep10 libaubio libarchive libjansson @@ -366,6 +410,16 @@ target_link_libraries(CardinalSynth ysfx zita_resampler dgl + surgedep01 + surgedep02 + surgedep03 + surgedep04 + surgedep05 + surgedep06 + surgedep07 + surgedep08 + surgedep09 + surgedep10 libaubio libarchive libjansson diff --git a/plugins/Makefile b/plugins/Makefile index ffcd9c25..c453208c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -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 $<" diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 0658e7ae..2fcef45f 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -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 } diff --git a/plugins/surgext b/plugins/surgext new file mode 160000 index 00000000..1475b73b --- /dev/null +++ b/plugins/surgext @@ -0,0 +1 @@ +Subproject commit 1475b73ba29189ac6e294bf6d27a39443b584fa6 diff --git a/plugins/surgext-helper/surgext-helper.cpp b/plugins/surgext-helper/surgext-helper.cpp new file mode 100644 index 00000000..1b7c527f --- /dev/null +++ b/plugins/surgext-helper/surgext-helper.cpp @@ -0,0 +1,31 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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(); +} diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 0a08ff92..8ef7ba5b 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -130,6 +130,29 @@ endif RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libzstd.a endif +# -------------------------------------------------------------- +# surgext libraries + +ifneq ($(NOPLUGINS),true) +SURGE_DEP_PATH = $(abspath ../../deps/surge-build) +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libsurge-common.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libjuce_dsp_rack_sub.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/airwindows/libairwindows.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/eurorack/libeurorack.a +ifeq ($(DEBUG),true) +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/fmt/libfmtd.a +else +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/fmt/libfmt.a +endif +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sqlite-3.23.3/libsqlite.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libsst-plugininfra.a +ifneq ($(WINDOWS),true) +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/filesystem/libfilesystem.a +endif +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a +endif + # -------------------------------------------------------------- # FIXME @@ -148,6 +171,12 @@ EXTRA_LIBS += ../../deps/aubio/libaubio.a EXTRA_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) endif +ifneq ($(NOPLUGINS),true) +ifeq ($(MACOS),true) +EXTRA_LIBS += -framework Accelerate +endif +endif + # -------------------------------------------------------------- # Setup resources @@ -283,6 +312,32 @@ LINK_FLAGS += --preload-file=./jsfx LINK_FLAGS += --preload-file=./lv2 endif LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources +ifneq ($(NOPLUGINS),true) +SYMLINKED_DIRS_RESOURCES = +# find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort +SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/chopin +SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/debussy +SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/goldberg +SYMLINKED_DIRS_RESOURCES += cf/playeroscs +SYMLINKED_DIRS_RESOURCES += DrumKit/res/samples +SYMLINKED_DIRS_RESOURCES += Fundamental/presets +SYMLINKED_DIRS_RESOURCES += GrandeModular/presets +SYMLINKED_DIRS_RESOURCES += LyraeModules/presets +SYMLINKED_DIRS_RESOURCES += Meander/res +SYMLINKED_DIRS_RESOURCES += MindMeldModular/presets +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/CommunityPresets +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/CommunityShapes +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/MindMeldPresets +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/MindMeldShapes +SYMLINKED_DIRS_RESOURCES += Mog/res +SYMLINKED_DIRS_RESOURCES += nonlinearcircuits/res +SYMLINKED_DIRS_RESOURCES += Orbits/presets +SYMLINKED_DIRS_RESOURCES += stoermelder-packone/presets +SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/wavetables +SYMLINKED_DIRS_RESOURCES += surgext/patches +SYMLINKED_DIRS_RESOURCES += surgext/presets +LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) +endif LINK_FLAGS += -sALLOW_MEMORY_GROWTH LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 From 570565203855ceb7afb7098f8fd70e147fc9ec52 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 5 Dec 2022 09:29:44 +0000 Subject: [PATCH 138/451] Switch to surge release-candidate/2.0.4.0 branch Signed-off-by: falkTX --- plugins/surgext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/surgext b/plugins/surgext index 1475b73b..6c5575a0 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 1475b73ba29189ac6e294bf6d27a39443b584fa6 +Subproject commit 6c5575a026a3f38443f2b6204314a6da46a05ad3 From 283ae3d6af952c7f9fcf92fba41e394176a3a48f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 5 Dec 2022 20:42:10 +0000 Subject: [PATCH 139/451] wasm related fixes Signed-off-by: falkTX --- plugins/surgext | 2 +- src/Makefile.cardinal.mk | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/surgext b/plugins/surgext index 6c5575a0..b93eea90 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 6c5575a026a3f38443f2b6204314a6da46a05ad3 +Subproject commit b93eea904129bebcd3326059ed9e11227d06f8a6 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 8ef7ba5b..fadbb26d 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -213,7 +213,7 @@ ifeq ($(WASM),true) WASM_RESOURCES = $(LV2_RESOURCES) ifneq ($(STATIC_BUILD),true) -WASM_RESOURCES += $(CURDIR)/lv2 +WASM_RESOURCES += $(CURDIR)/lv2/fomp.lv2/manifest.ttl endif EXTRA_DEPENDENCIES += $(WASM_RESOURCES) @@ -333,6 +333,7 @@ SYMLINKED_DIRS_RESOURCES += Mog/res SYMLINKED_DIRS_RESOURCES += nonlinearcircuits/res SYMLINKED_DIRS_RESOURCES += Orbits/presets SYMLINKED_DIRS_RESOURCES += stoermelder-packone/presets +SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/fx_presets SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/wavetables SYMLINKED_DIRS_RESOURCES += surgext/patches SYMLINKED_DIRS_RESOURCES += surgext/presets @@ -452,8 +453,11 @@ $(TARGET_DIR)/%.app/Contents/Resources/distrho.icns: ../../utils/distrho.icns # Extra rules for wasm resources ifeq ($(WASM),true) -$(CURDIR)/lv2: $(LV2_RESOURCES) +$(CURDIR)/lv2/fomp.lv2/manifest.ttl: $(TARGET_DIR)/$(NAME).lv2/resources/PluginManifests/Cardinal.json wget -O - https://falktx.com/data/wasm-things-2022-08-15.tar.gz | tar xz -C $(CURDIR) + # FIXME we are past 50Mb compressed assets! :( + rm -rf $(CURDIR)/lv2/mda.lv2 + touch $@ endif # -------------------------------------------------------------- From 1876ad99f9b90d5919d8416d94bef2bc81971d66 Mon Sep 17 00:00:00 2001 From: Don Cross Date: Tue, 6 Dec 2022 18:54:17 -0500 Subject: [PATCH 140/451] Adding plugin Sapphire, modules Elastika, Moots. --- .gitmodules | 3 +++ README.md | 1 + docs/LICENSES.md | 2 ++ plugins/Makefile | 12 ++++++++++++ plugins/Sapphire | 1 + plugins/plugins.cpp | 18 ++++++++++++++++++ 6 files changed, 37 insertions(+) create mode 160000 plugins/Sapphire diff --git a/.gitmodules b/.gitmodules index 93da739d..9c813376 100644 --- a/.gitmodules +++ b/.gitmodules @@ -227,3 +227,6 @@ [submodule "plugins/surgext"] path = plugins/surgext url = https://github.com/surge-synthesizer/surge-rack.git +[submodule "plugins/Sapphire"] + path = plugins/Sapphire + url = https://github.com/cosinekitty/sapphire.git diff --git a/README.md b/README.md index 9e30ce0a..48461f2a 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,7 @@ At the moment the following 3rd-party modules are provided: - rackwindows - RebelTech - repelzen +- Sapphire - Sonus Modular - stocaudio - Stoermelder Pack-One diff --git a/docs/LICENSES.md b/docs/LICENSES.md index f1913787..cb6501ec 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -73,6 +73,7 @@ Bellow follows a list of all code licenses used in Cardinal and linked submodule | Rackwindows | MIT | | | repelzen | GPL-3.0-or-later | | | RebelTech | GPL-2.0-or-later | | +| Sapphire | GPL-3.0-or-later | | | Sonus Modular | GPL-3.0-or-later | | | stocaudio | GPL-3.0-or-later | | | Stoermelder Pack-One | GPL-3.0-or-later | | @@ -212,6 +213,7 @@ Below is a list of artwork licenses from plugins | Rackwindows/* | MIT | [Same license as source code](https://github.com/n0jo/rackwindows/issues/15) | | repelzen/* | CC-BY-SA-4.0 | | | RebelTech/* | CC-BY-NC-4.0 | | +| Sapphire/* | GPL-3.0-or-later | No artwork specific license provided | | sonusmodular/* | GPL-3.0-or-later | [Same license as source code](https://gitlab.com/sonusdept/sonusmodular/-/issues/14) | | stocaudio/* | GPL-3.0-or-later | No artwork specific license provided | | stoermelder-packone/* | GPL-3.0-or-later | No artwork specific license provided | diff --git a/plugins/Makefile b/plugins/Makefile index c453208c..9c088587 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -892,6 +892,11 @@ PLUGIN_FILES += $(filter-out repelzen/src/repelzen.cpp,$(wildcard repelzen/src/* # modules/types which are present in other plugins REPELZEN_CUSTOM = Blank Mixer Werner tanh_pade +# -------------------------------------------------------------- +# Sapphire + +PLUGIN_FILES += $(filter-out Sapphire/src/plugin.cpp,$(wildcard Sapphire/src/*.cpp)) + # -------------------------------------------------------------- # sonusmodular @@ -2113,6 +2118,13 @@ $(BUILD_DIR)/repelzen/%.cpp.o: repelzen/%.cpp $(foreach m,$(REPELZEN_CUSTOM),$(call custom_module_names,$(m),repelzen)) \ -DpluginInstance=pluginInstance__repelzen +$(BUILD_DIR)/Sapphire/%.cpp.o: Sapphire/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(SAPPHIRE_CUSTOM),$(call custom_module_names,$(m),Sapphire)) \ + -DpluginInstance=pluginInstance__sapphire + $(BUILD_DIR)/sonusmodular/%.cpp.o: sonusmodular/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/Sapphire b/plugins/Sapphire new file mode 160000 index 00000000..07a07e1d --- /dev/null +++ b/plugins/Sapphire @@ -0,0 +1 @@ +Subproject commit 07a07e1d599495bb1c4b17575a7d19a1bfa51c0f diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 2fcef45f..fd7571b2 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -716,6 +716,9 @@ void addThemeMenuItems(Menu*, ModuleTheme*) {} #undef modelWerner #undef tanh_pade +// Sapphire +#include "Sapphire/src/plugin.hpp" + // sonusmodular #include "sonusmodular/src/sonusmodular.hpp" @@ -850,6 +853,7 @@ Plugin* pluginInstance__Prism; Plugin* pluginInstance__rackwindows; Plugin* pluginInstance__RebelTech; Plugin* pluginInstance__repelzen; +Plugin* pluginInstance__sapphire; Plugin* pluginInstance__sonusmodular; Plugin* pluginInstance__stocaudio; extern Plugin* pluginInstance__stoermelder_p1; @@ -2729,6 +2733,19 @@ static void initStatic__repelzen() } } +static void initStatic__Sapphire() +{ + Plugin* const p = new Plugin; + pluginInstance__sapphire = p; + + const StaticPluginLoader spl(p, "Sapphire"); + if (spl.ok()) + { + p->addModel(modelElastika); + p->addModel(modelMoots); + } +} + static void initStatic__sonusmodular() { Plugin* const p = new Plugin; @@ -3100,6 +3117,7 @@ void initStaticPlugins() initStatic__rackwindows(); initStatic__RebelTech(); initStatic__repelzen(); + initStatic__Sapphire(); initStatic__sonusmodular(); initStatic__stocaudio(); initStatic__stoermelder_p1(); From 2b8cc1f953c85fdded6647b31ccf4abfe7c0ac13 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Dec 2022 10:20:49 +0000 Subject: [PATCH 141/451] Do brotli compression of wasm files directly on CI Signed-off-by: falkTX --- .github/workflows/build.yml | 20 ++++++++++++++------ plugins/surgext | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d91ca361..9c451f65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -777,8 +777,11 @@ jobs: key: wasm-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | - [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk - cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest + sudo apt-get update -qq + sudo apt-get install -yqq brotli + sudo apt-get clean + [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk + cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest - name: Build extra dependencies run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh @@ -789,6 +792,7 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true WITH_LTO=false -j $(nproc) + cd bin; rm -r *.lv2; brotli -k -q 11 *.* - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -797,7 +801,7 @@ jobs: run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.html *.data *.js *.wasm) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }} @@ -837,8 +841,11 @@ jobs: key: wasm-mini-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | - [ -e ~/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/emsdk - cd ~/emsdk && ./emsdk install latest && ./emsdk activate latest + sudo apt-get update -qq + sudo apt-get install -yqq brotli + sudo apt-get clean + [ -e ~/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/emsdk + cd ~/emsdk && ./emsdk install latest && ./emsdk activate latest - name: Build wasm-mini cross-compiled env: AR: emar @@ -851,6 +858,7 @@ jobs: source ~/emsdk/emsdk_env.sh make features make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true WITH_LTO=false -j $(nproc) + cd bin; rm -r *.lv2; brotli -k -q 11 *.* - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -859,7 +867,7 @@ jobs: run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.html *.data *.js *.wasm) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }} diff --git a/plugins/surgext b/plugins/surgext index b93eea90..b39a4b1e 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit b93eea904129bebcd3326059ed9e11227d06f8a6 +Subproject commit b39a4b1e46a0ea5ccfddaf3bbda11d42270265a0 From 3b4e51ee59568924640352f2621610b879d7458a Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 7 Dec 2022 10:45:50 +0000 Subject: [PATCH 142/451] Make wasm versioned Signed-off-by: falkTX --- .github/workflows/build.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c451f65..3d1e347a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -792,7 +792,16 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true WITH_LTO=false -j $(nproc) - cd bin; rm -r *.lv2; brotli -k -q 11 *.* + - name: Make wasm versioned and compress + run: | + VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') + cd bin + rm -r *.lv2 + sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js + mv CardinalNative.data CardinalNative-v${VERSION}.data + mv CardinalNative.js CardinalNative-v${VERSION}.js + mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm + brotli -k -q 11 *.* - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -858,7 +867,16 @@ jobs: source ~/emsdk/emsdk_env.sh make features make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true WITH_LTO=false -j $(nproc) - cd bin; rm -r *.lv2; brotli -k -q 11 *.* + - name: Make wasm versioned and compress + run: | + VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') + cd bin + rm -r *.lv2 + sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js + mv CardinalNative.data CardinalNative-v${VERSION}.data + mv CardinalNative.js CardinalNative-v${VERSION}.js + mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm + brotli -k -q 11 *.* - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV From d19717ad7c94a0fa612c813479c53bbfc300c4bb Mon Sep 17 00:00:00 2001 From: Don Cross Date: Wed, 7 Dec 2022 06:36:14 -0500 Subject: [PATCH 143/451] Fixed access of uninitialized memory in Sapphire Elastika. Updated commit hash of Sapphire plugin to include this fix: https://github.com/cosinekitty/sapphire/commit/b30d20745dd028961b0047b506d560ed48f2656c --- plugins/Sapphire | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Sapphire b/plugins/Sapphire index 07a07e1d..b30d2074 160000 --- a/plugins/Sapphire +++ b/plugins/Sapphire @@ -1 +1 @@ -Subproject commit 07a07e1d599495bb1c4b17575a7d19a1bfa51c0f +Subproject commit b30d20745dd028961b0047b506d560ed48f2656c From 3eddf06b41e616d0a7316e4045ade7dba8850e50 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Dec 2022 20:17:33 +0000 Subject: [PATCH 144/451] Improve docs for building Windows binaries Signed-off-by: falkTX --- docs/BUILDING.md | 10 +++++++--- src/Makefile.cardinal.mk | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index cbcbcbef..bb88682d 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -118,18 +118,22 @@ export CXXFLAGS="${CFLAGS}" ## Windows Cardinal does not support msvc, using mingw is required. -You can either cross-compile Cardinal for Windows from Linux, or install and use msys2 natively on a Windows system. +It also requires a file-system with support for symbolic links, which Windows cannot do. +For these reasons it is only possible to build Cardinal for Windows from a Linux, macOS or any regular POSIX system. ### Cross-compile For cross-compilation, first install the relevant mingw packages. On Ubuntu these are `binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64`. -Then build with `CC` and `CXX` pointing to the mingw compiler, like so: +Then build with `AR`, `CC` and `CXX` pointing to the mingw compiler tools, like so: ``` +export AR=x86_64-w64-mingw32-gcc export CC=x86_64-w64-mingw32-gcc export CXX=x86_64-w64-mingw32-g++ -# make etc.. +export EXE_WRAPPER=wine # for running generated windows binaries +export PKG_CONFIG=false # ignore pkg-config from base system +# now run make etc.. ``` # Installing diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index fadbb26d..84300bd0 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -464,6 +464,8 @@ endif # Extra rules for Windows icon ifeq ($(WINDOWS),true) +WINDRES ?= $(subst gcc,windres,$(CC)) + JACK_LIBS += -Wl,-subsystem,windows $(BUILD_DIR)/distrho.rc.o: ../../utils/distrho.rc ../../utils/distrho.ico From 2579a11a9c5677fc1fedea8fe878f4b8a68ecd24 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 12 Dec 2022 21:27:48 +0000 Subject: [PATCH 145/451] Add wasm build instructions, fix mouse lock on chrome, wrong keys Signed-off-by: falkTX --- docs/BUILDING.md | 28 +++++++++++++++++++++++++++- dpf | 2 +- src/Makefile.cardinal.mk | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index bb88682d..f059bab9 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -115,6 +115,32 @@ export CXXFLAGS="${CFLAGS}" # make etc.. ``` +## Web assembly + +Cardinal uses emscripten for its web version, see the official instructions on installing emscripten [here](https://emscripten.org/docs/getting_started/downloads.html). +Once installed, setup the build by importing the emscripten environment and setup the default build tools to point to them, like so: + +``` +source /path/to/emsdk/emsdk_env.sh +export AR=emar +export CC=emcc +export CXX=em++ +export NM=emnm +export RANLIB=emranlib +export STRIP=emstrip +``` + +Then for the actual build we just need to force graphics rendering to use GLES2 instead of the default "desktop" OpenGL mode, like so: + +``` +make USE_GLES2=true # add any other relevant options.. +``` + +You can place the generated files on a webserver, or run `emrun bin/CardinalNative.html` for an easy way to test it. + +Please note the web build only contains CardinalNative, no other variants will be built. +This is expected and intentional. + ## Windows Cardinal does not support msvc, using mingw is required. @@ -133,7 +159,7 @@ export CC=x86_64-w64-mingw32-gcc export CXX=x86_64-w64-mingw32-g++ export EXE_WRAPPER=wine # for running generated windows binaries export PKG_CONFIG=false # ignore pkg-config from base system -# now run make etc.. +# make etc.. ``` # Installing diff --git a/dpf b/dpf index e8405098..924576a5 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit e8405098f40d0730ef4cdb4bb743897f6e7472ac +Subproject commit 924576a58c3f3a98d7df56f189f3f53fc4da0abb diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 84300bd0..292a0aaa 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -156,7 +156,7 @@ endif # -------------------------------------------------------------- # FIXME -ifeq ($(WASM),true) +ifeq ($(CIBUILD)$(WASM),truetrue) ifneq ($(STATIC_BUILD),true) STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm endif From b57af2d0221b4a51289de80ca6c4d129ff874c9b Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 13 Dec 2022 14:03:07 +0000 Subject: [PATCH 146/451] Enable emscripten --use-preload-cache flag Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 292a0aaa..42d238d3 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -312,6 +312,7 @@ LINK_FLAGS += --preload-file=./jsfx LINK_FLAGS += --preload-file=./lv2 endif LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources +LINK_FLAGS += --use-preload-cache ifneq ($(NOPLUGINS),true) SYMLINKED_DIRS_RESOURCES = # find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort From 0648ad2f64fcfa0b4b09bbfcbf854b7c615c6808 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 13 Dec 2022 21:09:38 +0000 Subject: [PATCH 147/451] Use --keep-debuginfo=yes for valgrind checks Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d1e347a..e0b3f0cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1178,6 +1178,7 @@ jobs: --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ + --keep-debuginfo=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ ./bin/Cardinal selftest - name: Validate LV2 ttl syntax @@ -1204,6 +1205,7 @@ jobs: --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ + --keep-debuginfo=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native lv2 "" ${p}; \ done @@ -1215,6 +1217,7 @@ jobs: --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ + --keep-debuginfo=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native vst2 ./${p} ""; \ done @@ -1226,6 +1229,7 @@ jobs: --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ + --keep-debuginfo=yes \ --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} ""; \ done From 66c2acc64c74f196f2fa8cb8ac4fd0bb0ccaa576 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 13:06:22 +0000 Subject: [PATCH 148/451] Bump version to 22.12 Signed-off-by: falkTX --- Makefile | 2 +- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index adb29992..5c68894f 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.11 +VERSION = 22.12 # -------------------------------------------------------------- # Import base definitions diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 6b34c824..18ece469 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 22.11) +project(Cardinal VERSION 22.12) add_subdirectory(JUCE) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 5508c1ff..ff93cc75 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -57,7 +57,7 @@ # include #endif -const std::string CARDINAL_VERSION = "22.11"; +const std::string CARDINAL_VERSION = "22.12"; namespace rack { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index b19fd77f..8d93932a 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -714,7 +714,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 22, 11); + return d_version(0, 22, 12); } int64_t getUniqueId() const override From 2798523af8a13705daf9e92b27d8bd114bde66ca Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 14:46:35 +0000 Subject: [PATCH 149/451] Update BaconPlugs and Befaco Signed-off-by: falkTX --- docs/LICENSES.md | 9 ++++++++- plugins/BaconPlugs | 2 +- plugins/Befaco | 2 +- plugins/Makefile | 2 +- plugins/plugins.cpp | 12 +++--------- plugins/surgext-helper/surgext-helper.cpp | 6 ++++++ 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/docs/LICENSES.md b/docs/LICENSES.md index cb6501ec..971bf3ef 100644 --- a/docs/LICENSES.md +++ b/docs/LICENSES.md @@ -129,8 +129,15 @@ Below is a list of artwork licenses from plugins | BaconPlugs/* | GPL-3.0-or-later | No artwork specific license provided | | BaconPlugs/midi/* | CC-BY-SA-3.0-DE | | | BaconPlugs/midi/beeth/* | ??? | Unused in Cardinal, taken from http://www.jsbach.net/ | -| BaconPlugs/1f953.svg | CC-BY-4.0 | | +| BaconPlugs/FiraMono-Regular.ttf | OFL-1.1-RFN | | +| BaconPlugs/Monitorica-Bd.ttf | CC-BY-SA-4.0 | | | BaconPlugs/Keypunch029.json | OFL-1.1 | | +| BaconPlugs/1f953.svg | CC-BY-4.0 | | +| BaconPlugs/1f60d.svg | CC-BY-4.0 | | +| BaconPlugs/HelpActive.svg | CC0-1.0 | | +| BaconPlugs/HelpActiveSmall.svg | CC0-1.0 | | +| BaconPlugs/SABROG-*.svg | CC0-1.0 | | +| BaconPlugs/sabrog-*.svg | CC0-1.0 | | | Bidoo/* | CC-BY-NC-ND-4.0 | [Special permission granted for runtime dark mode](https://github.com/sebastien-bouffier/Bidoo/issues/191) | | Befaco/components/* | CC-BY-NC-4.0 | | | Befaco/fonts/Segment7Standard.otf | OFL-1.1-RFN | | diff --git a/plugins/BaconPlugs b/plugins/BaconPlugs index adf84fc0..a86d5081 160000 --- a/plugins/BaconPlugs +++ b/plugins/BaconPlugs @@ -1 +1 @@ -Subproject commit adf84fc00a953f8e8a1b378531a08ee68b9a68d7 +Subproject commit a86d5081d12a72ae0d0c775c61813b695cde8a9c diff --git a/plugins/Befaco b/plugins/Befaco index adcc9203..fcf9b564 160000 --- a/plugins/Befaco +++ b/plugins/Befaco @@ -1 +1 @@ -Subproject commit adcc9203245dae35ffc5a73020bdcc07ff90f557 +Subproject commit fcf9b564017d8eee63504771a3006bea81749ff8 diff --git a/plugins/Makefile b/plugins/Makefile index 9c088587..5565bf07 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1671,7 +1671,7 @@ $(BUILD_DIR)/Axioma/%.cpp.o: Axioma/%.cpp $(BUILD_DIR)/BaconPlugs/%.cpp.o: BaconPlugs/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++17 -c -o $@ \ $(foreach m,$(BACON_CUSTOM),$(call custom_module_names,$(m),BaconPlugs)) \ -DpluginInstance=pluginInstance__Bacon \ -DDARK_BACON \ diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index fd7571b2..b19046a7 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1429,23 +1429,16 @@ static void initStatic__Bacon() p->addModel(modelPolyGnome); p->addModel(modelQuantEyes); p->addModel(modelSampleDelay); -#ifdef BUILD_SORTACHORUS - p->addModel(modelSortaChorus); -#endif p->addModel(modelChipNoise); p->addModel(modelChipWaves); p->addModel(modelChipYourWave); p->addModel(modelOpen303); -#ifdef BUILD_GENERICLSFR - p->addModel(modelGenericLFSR); -#endif p->addModel(modelKarplusStrongPoly); p->addModel(modelALingADing); p->addModel(modelBitulator); -#ifdef BUILD_PHASER - p->addModel(modelPhaser); -#endif p->addModel(modelPolyGenerator); + p->addModel(modelLintBuddy); + p->addModel(modelLuckyHold); } } @@ -1479,6 +1472,7 @@ static void initStatic__Befaco() p->addModel(modelNoisePlethora); p->addModel(modelChannelStrip); p->addModel(modelPonyVCO); + p->addModel(modelMotionMTR); #undef modelADSR #undef modelMixer } diff --git a/plugins/surgext-helper/surgext-helper.cpp b/plugins/surgext-helper/surgext-helper.cpp index 1b7c527f..c349e87b 100644 --- a/plugins/surgext-helper/surgext-helper.cpp +++ b/plugins/surgext-helper/surgext-helper.cpp @@ -15,17 +15,23 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ +#include "../BaconPlugs/src/Style.hpp" #include "../surgext/src/XTStyle.h" +using namespace baconpaul::rackplugs; using namespace sst::surgext_rack::style; void surgext_rack_initialize() { + BaconStyle::get()->activeStyle = rack::settings::darkMode ? BaconStyle::DARK : BaconStyle::LIGHT; XTStyle::initialize(); } void surgext_rack_update_theme() { + BaconStyle::get()->activeStyle = rack::settings::darkMode ? BaconStyle::DARK : BaconStyle::LIGHT; + BaconStyle::get()->notifyStyleListeners(); + XTStyle::setGlobalStyle(rack::settings::darkMode ? XTStyle::Style::DARK : XTStyle::Style::LIGHT); XTStyle::notifyStyleListeners(); } From 6f0a879c17cc938d3a66f447a257343bcd891a8f Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 15:07:12 +0000 Subject: [PATCH 150/451] Renable LTO in preparation for release Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- deps/PawPaw | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0b3f0cd..4df5191e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,12 @@ on: push: env: - CACHE_VERSION: 35 + CACHE_VERSION: 37 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'false' + WITH_LTO: 'true' jobs: linux-arm64: diff --git a/deps/PawPaw b/deps/PawPaw index 1fcfa969..3d91ac76 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 1fcfa969e98624dd3d98a30a0925eb1c3991e4d2 +Subproject commit 3d91ac76b35e8d810489b556aa879b3487c5bb8b From 72ebe14e8d9febd50962ba059406a8e7f41fa1da Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 15:33:30 +0000 Subject: [PATCH 151/451] gperf is needed for new pawpaw Signed-off-by: falkTX --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4df5191e..8678a903 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static + sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 gperf qemu-user-static sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -129,7 +129,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq - sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static + sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf qemu-user-static sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -206,7 +206,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 + sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 gperf sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -288,7 +288,7 @@ jobs: echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static + sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 gperf qemu-user-static sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -358,7 +358,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -410,7 +410,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf sudo apt-get clean - name: Build linux x86_64 (debug) env: @@ -778,7 +778,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq brotli + sudo apt-get install -yqq brotli gperf sudo apt-get clean [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest @@ -934,7 +934,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb + sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 gperf qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -1026,7 +1026,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable qttools5-dev qttools5-dev-tools xvfb + sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable gperf qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 From 9d6bf58b96b29479386fe8ce3f82530397f2fb3d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 15:35:59 +0000 Subject: [PATCH 152/451] Forgot 1 befaco panel Signed-off-by: falkTX --- src/custom/dep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index bac3bf39..5efde7c1 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -472,6 +472,7 @@ static const struct { { kModeBefaco, "/Befaco/res/panels/Mex.svg" }, { kModeBefaco, "/Befaco/res/panels/Mixer.svg" }, { kModeBefaco, "/Befaco/res/panels/Morphader.svg" }, + { kModeBefaco, "/Befaco/res/panels/MotionMTR.svg" }, { kModeBefaco, "/Befaco/res/panels/Muxlicer.svg" }, { kModeBefaco, "/Befaco/res/panels/NoisePlethora.svg" }, { kModeBefaco, "/Befaco/res/panels/Percall.svg" }, From 4840d763810caf3c944cec21bac5b4cca35ffb9d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 19:28:57 +0000 Subject: [PATCH 153/451] Keep mda lv2 bundles in wasm builds Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 42d238d3..5c35bdd2 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -456,8 +456,6 @@ $(TARGET_DIR)/%.app/Contents/Resources/distrho.icns: ../../utils/distrho.icns ifeq ($(WASM),true) $(CURDIR)/lv2/fomp.lv2/manifest.ttl: $(TARGET_DIR)/$(NAME).lv2/resources/PluginManifests/Cardinal.json wget -O - https://falktx.com/data/wasm-things-2022-08-15.tar.gz | tar xz -C $(CURDIR) - # FIXME we are past 50Mb compressed assets! :( - rm -rf $(CURDIR)/lv2/mda.lv2 touch $@ endif From 492ed37783fc54b5001c2ded0faaa69d57fe5424 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 19:29:45 +0000 Subject: [PATCH 154/451] Use -fabi-version=11 for MOD builds Signed-off-by: falkTX --- plugins/Makefile | 3 +++ src/Makefile | 3 +++ src/Makefile.cardinal.mk | 3 +++ 3 files changed, 9 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 5565bf07..83d6cf66 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1197,6 +1197,9 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -fabi-version=11 +endif endif # Rack code is not tested for this flag, unset it diff --git a/src/Makefile b/src/Makefile index a35f6235..483e42bb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -112,6 +112,9 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -fabi-version=11 +endif endif # use our custom function to invert some colors diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 5c35bdd2..6e5371e4 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -288,6 +288,9 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -fabi-version=11 +endif endif # Rack code is not tested for this flag, unset it From 524088fc95fe0a60b8c3acd0f193657fa636ad35 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 Dec 2022 19:36:32 +0000 Subject: [PATCH 155/451] Divide CI builds into 2 stages for wasm/mod/macos/win builds Signed-off-by: falkTX --- .github/workflows/build.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8678a903..2f57a907 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -659,12 +659,14 @@ jobs: sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static - name: Build for modduo + if: steps.mpb-cache.outputs.cache-hit == 'true' run: | make modduo HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} MODDUO=true -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries + if: steps.mpb-cache.outputs.cache-hit == 'true' run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 @@ -699,12 +701,14 @@ jobs: sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static - name: Build for modduox + if: steps.mpb-cache.outputs.cache-hit == 'true' run: | make modduox HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries + if: steps.mpb-cache.outputs.cache-hit == 'true' run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 @@ -739,12 +743,14 @@ jobs: sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf - name: Build for moddwarf + if: steps.mpb-cache.outputs.cache-hit == 'true' run: | make moddwarf HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries + if: steps.mpb-cache.outputs.cache-hit == 'true' run: | tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 @@ -787,12 +793,16 @@ jobs: source ~/PawPawBuilds/emsdk/emsdk_env.sh ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm - name: Build wasm cross-compiled + if: steps.cache.outputs.cache-hit == 'true' + env: + WITH_LTO: 'false' run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd make features - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true WITH_LTO=false -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) - name: Make wasm versioned and compress + if: steps.cache.outputs.cache-hit == 'true' run: | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') cd bin @@ -809,6 +819,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries + if: steps.cache.outputs.cache-hit == 'true' run: | cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 @@ -863,10 +874,11 @@ jobs: NM: emnm RANLIB: emranlib STRIP: emstrip + WITH_LTO: 'false' run: | source ~/emsdk/emsdk_env.sh make features - make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true WITH_LTO=false -j $(nproc) + make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) - name: Make wasm versioned and compress run: | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') @@ -945,6 +957,7 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32 - name: Build win32 cross-compiled (base) + if: steps.cache.outputs.cache-hit == 'true' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" @@ -952,6 +965,7 @@ jobs: make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Build win32 cross-compiled (carla) + if: steps.cache.outputs.cache-hit == 'true' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" @@ -960,6 +974,7 @@ jobs: make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win32 cross-compiled (packaging) + if: steps.cache.outputs.cache-hit == 'true' run: | pushd deps/PawPaw; source local.env win32; popd xvfb-run ./utils/create-windows-installer.sh 32 @@ -971,6 +986,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries + if: steps.cache.outputs.cache-hit == 'true' run: | pushd bin zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) @@ -1037,6 +1053,7 @@ jobs: if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64 - name: Build win64 cross-compiled (base) + if: steps.cache.outputs.cache-hit == 'true' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" @@ -1044,6 +1061,7 @@ jobs: make features make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Build win64 cross-compiled (carla) + if: steps.cache.outputs.cache-hit == 'true' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" @@ -1052,6 +1070,7 @@ jobs: make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) + if: steps.cache.outputs.cache-hit == 'true' run: | pushd deps/PawPaw; source local.env win64; popd xvfb-run ./utils/create-windows-installer.sh 64 @@ -1063,6 +1082,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries + if: steps.cache.outputs.cache-hit == 'true' run: | pushd bin zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) From 0ca3a6a64d3101adb3ce9b4957dc3aac8970e5b6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 11:22:00 +0000 Subject: [PATCH 156/451] Stop using LTO for macos-universal builds Signed-off-by: falkTX --- .github/workflows/build.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f57a907..f3e0463a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -508,8 +508,6 @@ jobs: make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu) - name: Build macOS intel (AU using juce) if: steps.cache.outputs.cache-hit == 'true' - env: - MACOSX_DEPLOYMENT_TARGET: '10.8' run: | if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env macos; popd @@ -571,31 +569,31 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: macos-universal-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: macos-universal-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi + export PAWPAW_SKIP_LTO=1 export PATH="/usr/local/opt/ccache/libexec:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal - name: Set up ccache if: steps.cache.outputs.cache-hit == 'true' uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-macos-universal-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-macos-universal-v${{ env.CACHE_VERSION }} - name: Build macOS universal (base) if: steps.cache.outputs.cache-hit == 'true' + env: + WITH_LTO: 'false' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi + export PAWPAW_SKIP_LTO=1 export PATH="/usr/local/opt/ccache/libexec:${PATH}" pushd deps/PawPaw; source local.env macos-universal; popd make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu) + make CIBUILD=true NOOPT=true -j $(sysctl -n hw.logicalcpu) - name: Build macOS universal (AU using juce) if: steps.cache.outputs.cache-hit == 'true' - env: - MACOSX_DEPLOYMENT_TARGET: '10.12' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi + export PAWPAW_SKIP_LTO=1 pushd deps/PawPaw; source local.env macos-universal; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE mkdir -p jucewrapper/build From 154ae87a41e2349d6738c6a6e65a4d32305891d8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 15:42:12 +0000 Subject: [PATCH 157/451] Try to fix MOD builds Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 6e5371e4..84e5fa0a 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -290,6 +290,7 @@ ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) BUILD_CXX_FLAGS += -fabi-version=11 +LINK_FLAGS += -fabi-version=11 endif endif From 73f7a165a659184522ea9e7882d19459820e9473 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 15:52:45 +0000 Subject: [PATCH 158/451] Try to fix win32 builds Signed-off-by: falkTX --- plugins/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 83d6cf66..1fae7f2a 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1143,12 +1143,14 @@ BASE_FLAGS += -I../src/Rack/dep/nanosvg/src BASE_FLAGS += -I../src/Rack/dep/oui-blendish BASE_FLAGS += -I../src/Rack/dep/pffft -ifeq ($(DEBUG),true) -BASE_FLAGS += -UDEBUG +# SSE must always be enabled, even in debug builds +BASE_FLAGS += -msse -msse2 -msse3 ifeq ($(WASM),true) -# SSE must always be enabled on wasm, even in debug builds -BASE_FLAGS += -msse -msse2 -msse3 -msimd128 +BASE_FLAGS += -msimd128 endif + +ifeq ($(DEBUG),true) +BASE_FLAGS += -UDEBUG endif ifeq ($(HEADLESS),true) From 3b7435f8ee4b479bc1a99b69a0fb3513dd28b52c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 16:03:47 +0000 Subject: [PATCH 159/451] Fix a typo Signed-off-by: falkTX --- plugins/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 1fae7f2a..bbc2bd60 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1144,10 +1144,12 @@ BASE_FLAGS += -I../src/Rack/dep/oui-blendish BASE_FLAGS += -I../src/Rack/dep/pffft # SSE must always be enabled, even in debug builds +ifeq ($(CPU_I386_OR_X86_64),true) BASE_FLAGS += -msse -msse2 -msse3 ifeq ($(WASM),true) BASE_FLAGS += -msimd128 endif +endif ifeq ($(DEBUG),true) BASE_FLAGS += -UDEBUG From c90850602df9f2871c8733e0e506e3ec3be1b962 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 16:52:48 +0000 Subject: [PATCH 160/451] Alternative build fix Signed-off-by: falkTX --- deps/Makefile | 12 +++++++++--- plugins/Makefile | 2 +- src/Makefile | 2 +- src/Makefile.cardinal.mk | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 70970fe2..6c83d0eb 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -34,15 +34,21 @@ endif BASE_FLAGS += -I$(abspath ../include) BASE_FLAGS += -I$(abspath ../include/simd-compat) +# SSE must always be enabled, even in debug builds +ifeq ($(CPU_I386_OR_X86_64),true) +BASE_FLAGS += -msse -msse2 -msse3 +ifeq ($(WASM),true) +BASE_FLAGS += -msimd128 +endif +endif + ifeq ($(HAIKU)$(WASM),true) BASE_FLAGS += -I$(abspath ../include/linux-compat) endif -ifeq ($(HEADLESS),true) -ifeq ($(WITH_LTO),true) +ifeq ($(MOD_BUILD)$(WITH_LTO),true) BASE_FLAGS += -ffat-lto-objects endif -endif ifneq ($(SYSDEPS),true) BASE_FLAGS += -DZSTDLIB_VISIBILITY= diff --git a/plugins/Makefile b/plugins/Makefile index bbc2bd60..0ba155c9 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1202,7 +1202,7 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -fabi-version=11 +BUILD_CXX_FLAGS += -fabi-version=12 endif endif diff --git a/src/Makefile b/src/Makefile index 483e42bb..aaa90acf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -113,7 +113,7 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -fabi-version=11 +BUILD_CXX_FLAGS += -fabi-version=12 endif endif diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 84e5fa0a..444b01d3 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -289,8 +289,8 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -fabi-version=11 -LINK_FLAGS += -fabi-version=11 +BUILD_CXX_FLAGS += -fabi-version=12 +LINK_FLAGS += -fabi-version=12 endif endif From d2b51b442ff52b46f8f1246290dd57b98220577b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 20:56:49 +0000 Subject: [PATCH 161/451] Fix windows build Signed-off-by: falkTX --- deps/PawPaw | 2 +- plugins/surgext | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/PawPaw b/deps/PawPaw index 3d91ac76..63bf2d8e 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 3d91ac76b35e8d810489b556aa879b3487c5bb8b +Subproject commit 63bf2d8e954cc7838f5d9df9b14e4d460abca942 diff --git a/plugins/surgext b/plugins/surgext index b39a4b1e..41c4ce88 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit b39a4b1e46a0ea5ccfddaf3bbda11d42270265a0 +Subproject commit 41c4ce883f877a1f3d7cabc2cad943f34fde431f From bf4be75cb7b863b2d6901e34f98d1b92e0790c74 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 22:13:28 +0000 Subject: [PATCH 162/451] Fix MOD builds Signed-off-by: falkTX --- deps/Makefile | 8 -------- plugins/Makefile | 11 ++++++----- src/Makefile | 7 ++++++- src/Makefile.cardinal.mk | 3 +-- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 6c83d0eb..8b4ec3fa 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -34,14 +34,6 @@ endif BASE_FLAGS += -I$(abspath ../include) BASE_FLAGS += -I$(abspath ../include/simd-compat) -# SSE must always be enabled, even in debug builds -ifeq ($(CPU_I386_OR_X86_64),true) -BASE_FLAGS += -msse -msse2 -msse3 -ifeq ($(WASM),true) -BASE_FLAGS += -msimd128 -endif -endif - ifeq ($(HAIKU)$(WASM),true) BASE_FLAGS += -I$(abspath ../include/linux-compat) endif diff --git a/plugins/Makefile b/plugins/Makefile index 0ba155c9..e6f7057d 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1145,9 +1145,9 @@ BASE_FLAGS += -I../src/Rack/dep/pffft # SSE must always be enabled, even in debug builds ifeq ($(CPU_I386_OR_X86_64),true) -BASE_FLAGS += -msse -msse2 -msse3 +BASE_FLAGS += -msse -msse2 ifeq ($(WASM),true) -BASE_FLAGS += -msimd128 +BASE_FLAGS += -msse3 -msimd128 endif endif @@ -1202,7 +1202,7 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -fabi-version=12 +BUILD_CXX_FLAGS += -std=gnu++17 endif endif @@ -1212,8 +1212,9 @@ 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 +# Ignore warnings from simde +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -Wno-overflow endif # -------------------------------------------------------------- diff --git a/src/Makefile b/src/Makefile index aaa90acf..170ebc2e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -113,7 +113,7 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -fabi-version=12 +BUILD_CXX_FLAGS += -std=gnu++17 endif endif @@ -127,6 +127,11 @@ BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS # Ignore bad behaviour from Rack API BUILD_CXX_FLAGS += -Wno-format-security +# Ignore warnings from simde +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -Wno-overflow +endif + # -------------------------------------------------------------- # Rack files to build diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 444b01d3..05e9f225 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -289,8 +289,7 @@ BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -fabi-version=12 -LINK_FLAGS += -fabi-version=12 +BUILD_CXX_FLAGS += -std=gnu++17 endif endif From 404c58dcbf4fd215ed56d460adf33d635488df39 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Dec 2022 23:10:17 +0000 Subject: [PATCH 163/451] Use ubuntu-22.04 for wasm builds, matching local ones Signed-off-by: falkTX --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3e0463a..8df0f3d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 37 + CACHE_VERSION: 38 CARDINAL_UNDER_WINE: 1 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 @@ -758,7 +758,7 @@ jobs: *.tar.gz wasm: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: @@ -836,7 +836,7 @@ jobs: *.zip wasm-mini: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: From e8045f0b6d12eb2ac0376f16853d9de77a83cf98 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Dec 2022 13:31:09 +0000 Subject: [PATCH 164/451] Stick with emscripten v3.1.27 for now Signed-off-by: falkTX --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8df0f3d8..9794b0f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,7 @@ on: env: CACHE_VERSION: 38 CARDINAL_UNDER_WINE: 1 + EMSCRIPTEN_VERSION: 3.1.27 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' @@ -785,7 +786,7 @@ jobs: sudo apt-get install -yqq brotli gperf sudo apt-get clean [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk - cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest + cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} - name: Build extra dependencies run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh @@ -863,7 +864,7 @@ jobs: sudo apt-get install -yqq brotli sudo apt-get clean [ -e ~/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/emsdk - cd ~/emsdk && ./emsdk install latest && ./emsdk activate latest + cd ~/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} - name: Build wasm-mini cross-compiled env: AR: emar From 27c33ba897fd6af29c9339568b0057b29e161fec Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Dec 2022 13:33:34 +0000 Subject: [PATCH 165/451] Strip out a few more files from source tarball Signed-off-by: falkTX --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Makefile b/Makefile index 5c68894f..55d96a02 100644 --- a/Makefile +++ b/Makefile @@ -350,6 +350,29 @@ TAR_ARGS = \ --exclude=plugins/BogaudioModules/res-src \ --exclude=plugins/Cardinal/orig \ --exclude=plugins/GrandeModular/res-src \ + --exclude=plugins/surgext/surge/libs/JUCE/docs \ + --exclude=plugins/surgext/surge/libs/JUCE/examples \ + --exclude=plugins/surgext/surge/libs/JUCE/extras \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/CMakeLists.txt \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_analytics \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_devices \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_plugin_client \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_processors \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_utils \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_box2d \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_cryptography \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_data_structures \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_events \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_graphics \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_gui_basics \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_gui_extra \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_opengl \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_osc \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_product_unlocking \ + --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_video \ + --exclude=plugins/surgext/surge/resources/data/patches_3rdparty \ + --exclude=plugins/surgext/surge/resources/data/patches_factory \ + --exclude=plugins/surgext/surge/resources/data/wavetables_3rdparty \ --exclude=src/MOD \ --exclude=src/Rack/adapters \ --exclude=src/Rack/dep/filesystem/cmake \ @@ -385,10 +408,13 @@ TAR_ARGS = \ --exclude=src/Rack/src/app/AudioDisplay.cpp \ --exclude=src/Rack/src/app/MenuBar.cpp \ --exclude=src/Rack/src/app/MidiDisplay.cpp \ + --exclude=src/Rack/src/app/ModuleWidget.cpp \ --exclude=src/Rack/src/app/Scene.cpp \ --exclude=src/Rack/src/app/TipWindow.cpp \ + --exclude=src/Rack/src/dsp/minblep.cpp \ --exclude=src/Rack/src/engine/Engine.cpp \ --exclude=src/Rack/src/plugin/Model.cpp \ + --exclude=src/Rack/src/widget/OpenGlWidget.cpp \ --exclude=src/Rack/src/window/Window.cpp \ --exclude=src/Rack/res/Core \ --exclude=src/Rack/res/icon.png \ From 2aa63fbc46c364ab1294b2998e6f35eeb0d62ac1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Dec 2022 13:34:16 +0000 Subject: [PATCH 166/451] Fix SSE not being enabled in pffft for 32bit builds Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- src/Makefile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9794b0f7..b683029e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 38 + CACHE_VERSION: 39 CARDINAL_UNDER_WINE: 1 EMSCRIPTEN_VERSION: 3.1.27 DEBIAN_FRONTEND: noninteractive diff --git a/src/Makefile b/src/Makefile index 170ebc2e..a3a1f203 100644 --- a/src/Makefile +++ b/src/Makefile @@ -62,6 +62,11 @@ BASE_FLAGS += -IRack/dep/osdialog BASE_FLAGS += -IRack/dep/oui-blendish BASE_FLAGS += -IRack/dep/pffft +ifeq ($(CPU_I386),true) +# needed for enabling SSE in pffft +BASE_FLAGS += -Di386 +endif + ifeq ($(DEBUG),true) BASE_FLAGS += -UDEBUG ifeq ($(WASM),true) From 667760b343cdc656c24ac1affe54e1bc2f9d3eb2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Dec 2022 22:27:55 +0000 Subject: [PATCH 167/451] Add JTB Waves example/demo patch, use it for wasm intro Signed-off-by: falkTX --- patches/examples/JTB_-_Waves.vcv | 6372 +++++++++++++++++++++++++++++ patches/welcome-wasm.vcv | 6395 +++++++++++++++++++++++++++--- plugins/MindMeldModular | 2 +- 3 files changed, 12151 insertions(+), 618 deletions(-) create mode 100644 patches/examples/JTB_-_Waves.vcv diff --git a/patches/examples/JTB_-_Waves.vcv b/patches/examples/JTB_-_Waves.vcv new file mode 100644 index 00000000..4e6dc0d1 --- /dev/null +++ b/patches/examples/JTB_-_Waves.vcv @@ -0,0 +1,6372 @@ +{ + "version": "2.1.2", + "zoom": 1.0, + "modules": [ + { + "id": 6532964214833122, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.6337316632270813, + "id": 2 + }, + { + "value": 0.45300984382629395, + "id": 3 + }, + { + "value": 0.61325019598007202, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 1748021940156784, + "rightModuleId": 7545907193641280, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Chord Dist", + "Bass Top", + "Ringmod", + "Chord Dist", + "No name", + "No name", + "Chods", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 8, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2364063745493562, + "paramId": 2, + "rangeMax": 0.3600081205368042, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2364063745493562, + "paramId": 5, + "rangeMax": 0.49200648069381714, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 19, + 0 + ] + }, + { + "id": 1748021940156784, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 1.0, + "id": 2 + }, + { + "value": 0.45300984382629395, + "id": 3 + }, + { + "value": 0.90603351593017578, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 359762865999381, + "rightModuleId": 6532964214833122, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Bass Top", + "Bass Top", + "Filer Cutoff", + "Chord Dist", + "No name", + "No name", + "Bass", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 10, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 29, + "rangeMax": 0.85500186681747437, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 1202888979525309, + "paramId": 9, + "rangeMax": 0.70200371742248535, + "rangeMin": 0.43799790740013123 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2120522391757438, + "paramId": 0, + "rangeMax": 0.7510036826133728, + "rangeMin": 0.2460002601146698 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 15, + 0 + ] + }, + { + "id": 359762865999381, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.5807153582572937, + "id": 2 + }, + { + "value": 0.45300984382629395, + "id": 3 + }, + { + "value": 0.31565791368484497, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 2859633263682263, + "rightModuleId": 1748021940156784, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Lead Dist", + "Bass Top", + "Dist Tone", + "Chord Dist", + "No name", + "No name", + "Lead", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 9, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 24, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 4, + "rangeMax": 0.44400703907012939, + "rangeMin": 0.0 + }, + { + "moduleId": 7354440315312540, + "paramId": 21, + "rangeMax": 0.67599606513977051, + "rangeMin": 0.75699460506439209 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 1, + "rangeMax": 0.39900767803192139, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 11, + 0 + ] + }, + { + "id": 3492788997026115, + "plugin": "ImpromptuModular", + "model": "Clocked", + "version": "2.0", + "params": [ + { + "value": 87.0, + "id": 0 + }, + { + "value": -9.0, + "id": 1 + }, + { + "value": 4.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.5, + "id": 9 + }, + { + "value": 0.84217530488967896, + "id": 10 + }, + { + "value": 0.5, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + } + ], + "rightModuleId": 6206908039426907, + "data": { + "panelTheme": 1, + "panelContrast": 220.0, + "running": true, + "displayDelayNoteMode": true, + "bpmDetectionMode": false, + "resetOnStartStop": 0, + "ppqn": 4, + "resetClockOutputsHigh": false, + "momentaryRunInput": true, + "forceCvOnBpmOut": false, + "clockMaster": false + }, + "pos": [ + 28, + 2 + ] + }, + { + "id": 2528905409371299, + "plugin": "AudibleInstruments", + "model": "Branches", + "version": "2.0", + "params": [ + { + "value": 0.68915784358978271, + "id": 0 + }, + { + "value": 0.5, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "leftModuleId": 3147629330555360, + "rightModuleId": 8858399717280256, + "data": { + "modes": [ + false, + false + ] + }, + "pos": [ + 77, + 2 + ] + }, + { + "id": 8858399717280256, + "plugin": "Bogaudio", + "model": "Bogaudio-SampleHold", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + } + ], + "leftModuleId": 2528905409371299, + "rightModuleId": 1929072526365403, + "data": { + "poly_input": 0, + "noise_type": 0, + "range_offset": 1.0, + "range_scale": 5.0, + "smoothing_ms": 0.0 + }, + "pos": [ + 83, + 2 + ] + }, + { + "id": 5599750386095483, + "plugin": "Bogaudio", + "model": "Bogaudio-Offset", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.10659158229827881, + "id": 1 + } + ], + "leftModuleId": 931699531175066, + "rightModuleId": 1660124145346554, + "data": { + "disableOutputLimit": false, + "offset_first": false + }, + "pos": [ + 92, + 2 + ] + }, + { + "id": 8451952277485002, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.065060213208198547, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.49092867970466614, + "id": 2 + }, + { + "value": 0.34457814693450928, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 7614703401631065, + "rightModuleId": 7354440315312540, + "data": {}, + "pos": [ + 38, + 0 + ] + }, + { + "id": 7649815730956881, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.46746960282325745, + "id": 0 + }, + { + "value": 0.26987949013710022, + "id": 1 + }, + { + "value": 0.43912151455879211, + "id": 2 + }, + { + "value": 0.34457814693450928, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 1163775849135581, + "rightModuleId": 2364063745493562, + "data": {}, + "pos": [ + 16, + 1 + ] + }, + { + "id": 8078887273046425, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.38072267174720764, + "id": 0 + }, + { + "value": 0.15421679615974426, + "id": 1 + }, + { + "value": 0.51261603832244873, + "id": 2 + }, + { + "value": 0.34457814693450928, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 1232093242356119, + "rightModuleId": 7693134582131517, + "data": {}, + "pos": [ + 58, + 1 + ] + }, + { + "id": 1232093242356119, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.43012022972106934, + "id": 0 + }, + { + "value": -0.46987923979759216, + "id": 1 + }, + { + "value": 0.50538665056228638, + "id": 2 + }, + { + "value": 0.34457814693450928, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 1772638206753921, + "rightModuleId": 8078887273046425, + "data": {}, + "pos": [ + 55, + 1 + ] + }, + { + "id": 1929072526365403, + "plugin": "Bogaudio", + "model": "Bogaudio-DGate", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 1.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "leftModuleId": 8858399717280256, + "rightModuleId": 931699531175066, + "data": { + "triggerOnLoad": true, + "shouldTriggerOnLoad": true + }, + "pos": [ + 86, + 2 + ] + }, + { + "id": 931699531175066, + "plugin": "Bogaudio", + "model": "Bogaudio-PolyMult", + "version": "2.0", + "params": [ + { + "value": 3.0, + "id": 0 + } + ], + "leftModuleId": 1929072526365403, + "rightModuleId": 5599750386095483, + "data": {}, + "pos": [ + 89, + 2 + ] + }, + { + "id": 6206908039426907, + "plugin": "Bogaudio", + "model": "Bogaudio-AddrSeq", + "version": "2.0", + "params": [ + { + "value": 4.1457595825195312, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.22168663144111633, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.1012047752737999, + "id": 5 + }, + { + "value": 0.13975897431373596, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + } + ], + "leftModuleId": 3492788997026115, + "rightModuleId": 3623085877119332, + "data": { + "poly_input": 0, + "select_on_clock": false, + "triggered_select": false, + "reverse_on_negative_clock": false, + "wrap_select_at_steps": false, + "range_offset": 0.0, + "range_scale": 1.0 + }, + "pos": [ + 48, + 2 + ] + }, + { + "id": 3623085877119332, + "plugin": "ImpromptuModular", + "model": "Chord-Key", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + } + ], + "leftModuleId": 6206908039426907, + "rightModuleId": 3147629330555360, + "data": { + "panelTheme": 1, + "panelContrast": 220.0, + "octs": [ + 3, + 3, + 4, + -1, + 3, + 3, + 4, + -1, + 3, + 4, + 4, + -1, + 3, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1 + ], + "keys": [ + 7, + 10, + 2, + 0, + 0, + 3, + 7, + 0, + 2, + 5, + 9, + 0, + 10, + 2, + 5, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0 + ], + "mergeOutputs": 0, + "keypressEmitGate": 1, + "autostepPaste": 0 + }, + "pos": [ + 54, + 2 + ] + }, + { + "id": 7579603213780856, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCSine", + "version": "2.0", + "params": [ + { + "value": -1.0, + "id": 0 + }, + { + "value": 0.004999999888241291, + "id": 1 + }, + { + "value": 0.62857121229171753, + "id": 2 + }, + { + "value": 0.99500000476837158, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 1.0, + "id": 5 + }, + { + "value": 0.10000000149011612, + "id": 6 + }, + { + "value": 0.004999999888241291, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "leftModuleId": 3538881790933672, + "rightModuleId": 3272418169313056, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 66, + 0 + ] + }, + { + "id": 3272418169313056, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXTreeMonster", + "version": "2.0", + "params": [ + { + "value": 0.75, + "id": 0 + }, + { + "value": 0.5, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 1.0, + "id": 3 + }, + { + "value": 0.40000000596046448, + "id": 4 + }, + { + "value": 0.24543231725692749, + "id": 5 + }, + { + "value": 0.20671668648719788, + "id": 6 + }, + { + "value": 1.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + }, + { + "value": 1.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 + } + ], + "leftModuleId": 7579603213780856, + "rightModuleId": 2120522391757438, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": true + } + }, + "pos": [ + 78, + 0 + ] + }, + { + "id": 2120522391757438, + "plugin": "SurgeXTRack", + "model": "SurgeXTVCF", + "version": "2.0", + "params": [ + { + "value": 3.0355033874511719, + "id": 0 + }, + { + "value": 0.82925224304199219, + "id": 1 + }, + { + "value": 2.0, + "id": 2 + }, + { + "value": 1.0, + "id": 3 + }, + { + "value": 1.5194351673126221, + "id": 4 + }, + { + "value": 1.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 28.0, + "id": 25 + }, + { + "value": 3.0, + "id": 26 + } + ], + "leftModuleId": 3272418169313056, + "rightModuleId": 1202888979525309, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 90, + 0 + ] + }, + { + "id": 1202888979525309, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXDistortion", + "version": "2.0", + "params": [ + { + "value": 0.63885778188705444, + "id": 0 + }, + { + "value": 0.48576384782791138, + "id": 1 + }, + { + "value": 0.38892880082130432, + "id": 2 + }, + { + "value": 0.53337103128433228, + "id": 3 + }, + { + "value": 0.87157571315765381, + "id": 4 + }, + { + "value": 0.84071719646453857, + "id": 5 + }, + { + "value": 0.56428641080856323, + "id": 6 + }, + { + "value": 0.25704637169837952, + "id": 7 + }, + { + "value": 0.40625, + "id": 8 + }, + { + "value": 0.70200371742248535, + "id": 9 + }, + { + "value": 0.5, + "id": 10 + }, + { + "value": 0.14642857015132904, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 1.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 1.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + }, + { + "value": 0.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 + } + ], + "leftModuleId": 2120522391757438, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": false + } + }, + "pos": [ + 102, + 0 + ] + }, + { + "id": 1163775849135581, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCClassic", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.25957661867141724, + "id": 1 + }, + { + "value": 0.52571725845336914, + "id": 2 + }, + { + "value": 0.62986081838607788, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.10000000149011612, + "id": 6 + }, + { + "value": 0.004999999888241291, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "rightModuleId": 7649815730956881, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 4, + 1 + ] + }, + { + "id": 3147629330555360, + "plugin": "GrandeModular", + "model": "Merge8", + "version": "2.0", + "params": [], + "leftModuleId": 3623085877119332, + "rightModuleId": 2528905409371299, + "data": { + "channels_merge": -1 + }, + "pos": [ + 75, + 2 + ] + }, + { + "id": 1660124145346554, + "plugin": "ML_modules", + "model": "Quantum", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + } + ], + "leftModuleId": 5599750386095483, + "data": { + "scale": [ + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0 + ], + "mode": 1, + "transpose_select": 1, + "toggle_mode": 1 + }, + "pos": [ + 95, + 2 + ] + }, + { + "id": 7545907193641280, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.17526623606681824, + "id": 0 + }, + { + "value": -0.33734920620918274, + "id": 1 + }, + { + "value": 0.17285659909248352, + "id": 2 + }, + { + "value": -0.41927692294120789, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 6532964214833122, + "rightModuleId": 7614703401631065, + "data": {}, + "pos": [ + 23, + 0 + ] + }, + { + "id": 7614703401631065, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCTwist", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.004999999888241291, + "id": 1 + }, + { + "value": 0.5, + "id": 2 + }, + { + "value": 0.18885940313339233, + "id": 3 + }, + { + "value": 0.68385952711105347, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.91899901628494263, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "leftModuleId": 7545907193641280, + "rightModuleId": 8451952277485002, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 26, + 0 + ] + }, + { + "id": 7354440315312540, + "plugin": "SurgeXTRack", + "model": "SurgeXTVCF", + "version": "2.0", + "params": [ + { + "value": 0.23143219947814941, + "id": 0 + }, + { + "value": 0.53199803829193115, + "id": 1 + }, + { + "value": 1.9437248706817627, + "id": 2 + }, + { + "value": 1.0, + "id": 3 + }, + { + "value": 0.50480771064758301, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 1.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.41991496086120605, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 16.0, + "id": 25 + }, + { + "value": 3.0, + "id": 26 + } + ], + "leftModuleId": 8451952277485002, + "rightModuleId": 8631911439676095, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 41, + 0 + ] + }, + { + "id": 8631911439676095, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXExciter", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.12594993412494659, + "id": 1 + }, + { + "value": 0.49999994039535522, + "id": 2 + }, + { + "value": 0.49999994039535522, + "id": 3 + }, + { + "value": 0.25784170627593994, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + } + ], + "leftModuleId": 7354440315312540, + "rightModuleId": 3538881790933672, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": false + } + }, + "pos": [ + 53, + 0 + ] + }, + { + "id": 6408811696897743, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCModern", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.62471598386764526, + "id": 2 + }, + { + "value": 0.60414427518844604, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.094571217894554138, + "id": 6 + }, + { + "value": 0.13726678490638733, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "rightModuleId": 977849113384714, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 9, + 2 + ] + }, + { + "id": 977849113384714, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 6408811696897743, + "rightModuleId": 1132602188892100, + "pos": [ + 21, + 2 + ] + }, + { + "id": 1132602188892100, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 977849113384714, + "pos": [ + 24, + 2 + ] + }, + { + "id": 2364063745493562, + "plugin": "SurgeXTRack", + "model": "SurgeXTMixer", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.22814854979515076, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.30172306299209595, + "id": 5 + }, + { + "value": 0.37028577923774719, + "id": 6 + }, + { + "value": 1.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 1.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.88200151920318604, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 1.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.2260001003742218, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.67200368642807007, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + } + ], + "leftModuleId": 7649815730956881, + "rightModuleId": 8524145861178282, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "vuChannel": 0 + } + }, + "pos": [ + 19, + 1 + ] + }, + { + "id": 8524145861178282, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXChorus", + "version": "2.0", + "params": [ + { + "value": 0.1591431051492691, + "id": 0 + }, + { + "value": 0.6618039608001709, + "id": 1 + }, + { + "value": 0.41764268279075623, + "id": 2 + }, + { + "value": 0.26871439814567566, + "id": 3 + }, + { + "value": 0.27980762720108032, + "id": 4 + }, + { + "value": 0.96663463115692139, + "id": 5 + }, + { + "value": 0.42299914360046387, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + }, + { + "value": 1.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 + } + ], + "leftModuleId": 2364063745493562, + "rightModuleId": 1772638206753921, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init (Dry)", + "presetIsDirty": true, + "clockStyle": 0, + "polyphonicMode": false + } + }, + "pos": [ + 31, + 1 + ] + }, + { + "id": 1772638206753921, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": 7.0902948379516602, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.46771752834320068, + "id": 2 + }, + { + "value": -23.228555679321289, + "id": 3 + }, + { + "value": 34.732803344726562, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.094000227749347687, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 41.0, + "id": 25 + }, + { + "value": 1.0, + "id": 26 + }, + { + "value": 1.0, + "id": 27 + } + ], + "leftModuleId": 8524145861178282, + "rightModuleId": 1232093242356119, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 43, + 1 + ] + }, + { + "id": 7693134582131517, + "plugin": "SurgeXTRack", + "model": "SurgeXTMixer", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.0025714286603033543, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.55385059118270874, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.75699687004089355, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 1.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 1.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.8123, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.71000373363494873, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + } + ], + "leftModuleId": 8078887273046425, + "rightModuleId": 1629089543055674, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "vuChannel": 0 + } + }, + "pos": [ + 61, + 1 + ] + }, + { + "id": 1629089543055674, + "plugin": "SurgeXTRack", + "model": "SurgeXTDelay", + "version": "2.0", + "params": [ + { + "value": -2.0501079559326172, + "id": 0 + }, + { + "value": -1.4222614765167236, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.41385790705680847, + "id": 3 + }, + { + "value": 0.30214270949363708, + "id": 4 + }, + { + "value": -18.046905517578125, + "id": 5 + }, + { + "value": 70.0, + "id": 6 + }, + { + "value": 2.0, + "id": 7 + }, + { + "value": 0.2314288467168808, + "id": 8 + }, + { + "value": 0.26585954427719116, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + } + ], + "leftModuleId": 7693134582131517, + "rightModuleId": 7411284708330475, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "clockStyle": 0 + } + }, + "pos": [ + 73, + 1 + ] + }, + { + "id": 7411284708330475, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXReverb2", + "version": "2.0", + "params": [ + { + "value": 0.31384137272834778, + "id": 0 + }, + { + "value": 0.68128818273544312, + "id": 1 + }, + { + "value": 0.75457382202148438, + "id": 2 + }, + { + "value": 0.59514415264129639, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.63371568918228149, + "id": 5 + }, + { + "value": 0.5, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.39957103133201599, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + } + ], + "leftModuleId": 1629089543055674, + "rightModuleId": 8500492434533465, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init (Dry)", + "presetIsDirty": true, + "polyphonicMode": false + } + }, + "pos": [ + 85, + 1 + ] + }, + { + "id": 8500492434533465, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": 13.206838607788086, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 1.0, + "id": 2 + }, + { + "value": -60.0, + "id": 3 + }, + { + "value": 70.0, + "id": 4 + }, + { + "value": -0.12199990451335907, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 1.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + } + ], + "leftModuleId": 7411284708330475, + "rightModuleId": 1, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 97, + 1 + ] + }, + { + "id": 2859633263682263, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.51688289642333984, + "id": 3 + }, + { + "value": 0.21083655953407288, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "rightModuleId": 359762865999381, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 180, + 180, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Reset", + "Run", + "Lead Dist", + "Bass Top", + "Dist Tone", + "Chord Dist", + "No name", + "No name", + "Control", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 3492788997026115, + "paramId": 12, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 0, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 7, + 0 + ] + }, + { + "id": 3538881790933672, + "plugin": "MindMeldModular", + "model": "PatchMasterBlank", + "version": "2.0", + "params": [], + "leftModuleId": 8631911439676095, + "rightModuleId": 7579603213780856, + "data": { + "facePlate": 0 + }, + "pos": [ + 65, + 0 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 1.1885021924972534, + "id": 0 + } + ], + "leftModuleId": 8500492434533465, + "data": { + "dcFilter": true + }, + "pos": [ + 109, + 1 + ] + } + ], + "cables": [ + { + "id": 2270741436436214, + "outputModuleId": 3492788997026115, + "outputId": 4, + "inputModuleId": 6206908039426907, + "inputId": 1, + "color": "#a852ff" + }, + { + "id": 2097699839995605, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 6206908039426907, + "inputId": 0, + "color": "#e952ff" + }, + { + "id": 6079412029041749, + "outputModuleId": 3623085877119332, + "outputId": 0, + "inputModuleId": 3147629330555360, + "inputId": 0, + "color": "#ff52d4" + }, + { + "id": 2696582111282382, + "outputModuleId": 3623085877119332, + "outputId": 1, + "inputModuleId": 3147629330555360, + "inputId": 1, + "color": "#ff5293" + }, + { + "id": 5161684793713160, + "outputModuleId": 3623085877119332, + "outputId": 2, + "inputModuleId": 3147629330555360, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 1131487853388165, + "outputModuleId": 3147629330555360, + "outputId": 0, + "inputModuleId": 6408811696897743, + "inputId": 0, + "color": "#ffd452" + }, + { + "id": 2067186493700170, + "outputModuleId": 6206908039426907, + "outputId": 0, + "inputModuleId": 3623085877119332, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 1423211978847534, + "outputModuleId": 6408811696897743, + "outputId": 0, + "inputModuleId": 1132602188892100, + "inputId": 0, + "color": "#6752ff" + }, + { + "id": 5494619626061851, + "outputModuleId": 6408811696897743, + "outputId": 1, + "inputModuleId": 977849113384714, + "inputId": 0, + "color": "#e952ff" + }, + { + "id": 4950214390198147, + "outputModuleId": 1132602188892100, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 0, + "color": "#ff52d4" + }, + { + "id": 7274650136027879, + "outputModuleId": 977849113384714, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 1, + "color": "#ff5293" + }, + { + "id": 7057149860399312, + "outputModuleId": 1772638206753921, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 4, + "color": "#ffd452" + }, + { + "id": 3994158684795789, + "outputModuleId": 1772638206753921, + "outputId": 1, + "inputModuleId": 2364063745493562, + "inputId": 5, + "color": "#e8ff52" + }, + { + "id": 3699248077047949, + "outputModuleId": 2364063745493562, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 0, + "color": "#527dff" + }, + { + "id": 3975712550017439, + "outputModuleId": 2364063745493562, + "outputId": 1, + "inputModuleId": 7693134582131517, + "inputId": 1, + "color": "#6752ff" + }, + { + "id": 5300960027149656, + "outputModuleId": 931699531175066, + "outputId": 0, + "inputModuleId": 1660124145346554, + "inputId": 3, + "color": "#e952ff" + }, + { + "id": 900918383140940, + "outputModuleId": 3147629330555360, + "outputId": 0, + "inputModuleId": 1660124145346554, + "inputId": 2, + "color": "#ff52d4" + }, + { + "id": 6532209984750418, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 1929072526365403, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 6564485122333790, + "outputModuleId": 1929072526365403, + "outputId": 0, + "inputModuleId": 931699531175066, + "inputId": 1, + "color": "#ffd452" + }, + { + "id": 2253867120168600, + "outputModuleId": 5599750386095483, + "outputId": 0, + "inputModuleId": 1660124145346554, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 4218135157649869, + "outputModuleId": 8858399717280256, + "outputId": 0, + "inputModuleId": 5599750386095483, + "inputId": 2, + "color": "#a8ff52" + }, + { + "id": 2550860768686067, + "outputModuleId": 7614703401631065, + "outputId": 1, + "inputModuleId": 7354440315312540, + "inputId": 1, + "color": "#52beff" + }, + { + "id": 4865743156594477, + "outputModuleId": 7614703401631065, + "outputId": 0, + "inputModuleId": 7354440315312540, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 6208990526502806, + "outputModuleId": 8451952277485002, + "outputId": 0, + "inputModuleId": 7354440315312540, + "inputId": 2, + "color": "#527dff" + }, + { + "id": 3879998451215591, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 1232093242356119, + "inputId": 2, + "color": "#e8ff52" + }, + { + "id": 6677050153459000, + "outputModuleId": 1232093242356119, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 6, + "color": "#ff52d4" + }, + { + "id": 3180361347060172, + "outputModuleId": 2364063745493562, + "outputId": 0, + "inputModuleId": 8524145861178282, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 402678970644369, + "outputModuleId": 2364063745493562, + "outputId": 1, + "inputModuleId": 8524145861178282, + "inputId": 1, + "color": "#ff9352" + }, + { + "id": 5399015047720053, + "outputModuleId": 8524145861178282, + "outputId": 0, + "inputModuleId": 1772638206753921, + "inputId": 0, + "color": "#ff5293" + }, + { + "id": 6958403219190982, + "outputModuleId": 8524145861178282, + "outputId": 1, + "inputModuleId": 1772638206753921, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 8324132731591866, + "outputModuleId": 7693134582131517, + "outputId": 0, + "inputModuleId": 1629089543055674, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 7409295800152681, + "outputModuleId": 7693134582131517, + "outputId": 1, + "inputModuleId": 1629089543055674, + "inputId": 1, + "color": "#52beff" + }, + { + "id": 1505608255661643, + "outputModuleId": 1629089543055674, + "outputId": 0, + "inputModuleId": 7411284708330475, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 3530680245499725, + "outputModuleId": 1629089543055674, + "outputId": 1, + "inputModuleId": 7411284708330475, + "inputId": 1, + "color": "#ffd452" + }, + { + "id": 723471606025095, + "outputModuleId": 7411284708330475, + "outputId": 0, + "inputModuleId": 8500492434533465, + "inputId": 0, + "color": "#52ff7d" + }, + { + "id": 2292539798376987, + "outputModuleId": 7411284708330475, + "outputId": 1, + "inputModuleId": 8500492434533465, + "inputId": 1, + "color": "#52ffbe" + }, + { + "id": 5272528188259111, + "outputModuleId": 8500492434533465, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 7210535933050930, + "outputModuleId": 8500492434533465, + "outputId": 1, + "inputModuleId": 1, + "inputId": 1, + "color": "#a8ff52" + }, + { + "id": 7908197179992133, + "outputModuleId": 3623085877119332, + "outputId": 0, + "inputModuleId": 1163775849135581, + "inputId": 0, + "color": "#a8ff52" + }, + { + "id": 8721889034446249, + "outputModuleId": 1163775849135581, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 2, + "color": "#67ff52" + }, + { + "id": 2789356792875946, + "outputModuleId": 1163775849135581, + "outputId": 1, + "inputModuleId": 2364063745493562, + "inputId": 3, + "color": "#52ff7d" + }, + { + "id": 8293492788993096, + "outputModuleId": 3623085877119332, + "outputId": 0, + "inputModuleId": 7579603213780856, + "inputId": 0, + "color": "#a8ff52" + }, + { + "id": 3137984831161391, + "outputModuleId": 7579603213780856, + "outputId": 0, + "inputModuleId": 3272418169313056, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 2993978308546393, + "outputModuleId": 7579603213780856, + "outputId": 1, + "inputModuleId": 3272418169313056, + "inputId": 1, + "color": "#6752ff" + }, + { + "id": 5085636319967600, + "outputModuleId": 3272418169313056, + "outputId": 0, + "inputModuleId": 2120522391757438, + "inputId": 0, + "color": "#ff52d4" + }, + { + "id": 4971591951242566, + "outputModuleId": 3272418169313056, + "outputId": 1, + "inputModuleId": 2120522391757438, + "inputId": 1, + "color": "#ff5293" + }, + { + "id": 8759272365135115, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 8078887273046425, + "inputId": 2, + "color": "#e8ff52" + }, + { + "id": 3599544925896906, + "outputModuleId": 8078887273046425, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 7, + "color": "#ff5252" + }, + { + "id": 750935108020452, + "outputModuleId": 1202888979525309, + "outputId": 1, + "inputModuleId": 7693134582131517, + "inputId": 5, + "color": "#e952ff" + }, + { + "id": 2926615471892406, + "outputModuleId": 1202888979525309, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 4, + "color": "#a852ff" + }, + { + "id": 7247307875742693, + "outputModuleId": 2120522391757438, + "outputId": 0, + "inputModuleId": 1202888979525309, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 1658873528417062, + "outputModuleId": 2120522391757438, + "outputId": 1, + "inputModuleId": 1202888979525309, + "inputId": 1, + "color": "#ffd452" + }, + { + "id": 6814850604612890, + "outputModuleId": 3623085877119332, + "outputId": 0, + "inputModuleId": 1202888979525309, + "inputId": 5, + "color": "#a8ff52" + }, + { + "id": 2745201661929078, + "outputModuleId": 3272418169313056, + "outputId": 2, + "inputModuleId": 2120522391757438, + "inputId": 2, + "color": "#e8ff52" + }, + { + "id": 2739608613257288, + "outputModuleId": 8078887273046425, + "outputId": 0, + "inputModuleId": 8500492434533465, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 1459684846251261, + "outputModuleId": 7545907193641280, + "outputId": 0, + "inputModuleId": 7354440315312540, + "inputId": 3, + "color": "#52ff7d" + }, + { + "id": 163404945941087, + "outputModuleId": 7545907193641280, + "outputId": 0, + "inputModuleId": 7614703401631065, + "inputId": 0, + "color": "#52ff7d" + }, + { + "id": 8864417258847625, + "outputModuleId": 1660124145346554, + "outputId": 0, + "inputModuleId": 7545907193641280, + "inputId": 2, + "color": "#a8ff52" + }, + { + "id": 2484026288669710, + "outputModuleId": 8631911439676095, + "outputId": 1, + "inputModuleId": 7693134582131517, + "inputId": 3, + "color": "#a852ff" + }, + { + "id": 6768411060010098, + "outputModuleId": 8631911439676095, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 2, + "color": "#6752ff" + }, + { + "id": 1066788645723652, + "outputModuleId": 7354440315312540, + "outputId": 0, + "inputModuleId": 8631911439676095, + "inputId": 0, + "color": "#67ff52" + }, + { + "id": 2180617489026327, + "outputModuleId": 7354440315312540, + "outputId": 1, + "inputModuleId": 8631911439676095, + "inputId": 1, + "color": "#52ff7d" + }, + { + "id": 3530286975247477, + "outputModuleId": 7649815730956881, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 6, + "color": "#a8ff52" + }, + { + "id": 8860630921626163, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 7649815730956881, + "inputId": 2, + "color": "#e8ff52" + }, + { + "id": 6602799437633275, + "outputModuleId": 3492788997026115, + "outputId": 2, + "inputModuleId": 8451952277485002, + "inputId": 2, + "color": "#67ff52" + }, + { + "id": 192850560558353, + "outputModuleId": 3492788997026115, + "outputId": 2, + "inputModuleId": 2528905409371299, + "inputId": 0, + "color": "#67ff52" + }, + { + "id": 1934828668532774, + "outputModuleId": 2528905409371299, + "outputId": 0, + "inputModuleId": 8858399717280256, + "inputId": 0, + "color": "#52ffbe" + }, + { + "id": 6464088990534542, + "outputModuleId": 7649815730956881, + "outputId": 0, + "inputModuleId": 1772638206753921, + "inputId": 2, + "color": "#a8ff52" + } + ] +} diff --git a/patches/welcome-wasm.vcv b/patches/welcome-wasm.vcv index 26438d29..4e6dc0d1 100644 --- a/patches/welcome-wasm.vcv +++ b/patches/welcome-wasm.vcv @@ -1,15 +1,11 @@ { "version": "2.1.2", "zoom": 1.0, - "gridOffset": [ - -2.0, - -0.078947365283966064 - ], "modules": [ { - "id": 3056105853448179, - "plugin": "JW-Modules", - "model": "GridSeq", + "id": 6532964214833122, + "plugin": "MindMeldModular", + "model": "PatchMaster", "version": "2.0", "params": [ { @@ -17,615 +13,1755 @@ "id": 0 }, { - "value": 0.0, + "value": 1.0, "id": 1 }, { - "value": 0.0, + "value": 0.6337316632270813, "id": 2 }, { - "value": 6.9614028930664062, + "value": 0.45300984382629395, "id": 3 }, { - "value": 1.702531099319458, + "value": 0.61325019598007202, "id": 4 }, { - "value": 5.3844399452209473, + "value": 0.75903826951980591, "id": 5 }, { - "value": 4.2987494468688965, + "value": 0.0, "id": 6 }, { - "value": 4.388275146484375, + "value": 0.0, "id": 7 - }, + } + ], + "leftModuleId": 1748021940156784, + "rightModuleId": 7545907193641280, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Chord Dist", + "Bass Top", + "Ringmod", + "Chord Dist", + "No name", + "No name", + "Chods", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 8, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2364063745493562, + "paramId": 2, + "rangeMax": 0.3600081205368042, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2364063745493562, + "paramId": 5, + "rangeMax": 0.49200648069381714, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 19, + 0 + ] + }, + { + "id": 1748021940156784, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ { - "value": 3.8028616905212402, - "id": 8 + "value": 0.0, + "id": 0 }, { - "value": 7.9583587646484375, - "id": 9 + "value": 1.0, + "id": 1 }, { - "value": 4.8640403747558594, - "id": 10 + "value": 1.0, + "id": 2 }, { - "value": 5.1489453315734863, - "id": 11 + "value": 0.45300984382629395, + "id": 3 }, { - "value": 1.265117883682251, - "id": 12 + "value": 0.90603351593017578, + "id": 4 }, { - "value": 9.5869827270507812, - "id": 13 + "value": 0.75903826951980591, + "id": 5 }, { - "value": 5.5940794944763184, - "id": 14 + "value": 0.0, + "id": 6 }, { - "value": 3.1475725173950195, - "id": 15 + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 359762865999381, + "rightModuleId": 6532964214833122, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Bass Top", + "Bass Top", + "Filer Cutoff", + "Chord Dist", + "No name", + "No name", + "Bass", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 10, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 29, + "rangeMax": 0.85500186681747437, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 1202888979525309, + "paramId": 9, + "rangeMax": 0.70200371742248535, + "rangeMin": 0.43799790740013123 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2120522391757438, + "paramId": 0, + "rangeMax": 0.7510036826133728, + "rangeMin": 0.2460002601146698 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 15, + 0 + ] + }, + { + "id": 359762865999381, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 }, { - "value": 3.6948256492614746, - "id": 16 + "value": 1.0, + "id": 1 }, { - "value": 8.8199691772460938, - "id": 17 + "value": 0.5807153582572937, + "id": 2 }, { - "value": 4.5301790237426758, - "id": 18 + "value": 0.45300984382629395, + "id": 3 }, { - "value": 0.0, - "id": 19 + "value": 0.31565791368484497, + "id": 4 }, { - "value": 0.0, - "id": 20 + "value": 0.75903826951980591, + "id": 5 }, { "value": 0.0, - "id": 21 + "id": 6 }, { "value": 0.0, - "id": 22 + "id": 7 + } + ], + "leftModuleId": 2859633263682263, + "rightModuleId": 1748021940156784, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Lead Dist", + "Bass Top", + "Dist Tone", + "Chord Dist", + "No name", + "No name", + "Lead", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 9, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 24, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 4, + "rangeMax": 0.44400703907012939, + "rangeMin": 0.0 + }, + { + "moduleId": 7354440315312540, + "paramId": 21, + "rangeMax": 0.67599606513977051, + "rangeMin": 0.75699460506439209 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 1, + "rangeMax": 0.39900767803192139, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 11, + 0 + ] + }, + { + "id": 3492788997026115, + "plugin": "ImpromptuModular", + "model": "Clocked", + "version": "2.0", + "params": [ + { + "value": 87.0, + "id": 0 }, { - "value": 0.0, - "id": 23 + "value": -9.0, + "id": 1 }, { - "value": 0.0, - "id": 24 + "value": 4.0, + "id": 2 }, { "value": 0.0, - "id": 25 + "id": 3 }, { "value": 0.0, - "id": 26 + "id": 4 }, { "value": 0.0, - "id": 27 + "id": 5 }, { "value": 0.0, - "id": 28 + "id": 6 }, { "value": 0.0, - "id": 29 + "id": 7 }, { - "value": 0.0, - "id": 30 + "value": 0.5, + "id": 8 }, { - "value": 0.0, - "id": 31 + "value": 0.5, + "id": 9 }, { - "value": 0.0, - "id": 32 + "value": 0.84217530488967896, + "id": 10 }, { - "value": 0.0, - "id": 33 + "value": 0.5, + "id": 11 }, { "value": 0.0, - "id": 34 + "id": 12 }, { "value": 0.0, - "id": 35 + "id": 13 }, { "value": 0.0, - "id": 36 + "id": 14 }, { - "value": 11.0, - "id": 37 + "value": 0.0, + "id": 15 }, { "value": 0.0, - "id": 38 + "id": 16 }, { "value": 0.0, - "id": 39 + "id": 17 }, { "value": 0.0, - "id": 40 + "id": 18 }, { "value": 0.0, - "id": 41 + "id": 19 + } + ], + "rightModuleId": 6206908039426907, + "data": { + "panelTheme": 1, + "panelContrast": 220.0, + "running": true, + "displayDelayNoteMode": true, + "bpmDetectionMode": false, + "resetOnStartStop": 0, + "ppqn": 4, + "resetClockOutputsHigh": false, + "momentaryRunInput": true, + "forceCvOnBpmOut": false, + "clockMaster": false + }, + "pos": [ + 28, + 2 + ] + }, + { + "id": 2528905409371299, + "plugin": "AudibleInstruments", + "model": "Branches", + "version": "2.0", + "params": [ + { + "value": 0.68915784358978271, + "id": 0 }, { - "value": 0.0, - "id": 42 + "value": 0.5, + "id": 1 }, { "value": 0.0, - "id": 43 + "id": 2 }, { "value": 0.0, - "id": 44 - }, + "id": 3 + } + ], + "leftModuleId": 3147629330555360, + "rightModuleId": 8858399717280256, + "data": { + "modes": [ + false, + false + ] + }, + "pos": [ + 77, + 2 + ] + }, + { + "id": 8858399717280256, + "plugin": "Bogaudio", + "model": "Bogaudio-SampleHold", + "version": "2.0", + "params": [ { - "value": 2.0, - "id": 45 + "value": 0.0, + "id": 0 }, { - "value": -1.0, - "id": 46 + "value": 0.0, + "id": 1 }, { - "value": 1.0, - "id": 47 + "value": 0.0, + "id": 2 }, { - "value": 1.0, - "id": 48 + "value": 0.0, + "id": 3 }, { - "value": 1.0, - "id": 49 + "value": 0.0, + "id": 4 }, { - "value": 1.0, - "id": 50 - }, - { - "value": 1.0, - "id": 51 - }, - { - "value": 1.0, - "id": 52 - }, - { - "value": 1.0, - "id": 53 - }, - { - "value": 1.0, - "id": 54 - }, - { - "value": 1.0, - "id": 55 - }, - { - "value": 1.0, - "id": 56 - }, + "value": 0.0, + "id": 5 + } + ], + "leftModuleId": 2528905409371299, + "rightModuleId": 1929072526365403, + "data": { + "poly_input": 0, + "noise_type": 0, + "range_offset": 1.0, + "range_scale": 5.0, + "smoothing_ms": 0.0 + }, + "pos": [ + 83, + 2 + ] + }, + { + "id": 5599750386095483, + "plugin": "Bogaudio", + "model": "Bogaudio-Offset", + "version": "2.0", + "params": [ { - "value": 1.0, - "id": 57 + "value": 0.0, + "id": 0 }, { - "value": 1.0, - "id": 58 - }, + "value": 0.10659158229827881, + "id": 1 + } + ], + "leftModuleId": 931699531175066, + "rightModuleId": 1660124145346554, + "data": { + "disableOutputLimit": false, + "offset_first": false + }, + "pos": [ + 92, + 2 + ] + }, + { + "id": 8451952277485002, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ { - "value": 1.0, - "id": 59 + "value": 0.065060213208198547, + "id": 0 }, { - "value": 1.0, - "id": 60 + "value": 0.0, + "id": 1 }, { - "value": 1.0, - "id": 61 + "value": 0.49092867970466614, + "id": 2 }, { - "value": 1.0, - "id": 62 + "value": 0.34457814693450928, + "id": 3 }, { "value": 0.0, - "id": 63 + "id": 4 } ], - "data": { - "running": true, - "ignoreGateOnPitchOut": false, - "gates": [ - 1, - 0, - 0, - 1, - 1, - 0, - 1, - 0, - 0, - 1, - 0, - 0, - 1, - 1, - 1, - 0 - ], - "gateMode": 0, - "randomMode": 0 - }, + "leftModuleId": 7614703401631065, + "rightModuleId": 7354440315312540, + "data": {}, "pos": [ - 11, + 38, 0 ] }, { - "id": 8226081794468965, - "plugin": "JW-Modules", - "model": "GridSeq", + "id": 7649815730956881, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", "version": "2.0", "params": [ { - "value": 0.0, + "value": 0.46746960282325745, "id": 0 }, { - "value": 0.0, + "value": 0.26987949013710022, "id": 1 }, { - "value": 0.0, + "value": 0.43912151455879211, "id": 2 }, { - "value": 2.4226007461547852, + "value": 0.34457814693450928, "id": 3 }, { - "value": 4.1613302230834961, + "value": 0.0, "id": 4 - }, - { - "value": 6.0629558563232422, - "id": 5 - }, + } + ], + "leftModuleId": 1163775849135581, + "rightModuleId": 2364063745493562, + "data": {}, + "pos": [ + 16, + 1 + ] + }, + { + "id": 8078887273046425, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ { - "value": 4.2443413734436035, - "id": 6 + "value": 0.38072267174720764, + "id": 0 }, { - "value": 0.48779934644699097, - "id": 7 + "value": 0.15421679615974426, + "id": 1 }, { - "value": 8.9526882171630859, - "id": 8 + "value": 0.51261603832244873, + "id": 2 }, { - "value": 0.25175490975379944, - "id": 9 + "value": 0.34457814693450928, + "id": 3 }, { - "value": 2.360055685043335, - "id": 10 - }, + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 1232093242356119, + "rightModuleId": 7693134582131517, + "data": {}, + "pos": [ + 58, + 1 + ] + }, + { + "id": 1232093242356119, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ { - "value": 3.1495692729949951, - "id": 11 + "value": 0.43012022972106934, + "id": 0 }, { - "value": 3.4717011451721191, - "id": 12 + "value": -0.46987923979759216, + "id": 1 }, { - "value": 5.4548091888427734, - "id": 13 + "value": 0.50538665056228638, + "id": 2 }, { - "value": 5.216486930847168, - "id": 14 + "value": 0.34457814693450928, + "id": 3 }, { - "value": 8.6701240539550781, - "id": 15 - }, + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 1772638206753921, + "rightModuleId": 8078887273046425, + "data": {}, + "pos": [ + 55, + 1 + ] + }, + { + "id": 1929072526365403, + "plugin": "Bogaudio", + "model": "Bogaudio-DGate", + "version": "2.0", + "params": [ { - "value": 0.87081128358840942, - "id": 16 + "value": 0.0, + "id": 0 }, { - "value": 1.0363615751266479, - "id": 17 + "value": 1.0, + "id": 1 }, { - "value": 6.2397761344909668, - "id": 18 + "value": 1.0, + "id": 2 }, { "value": 0.0, - "id": 19 - }, + "id": 3 + } + ], + "leftModuleId": 8858399717280256, + "rightModuleId": 931699531175066, + "data": { + "triggerOnLoad": true, + "shouldTriggerOnLoad": true + }, + "pos": [ + 86, + 2 + ] + }, + { + "id": 931699531175066, + "plugin": "Bogaudio", + "model": "Bogaudio-PolyMult", + "version": "2.0", + "params": [ { - "value": 0.0, - "id": 20 - }, + "value": 3.0, + "id": 0 + } + ], + "leftModuleId": 1929072526365403, + "rightModuleId": 5599750386095483, + "data": {}, + "pos": [ + 89, + 2 + ] + }, + { + "id": 6206908039426907, + "plugin": "Bogaudio", + "model": "Bogaudio-AddrSeq", + "version": "2.0", + "params": [ { - "value": 0.0, - "id": 21 + "value": 4.1457595825195312, + "id": 0 }, { - "value": 0.0, - "id": 22 + "value": 1.0, + "id": 1 }, { "value": 0.0, - "id": 23 + "id": 2 }, { - "value": 0.0, - "id": 24 + "value": 0.22168663144111633, + "id": 3 }, { "value": 0.0, - "id": 25 + "id": 4 }, { - "value": 0.0, - "id": 26 + "value": 0.1012047752737999, + "id": 5 }, { - "value": 0.0, - "id": 27 + "value": 0.13975897431373596, + "id": 6 }, { "value": 0.0, - "id": 28 + "id": 7 }, { "value": 0.0, - "id": 29 + "id": 8 }, { "value": 0.0, - "id": 30 + "id": 9 }, { "value": 0.0, - "id": 31 - }, + "id": 10 + } + ], + "leftModuleId": 3492788997026115, + "rightModuleId": 3623085877119332, + "data": { + "poly_input": 0, + "select_on_clock": false, + "triggered_select": false, + "reverse_on_negative_clock": false, + "wrap_select_at_steps": false, + "range_offset": 0.0, + "range_scale": 1.0 + }, + "pos": [ + 48, + 2 + ] + }, + { + "id": 3623085877119332, + "plugin": "ImpromptuModular", + "model": "Chord-Key", + "version": "2.0", + "params": [ { "value": 0.0, - "id": 32 + "id": 0 }, { "value": 0.0, - "id": 33 + "id": 1 }, { "value": 0.0, - "id": 34 + "id": 2 }, { "value": 0.0, - "id": 35 + "id": 3 }, { "value": 0.0, - "id": 36 - }, - { - "value": 11.0, - "id": 37 + "id": 4 }, { "value": 0.0, - "id": 38 + "id": 5 }, { "value": 0.0, - "id": 39 + "id": 6 }, { "value": 0.0, - "id": 40 + "id": 7 }, { "value": 0.0, - "id": 41 + "id": 8 }, { "value": 0.0, - "id": 42 + "id": 9 }, { "value": 0.0, - "id": 43 + "id": 10 }, { "value": 0.0, - "id": 44 - }, - { - "value": 2.0, - "id": 45 - }, - { - "value": -1.0, - "id": 46 - }, - { - "value": 1.0, - "id": 47 - }, - { - "value": 1.0, - "id": 48 - }, - { - "value": 1.0, - "id": 49 - }, - { - "value": 1.0, - "id": 50 - }, - { - "value": 1.0, - "id": 51 - }, - { - "value": 1.0, - "id": 52 - }, - { - "value": 1.0, - "id": 53 - }, - { - "value": 1.0, - "id": 54 - }, - { - "value": 1.0, - "id": 55 - }, - { - "value": 1.0, - "id": 56 - }, - { - "value": 1.0, - "id": 57 - }, - { - "value": 1.0, - "id": 58 - }, - { - "value": 1.0, - "id": 59 - }, - { - "value": 1.0, - "id": 60 - }, - { - "value": 1.0, - "id": 61 - }, - { - "value": 1.0, - "id": 62 - }, - { - "value": 0.0, - "id": 63 + "id": 11 } ], + "leftModuleId": 6206908039426907, + "rightModuleId": 3147629330555360, "data": { - "running": true, - "ignoreGateOnPitchOut": false, - "gates": [ - 1, + "panelTheme": 1, + "panelContrast": 220.0, + "octs": [ + 3, + 3, + 4, + -1, + 3, + 3, + 4, + -1, + 3, + 4, + 4, + -1, + 3, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1, + 4, + 4, + 4, + -1 + ], + "keys": [ + 7, + 10, + 2, 0, 0, + 3, + 7, 0, + 2, + 5, + 9, 0, - 1, - 1, - 1, - 1, + 10, + 2, + 5, 0, - 1, 0, + 4, + 7, 0, - 1, - 1, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, + 0, + 0, + 4, + 7, 0 ], - "gateMode": 0, - "randomMode": 0 + "mergeOutputs": 0, + "keypressEmitGate": 1, + "autostepPaste": 0 }, "pos": [ - 11, - 1 + 54, + 2 ] }, { - "id": 8508123945855866, - "plugin": "AudibleInstruments", - "model": "Plaits", + "id": 7579603213780856, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCSine", "version": "2.0", "params": [ { - "value": 0.0, + "value": -1.0, "id": 0 }, { - "value": 0.0, + "value": 0.004999999888241291, "id": 1 }, { - "value": 0.0, + "value": 0.62857121229171753, "id": 2 }, { - "value": 0.5, + "value": 0.99500000476837158, "id": 3 }, { - "value": 0.5, + "value": 0.0, "id": 4 }, { - "value": 0.5, + "value": 1.0, "id": 5 }, { - "value": 0.0, + "value": 0.10000000149011612, "id": 6 }, { - "value": 0.0, + "value": 0.004999999888241291, "id": 7 }, { @@ -633,579 +1769,4604 @@ "id": 8 }, { - "value": 0.5, + "value": 0.0, "id": 9 }, { - "value": 0.5, + "value": 0.0, "id": 10 - } - ], - "data": { - "lowCpu": false, - "model": 0 - }, - "pos": [ - 32, - 0 - ] - }, - { - "id": 7968649719176584, - "plugin": "AudibleInstruments", - "model": "Plaits", - "version": "2.0", - "params": [ + }, { "value": 0.0, - "id": 0 + "id": 11 }, { "value": 0.0, - "id": 1 + "id": 12 }, { "value": 0.0, - "id": 2 + "id": 13 }, { - "value": 0.5, - "id": 3 + "value": 0.0, + "id": 14 }, { - "value": 0.35903587937355042, - "id": 4 + "value": 0.0, + "id": 15 }, { "value": 0.0, - "id": 5 + "id": 16 }, { - "value": 0.59199827909469604, - "id": 6 + "value": 0.0, + "id": 17 }, { "value": 0.0, - "id": 7 + "id": 18 }, { - "value": 0.66399794816970825, - "id": 8 + "value": 0.0, + "id": 19 }, { - "value": 0.5, - "id": 9 + "value": 0.0, + "id": 20 }, { - "value": 0.50722956657409668, - "id": 10 - } - ], - "data": { - "lowCpu": false, - "model": 0 - }, - "pos": [ - 32, - 1 - ] - }, - { - "id": 2222764725422974, - "plugin": "Valley", - "model": "Plateau", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 + "value": 0.0, + "id": 21 }, { - "value": 0.10649359971284866, - "id": 1 + "value": 0.0, + "id": 22 }, { "value": 0.0, - "id": 2 + "id": 23 }, { - "value": 10.0, - "id": 3 + "value": 0.0, + "id": 24 }, { - "value": 10.0, - "id": 4 + "value": 0.0, + "id": 25 }, { - "value": 0.5, - "id": 5 + "value": 0.0, + "id": 26 }, { - "value": 10.0, - "id": 6 + "value": 0.0, + "id": 27 }, { - "value": 0.5499500036239624, - "id": 7 + "value": 0.0, + "id": 28 }, { - "value": 10.0, - "id": 8 + "value": 0.0, + "id": 29 }, { - "value": 10.0, - "id": 9 + "value": 0.0, + "id": 30 }, { "value": 0.0, - "id": 10 + "id": 31 }, { - "value": 0.5, - "id": 11 + "value": 0.0, + "id": 32 }, { - "value": 0.5, - "id": 12 + "value": 0.0, + "id": 33 }, { "value": 0.0, - "id": 13 + "id": 34 }, { "value": 0.0, - "id": 14 + "id": 35 }, { "value": 0.0, - "id": 15 + "id": 36 }, { "value": 0.0, - "id": 16 + "id": 37 }, { "value": 0.0, - "id": 17 + "id": 38 }, { "value": 0.0, - "id": 18 + "id": 39 }, { "value": 0.0, - "id": 19 + "id": 40 }, { "value": 0.0, - "id": 20 + "id": 41 }, { "value": 0.0, - "id": 21 + "id": 42 }, { "value": 0.0, - "id": 22 - }, - { - "value": 0.0, - "id": 23 + "id": 43 }, { "value": 0.0, - "id": 24 + "id": 44 }, { "value": 0.0, - "id": 25 + "id": 45 }, { "value": 0.0, - "id": 26 + "id": 46 }, { "value": 0.0, - "id": 27 + "id": 47 }, { - "value": 0.0, - "id": 28 + "value": 1.0, + "id": 48 }, { "value": 0.0, - "id": 29 + "id": 49 }, { "value": 1.0, - "id": 30 + "id": 50 } ], + "leftModuleId": 3538881790933672, + "rightModuleId": 3272418169313056, "data": { - "frozen": false, - "freezeToggle": false, - "panelStyle": 0, - "tuned": 0, - "diffuseInput": 1, - "preDelayCVSens": 0, - "inputSensitivity": 0, - "outputSaturation": 0, - "dspMode": 1140097024 + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } }, "pos": [ - 45, + 66, 0 ] }, { - "id": 7292693033358561, - "plugin": "rackwindows", - "model": "mv", + "id": 3272418169313056, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXTreeMonster", "version": "2.0", "params": [ { - "value": 0.75568318367004395, + "value": 0.75, "id": 0 }, { - "value": 0.87236917018890381, + "value": 0.5, "id": 1 }, { - "value": 0.81842118501663208, + "value": 0.0, "id": 2 }, { - "value": 0.50658416748046875, + "value": 1.0, "id": 3 }, { - "value": 0.0, + "value": 0.40000000596046448, "id": 4 }, { - "value": 0.0, + "value": 0.24543231725692749, "id": 5 }, { - "value": 0.0, + "value": 0.20671668648719788, "id": 6 }, { - "value": 0.0, + "value": 1.0, "id": 7 - } - ], - "pos": [ - 46, - 1 - ] - }, - { - "id": 6271512627190487, - "plugin": "Bogaudio", - "model": "Bogaudio-LFO", - "version": "2.0", - "params": [ + }, { "value": 0.0, - "id": 0 + "id": 8 }, { - "value": 1.0, - "id": 1 + "value": 0.0, + "id": 9 }, { "value": 0.0, - "id": 2 + "id": 10 }, { "value": 0.0, - "id": 3 + "id": 11 }, { "value": 0.0, - "id": 4 + "id": 12 }, { - "value": 1.0, - "id": 5 + "value": 0.0, + "id": 13 }, { "value": 0.0, - "id": 6 - } - ], - "data": { - "offset_cv_to_smoothing": false - }, - "pos": [ - 0, - 1 - ] - }, - { - "id": 8615243856518388, - "plugin": "ZZC", - "model": "Clock", - "version": "2.0", - "params": [ + "id": 14 + }, { - "value": 120.0, - "id": 0 + "value": 0.0, + "id": 15 }, { - "value": 50.0, - "id": 1 + "value": 0.0, + "id": 16 }, { - "value": 50.0, - "id": 2 + "value": 0.0, + "id": 17 }, { "value": 0.0, - "id": 3 + "id": 18 }, { "value": 0.0, - "id": 4 + "id": 19 }, { "value": 0.0, - "id": 5 + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 }, { "value": 1.0, - "id": 6 + "id": 60 + }, + { + "value": 1.0, + "id": 61 } ], + "leftModuleId": 7579603213780856, + "rightModuleId": 2120522391757438, "data": { - "running": 1, - "reverse": 0, - "baseClockGateMode": false, - "x2ClockGateMode": false, - "x4ClockGateMode": false, - "resetOnStart": false, - "resetOnStop": false, - "runInputIsGate": false, - "runOutputIsGate": false, - "phaseOutputOffset": 0.0, - "useCompatibleBPMCV": true, - "snapCV": false, - "externalClockPPQN": 1 + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": true + } }, "pos": [ - 0, + 78, 0 ] }, { - "id": 1, - "plugin": "Cardinal", - "model": "HostAudio2", + "id": 2120522391757438, + "plugin": "SurgeXTRack", + "model": "SurgeXTVCF", "version": "2.0", "params": [ { - "value": 1.0, + "value": 3.0355033874511719, "id": 0 - } - ], - "data": { - "dcFilter": true + }, + { + "value": 0.82925224304199219, + "id": 1 + }, + { + "value": 2.0, + "id": 2 + }, + { + "value": 1.0, + "id": 3 + }, + { + "value": 1.5194351673126221, + "id": 4 + }, + { + "value": 1.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 28.0, + "id": 25 + }, + { + "value": 3.0, + "id": 26 + } + ], + "leftModuleId": 3272418169313056, + "rightModuleId": 1202888979525309, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 90, + 0 + ] + }, + { + "id": 1202888979525309, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXDistortion", + "version": "2.0", + "params": [ + { + "value": 0.63885778188705444, + "id": 0 + }, + { + "value": 0.48576384782791138, + "id": 1 + }, + { + "value": 0.38892880082130432, + "id": 2 + }, + { + "value": 0.53337103128433228, + "id": 3 + }, + { + "value": 0.87157571315765381, + "id": 4 + }, + { + "value": 0.84071719646453857, + "id": 5 + }, + { + "value": 0.56428641080856323, + "id": 6 + }, + { + "value": 0.25704637169837952, + "id": 7 + }, + { + "value": 0.40625, + "id": 8 + }, + { + "value": 0.70200371742248535, + "id": 9 + }, + { + "value": 0.5, + "id": 10 + }, + { + "value": 0.14642857015132904, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 1.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 1.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + }, + { + "value": 0.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 + } + ], + "leftModuleId": 2120522391757438, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": false + } + }, + "pos": [ + 102, + 0 + ] + }, + { + "id": 1163775849135581, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCClassic", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.25957661867141724, + "id": 1 + }, + { + "value": 0.52571725845336914, + "id": 2 + }, + { + "value": 0.62986081838607788, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.10000000149011612, + "id": 6 + }, + { + "value": 0.004999999888241291, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "rightModuleId": 7649815730956881, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 4, + 1 + ] + }, + { + "id": 3147629330555360, + "plugin": "GrandeModular", + "model": "Merge8", + "version": "2.0", + "params": [], + "leftModuleId": 3623085877119332, + "rightModuleId": 2528905409371299, + "data": { + "channels_merge": -1 + }, + "pos": [ + 75, + 2 + ] + }, + { + "id": 1660124145346554, + "plugin": "ML_modules", + "model": "Quantum", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + } + ], + "leftModuleId": 5599750386095483, + "data": { + "scale": [ + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0 + ], + "mode": 1, + "transpose_select": 1, + "toggle_mode": 1 + }, + "pos": [ + 95, + 2 + ] + }, + { + "id": 7545907193641280, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.17526623606681824, + "id": 0 + }, + { + "value": -0.33734920620918274, + "id": 1 + }, + { + "value": 0.17285659909248352, + "id": 2 + }, + { + "value": -0.41927692294120789, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 6532964214833122, + "rightModuleId": 7614703401631065, + "data": {}, + "pos": [ + 23, + 0 + ] + }, + { + "id": 7614703401631065, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCTwist", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.004999999888241291, + "id": 1 + }, + { + "value": 0.5, + "id": 2 + }, + { + "value": 0.18885940313339233, + "id": 3 + }, + { + "value": 0.68385952711105347, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.91899901628494263, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "leftModuleId": 7545907193641280, + "rightModuleId": 8451952277485002, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 26, + 0 + ] + }, + { + "id": 7354440315312540, + "plugin": "SurgeXTRack", + "model": "SurgeXTVCF", + "version": "2.0", + "params": [ + { + "value": 0.23143219947814941, + "id": 0 + }, + { + "value": 0.53199803829193115, + "id": 1 + }, + { + "value": 1.9437248706817627, + "id": 2 + }, + { + "value": 1.0, + "id": 3 + }, + { + "value": 0.50480771064758301, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 1.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.41991496086120605, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 16.0, + "id": 25 + }, + { + "value": 3.0, + "id": 26 + } + ], + "leftModuleId": 8451952277485002, + "rightModuleId": 8631911439676095, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 41, + 0 + ] + }, + { + "id": 8631911439676095, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXExciter", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.12594993412494659, + "id": 1 + }, + { + "value": 0.49999994039535522, + "id": 2 + }, + { + "value": 0.49999994039535522, + "id": 3 + }, + { + "value": 0.25784170627593994, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + } + ], + "leftModuleId": 7354440315312540, + "rightModuleId": 3538881790933672, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": false + } + }, + "pos": [ + 53, + 0 + ] + }, + { + "id": 6408811696897743, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCModern", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.62471598386764526, + "id": 2 + }, + { + "value": 0.60414427518844604, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.094571217894554138, + "id": 6 + }, + { + "value": 0.13726678490638733, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "rightModuleId": 977849113384714, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 9, + 2 + ] + }, + { + "id": 977849113384714, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 6408811696897743, + "rightModuleId": 1132602188892100, + "pos": [ + 21, + 2 + ] + }, + { + "id": 1132602188892100, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 977849113384714, + "pos": [ + 24, + 2 + ] + }, + { + "id": 2364063745493562, + "plugin": "SurgeXTRack", + "model": "SurgeXTMixer", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.22814854979515076, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.30172306299209595, + "id": 5 + }, + { + "value": 0.37028577923774719, + "id": 6 + }, + { + "value": 1.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 1.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.88200151920318604, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 1.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.2260001003742218, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.67200368642807007, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + } + ], + "leftModuleId": 7649815730956881, + "rightModuleId": 8524145861178282, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "vuChannel": 0 + } + }, + "pos": [ + 19, + 1 + ] + }, + { + "id": 8524145861178282, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXChorus", + "version": "2.0", + "params": [ + { + "value": 0.1591431051492691, + "id": 0 + }, + { + "value": 0.6618039608001709, + "id": 1 + }, + { + "value": 0.41764268279075623, + "id": 2 + }, + { + "value": 0.26871439814567566, + "id": 3 + }, + { + "value": 0.27980762720108032, + "id": 4 + }, + { + "value": 0.96663463115692139, + "id": 5 + }, + { + "value": 0.42299914360046387, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + }, + { + "value": 1.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 + } + ], + "leftModuleId": 2364063745493562, + "rightModuleId": 1772638206753921, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init (Dry)", + "presetIsDirty": true, + "clockStyle": 0, + "polyphonicMode": false + } + }, + "pos": [ + 31, + 1 + ] + }, + { + "id": 1772638206753921, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": 7.0902948379516602, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.46771752834320068, + "id": 2 + }, + { + "value": -23.228555679321289, + "id": 3 + }, + { + "value": 34.732803344726562, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.094000227749347687, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 41.0, + "id": 25 + }, + { + "value": 1.0, + "id": 26 + }, + { + "value": 1.0, + "id": 27 + } + ], + "leftModuleId": 8524145861178282, + "rightModuleId": 1232093242356119, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 43, + 1 + ] + }, + { + "id": 7693134582131517, + "plugin": "SurgeXTRack", + "model": "SurgeXTMixer", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.0025714286603033543, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.55385059118270874, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.75699687004089355, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 1.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 1.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.8123, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.71000373363494873, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + } + ], + "leftModuleId": 8078887273046425, + "rightModuleId": 1629089543055674, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "vuChannel": 0 + } + }, + "pos": [ + 61, + 1 + ] + }, + { + "id": 1629089543055674, + "plugin": "SurgeXTRack", + "model": "SurgeXTDelay", + "version": "2.0", + "params": [ + { + "value": -2.0501079559326172, + "id": 0 + }, + { + "value": -1.4222614765167236, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.41385790705680847, + "id": 3 + }, + { + "value": 0.30214270949363708, + "id": 4 + }, + { + "value": -18.046905517578125, + "id": 5 + }, + { + "value": 70.0, + "id": 6 + }, + { + "value": 2.0, + "id": 7 + }, + { + "value": 0.2314288467168808, + "id": 8 + }, + { + "value": 0.26585954427719116, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + } + ], + "leftModuleId": 7693134582131517, + "rightModuleId": 7411284708330475, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "clockStyle": 0 + } + }, + "pos": [ + 73, + 1 + ] + }, + { + "id": 7411284708330475, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXReverb2", + "version": "2.0", + "params": [ + { + "value": 0.31384137272834778, + "id": 0 + }, + { + "value": 0.68128818273544312, + "id": 1 + }, + { + "value": 0.75457382202148438, + "id": 2 + }, + { + "value": 0.59514415264129639, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.63371568918228149, + "id": 5 + }, + { + "value": 0.5, + "id": 6 + }, + { + "value": 0.5, + "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.39957103133201599, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 + }, + { + "value": 0.0, + "id": 52 + }, + { + "value": 0.0, + "id": 53 + }, + { + "value": 0.0, + "id": 54 + }, + { + "value": 0.0, + "id": 55 + }, + { + "value": 0.0, + "id": 56 + }, + { + "value": 0.0, + "id": 57 + }, + { + "value": 0.0, + "id": 58 + }, + { + "value": 0.0, + "id": 59 + } + ], + "leftModuleId": 1629089543055674, + "rightModuleId": 8500492434533465, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init (Dry)", + "presetIsDirty": true, + "polyphonicMode": false + } + }, + "pos": [ + 85, + 1 + ] + }, + { + "id": 8500492434533465, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": 13.206838607788086, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 1.0, + "id": 2 + }, + { + "value": -60.0, + "id": 3 + }, + { + "value": 70.0, + "id": 4 + }, + { + "value": -0.12199990451335907, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 1.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + } + ], + "leftModuleId": 7411284708330475, + "rightModuleId": 1, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 97, + 1 + ] + }, + { + "id": 2859633263682263, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.51688289642333984, + "id": 3 + }, + { + "value": 0.21083655953407288, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "rightModuleId": 359762865999381, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 180, + 180, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Reset", + "Run", + "Lead Dist", + "Bass Top", + "Dist Tone", + "Chord Dist", + "No name", + "No name", + "Control", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 3492788997026115, + "paramId": 12, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 0, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 7, + 0 + ] + }, + { + "id": 3538881790933672, + "plugin": "MindMeldModular", + "model": "PatchMasterBlank", + "version": "2.0", + "params": [], + "leftModuleId": 8631911439676095, + "rightModuleId": 7579603213780856, + "data": { + "facePlate": 0 }, "pos": [ - 58, + 65, 0 ] }, { - "id": 8823371391903591, + "id": 1, "plugin": "Cardinal", "model": "HostAudio2", "version": "2.0", "params": [ { - "value": 1.0, + "value": 1.1885021924972534, "id": 0 } ], + "leftModuleId": 8500492434533465, "data": { "dcFilter": true }, "pos": [ - 58, + 109, 1 ] } ], "cables": [ { - "id": 5256747357000261, - "outputModuleId": 2222764725422974, + "id": 2270741436436214, + "outputModuleId": 3492788997026115, + "outputId": 4, + "inputModuleId": 6206908039426907, + "inputId": 1, + "color": "#a852ff" + }, + { + "id": 2097699839995605, + "outputModuleId": 3492788997026115, "outputId": 1, - "inputModuleId": 1, + "inputModuleId": 6206908039426907, "inputId": 0, - "color": "#52beff" + "color": "#e952ff" }, { - "id": 8897922774860438, - "outputModuleId": 2222764725422974, + "id": 6079412029041749, + "outputModuleId": 3623085877119332, "outputId": 0, - "inputModuleId": 1, + "inputModuleId": 3147629330555360, + "inputId": 0, + "color": "#ff52d4" + }, + { + "id": 2696582111282382, + "outputModuleId": 3623085877119332, + "outputId": 1, + "inputModuleId": 3147629330555360, "inputId": 1, - "color": "#52beff" + "color": "#ff5293" }, { - "id": 3747720534742971, - "outputModuleId": 8508123945855866, + "id": 5161684793713160, + "outputModuleId": 3623085877119332, + "outputId": 2, + "inputModuleId": 3147629330555360, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 1131487853388165, + "outputModuleId": 3147629330555360, "outputId": 0, - "inputModuleId": 2222764725422974, + "inputModuleId": 6408811696897743, "inputId": 0, - "color": "#52beff" + "color": "#ffd452" + }, + { + "id": 2067186493700170, + "outputModuleId": 6206908039426907, + "outputId": 0, + "inputModuleId": 3623085877119332, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 1423211978847534, + "outputModuleId": 6408811696897743, + "outputId": 0, + "inputModuleId": 1132602188892100, + "inputId": 0, + "color": "#6752ff" }, { - "id": 6982301964263462, - "outputModuleId": 3056105853448179, + "id": 5494619626061851, + "outputModuleId": 6408811696897743, "outputId": 1, - "inputModuleId": 8508123945855866, - "inputId": 7, - "color": "#ff5252" + "inputModuleId": 977849113384714, + "inputId": 0, + "color": "#e952ff" }, { - "id": 1401313906365255, - "outputModuleId": 3056105853448179, + "id": 4950214390198147, + "outputModuleId": 1132602188892100, "outputId": 0, - "inputModuleId": 8508123945855866, - "inputId": 5, - "color": "#ff5252" + "inputModuleId": 2364063745493562, + "inputId": 0, + "color": "#ff52d4" + }, + { + "id": 7274650136027879, + "outputModuleId": 977849113384714, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 1, + "color": "#ff5293" }, { - "id": 6460111621879423, - "outputModuleId": 7968649719176584, + "id": 7057149860399312, + "outputModuleId": 1772638206753921, "outputId": 0, - "inputModuleId": 7292693033358561, + "inputModuleId": 2364063745493562, "inputId": 4, - "color": "#527dff" + "color": "#ffd452" + }, + { + "id": 3994158684795789, + "outputModuleId": 1772638206753921, + "outputId": 1, + "inputModuleId": 2364063745493562, + "inputId": 5, + "color": "#e8ff52" }, { - "id": 3841941645043202, - "outputModuleId": 7292693033358561, + "id": 3699248077047949, + "outputModuleId": 2364063745493562, "outputId": 0, - "inputModuleId": 8823371391903591, + "inputModuleId": 7693134582131517, "inputId": 0, "color": "#527dff" }, { - "id": 8675002981215611, - "outputModuleId": 7292693033358561, + "id": 3975712550017439, + "outputModuleId": 2364063745493562, + "outputId": 1, + "inputModuleId": 7693134582131517, + "inputId": 1, + "color": "#6752ff" + }, + { + "id": 5300960027149656, + "outputModuleId": 931699531175066, + "outputId": 0, + "inputModuleId": 1660124145346554, + "inputId": 3, + "color": "#e952ff" + }, + { + "id": 900918383140940, + "outputModuleId": 3147629330555360, + "outputId": 0, + "inputModuleId": 1660124145346554, + "inputId": 2, + "color": "#ff52d4" + }, + { + "id": 6532209984750418, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 1929072526365403, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 6564485122333790, + "outputModuleId": 1929072526365403, + "outputId": 0, + "inputModuleId": 931699531175066, + "inputId": 1, + "color": "#ffd452" + }, + { + "id": 2253867120168600, + "outputModuleId": 5599750386095483, + "outputId": 0, + "inputModuleId": 1660124145346554, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 4218135157649869, + "outputModuleId": 8858399717280256, + "outputId": 0, + "inputModuleId": 5599750386095483, + "inputId": 2, + "color": "#a8ff52" + }, + { + "id": 2550860768686067, + "outputModuleId": 7614703401631065, "outputId": 1, - "inputModuleId": 8823371391903591, + "inputModuleId": 7354440315312540, "inputId": 1, + "color": "#52beff" + }, + { + "id": 4865743156594477, + "outputModuleId": 7614703401631065, + "outputId": 0, + "inputModuleId": 7354440315312540, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 6208990526502806, + "outputModuleId": 8451952277485002, + "outputId": 0, + "inputModuleId": 7354440315312540, + "inputId": 2, "color": "#527dff" }, { - "id": 6764849616399273, - "outputModuleId": 8226081794468965, + "id": 3879998451215591, + "outputModuleId": 3492788997026115, "outputId": 1, - "inputModuleId": 7968649719176584, - "inputId": 7, + "inputModuleId": 1232093242356119, + "inputId": 2, + "color": "#e8ff52" + }, + { + "id": 6677050153459000, + "outputModuleId": 1232093242356119, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 6, + "color": "#ff52d4" + }, + { + "id": 3180361347060172, + "outputModuleId": 2364063745493562, + "outputId": 0, + "inputModuleId": 8524145861178282, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 402678970644369, + "outputModuleId": 2364063745493562, + "outputId": 1, + "inputModuleId": 8524145861178282, + "inputId": 1, "color": "#ff9352" }, { - "id": 4925869863866398, - "outputModuleId": 8226081794468965, + "id": 5399015047720053, + "outputModuleId": 8524145861178282, "outputId": 0, - "inputModuleId": 7968649719176584, - "inputId": 5, + "inputModuleId": 1772638206753921, + "inputId": 0, + "color": "#ff5293" + }, + { + "id": 6958403219190982, + "outputModuleId": 8524145861178282, + "outputId": 1, + "inputModuleId": 1772638206753921, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 8324132731591866, + "outputModuleId": 7693134582131517, + "outputId": 0, + "inputModuleId": 1629089543055674, + "inputId": 0, + "color": "#52ffff" + }, + { + "id": 7409295800152681, + "outputModuleId": 7693134582131517, + "outputId": 1, + "inputModuleId": 1629089543055674, + "inputId": 1, + "color": "#52beff" + }, + { + "id": 1505608255661643, + "outputModuleId": 1629089543055674, + "outputId": 0, + "inputModuleId": 7411284708330475, + "inputId": 0, "color": "#ff9352" }, { - "id": 8437293765463613, - "outputModuleId": 6271512627190487, - "outputId": 4, - "inputModuleId": 7968649719176584, + "id": 3530680245499725, + "outputModuleId": 1629089543055674, + "outputId": 1, + "inputModuleId": 7411284708330475, "inputId": 1, - "color": "#67ff52" + "color": "#ffd452" + }, + { + "id": 723471606025095, + "outputModuleId": 7411284708330475, + "outputId": 0, + "inputModuleId": 8500492434533465, + "inputId": 0, + "color": "#52ff7d" }, { - "id": 3320530906916692, - "outputModuleId": 7968649719176584, + "id": 2292539798376987, + "outputModuleId": 7411284708330475, "outputId": 1, - "inputModuleId": 7292693033358561, - "inputId": 5, - "color": "#527dff" + "inputModuleId": 8500492434533465, + "inputId": 1, + "color": "#52ffbe" }, { - "id": 6354035082244830, - "outputModuleId": 8615243856518388, - "outputId": 7, - "inputModuleId": 8226081794468965, - "inputId": 2, + "id": 5272528188259111, + "outputModuleId": 8500492434533465, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 7210535933050930, + "outputModuleId": 8500492434533465, + "outputId": 1, + "inputModuleId": 1, + "inputId": 1, + "color": "#a8ff52" + }, + { + "id": 7908197179992133, + "outputModuleId": 3623085877119332, + "outputId": 0, + "inputModuleId": 1163775849135581, + "inputId": 0, "color": "#a8ff52" }, { - "id": 1376715750370954, - "outputModuleId": 8615243856518388, - "outputId": 7, - "inputModuleId": 3056105853448179, + "id": 8721889034446249, + "outputModuleId": 1163775849135581, + "outputId": 0, + "inputModuleId": 2364063745493562, "inputId": 2, - "color": "#e8ff52" + "color": "#67ff52" + }, + { + "id": 2789356792875946, + "outputModuleId": 1163775849135581, + "outputId": 1, + "inputModuleId": 2364063745493562, + "inputId": 3, + "color": "#52ff7d" }, { - "id": 3759968541154564, - "outputModuleId": 8615243856518388, + "id": 8293492788993096, + "outputModuleId": 3623085877119332, "outputId": 0, - "inputModuleId": 8226081794468965, - "inputId": 9, + "inputModuleId": 7579603213780856, + "inputId": 0, "color": "#a8ff52" }, { - "id": 4875056227962635, - "outputModuleId": 8615243856518388, + "id": 3137984831161391, + "outputModuleId": 7579603213780856, + "outputId": 0, + "inputModuleId": 3272418169313056, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 2993978308546393, + "outputModuleId": 7579603213780856, + "outputId": 1, + "inputModuleId": 3272418169313056, + "inputId": 1, + "color": "#6752ff" + }, + { + "id": 5085636319967600, + "outputModuleId": 3272418169313056, "outputId": 0, - "inputModuleId": 3056105853448179, - "inputId": 9, + "inputModuleId": 2120522391757438, + "inputId": 0, + "color": "#ff52d4" + }, + { + "id": 4971591951242566, + "outputModuleId": 3272418169313056, + "outputId": 1, + "inputModuleId": 2120522391757438, + "inputId": 1, + "color": "#ff5293" + }, + { + "id": 8759272365135115, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 8078887273046425, + "inputId": 2, "color": "#e8ff52" }, { - "id": 6716582837706859, - "outputModuleId": 8615243856518388, - "outputId": 2, - "inputModuleId": 8226081794468965, - "inputId": 6, + "id": 3599544925896906, + "outputModuleId": 8078887273046425, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 7, + "color": "#ff5252" + }, + { + "id": 750935108020452, + "outputModuleId": 1202888979525309, + "outputId": 1, + "inputModuleId": 7693134582131517, + "inputId": 5, + "color": "#e952ff" + }, + { + "id": 2926615471892406, + "outputModuleId": 1202888979525309, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 4, + "color": "#a852ff" + }, + { + "id": 7247307875742693, + "outputModuleId": 2120522391757438, + "outputId": 0, + "inputModuleId": 1202888979525309, + "inputId": 0, + "color": "#ff9352" + }, + { + "id": 1658873528417062, + "outputModuleId": 2120522391757438, + "outputId": 1, + "inputModuleId": 1202888979525309, + "inputId": 1, + "color": "#ffd452" + }, + { + "id": 6814850604612890, + "outputModuleId": 3623085877119332, + "outputId": 0, + "inputModuleId": 1202888979525309, + "inputId": 5, "color": "#a8ff52" }, { - "id": 7180324831364564, - "outputModuleId": 8615243856518388, + "id": 2745201661929078, + "outputModuleId": 3272418169313056, "outputId": 2, - "inputModuleId": 3056105853448179, - "inputId": 5, + "inputModuleId": 2120522391757438, + "inputId": 2, "color": "#e8ff52" }, { - "id": 4709048866687789, - "outputModuleId": 8615243856518388, - "outputId": 3, - "inputModuleId": 8226081794468965, + "id": 2739608613257288, + "outputModuleId": 8078887273046425, + "outputId": 0, + "inputModuleId": 8500492434533465, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 1459684846251261, + "outputModuleId": 7545907193641280, + "outputId": 0, + "inputModuleId": 7354440315312540, "inputId": 3, + "color": "#52ff7d" + }, + { + "id": 163404945941087, + "outputModuleId": 7545907193641280, + "outputId": 0, + "inputModuleId": 7614703401631065, + "inputId": 0, + "color": "#52ff7d" + }, + { + "id": 8864417258847625, + "outputModuleId": 1660124145346554, + "outputId": 0, + "inputModuleId": 7545907193641280, + "inputId": 2, "color": "#a8ff52" }, { - "id": 3629693289772365, - "outputModuleId": 8615243856518388, - "outputId": 3, - "inputModuleId": 3056105853448179, + "id": 2484026288669710, + "outputModuleId": 8631911439676095, + "outputId": 1, + "inputModuleId": 7693134582131517, "inputId": 3, - "color": "#e8ff52" + "color": "#a852ff" + }, + { + "id": 6768411060010098, + "outputModuleId": 8631911439676095, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 2, + "color": "#6752ff" + }, + { + "id": 1066788645723652, + "outputModuleId": 7354440315312540, + "outputId": 0, + "inputModuleId": 8631911439676095, + "inputId": 0, + "color": "#67ff52" }, { - "id": 1418873142775142, - "outputModuleId": 8615243856518388, + "id": 2180617489026327, + "outputModuleId": 7354440315312540, "outputId": 1, - "inputModuleId": 7968649719176584, - "inputId": 3, + "inputModuleId": 8631911439676095, + "inputId": 1, + "color": "#52ff7d" + }, + { + "id": 3530286975247477, + "outputModuleId": 7649815730956881, + "outputId": 0, + "inputModuleId": 2364063745493562, + "inputId": 6, + "color": "#a8ff52" + }, + { + "id": 8860630921626163, + "outputModuleId": 3492788997026115, + "outputId": 1, + "inputModuleId": 7649815730956881, + "inputId": 2, + "color": "#e8ff52" + }, + { + "id": 6602799437633275, + "outputModuleId": 3492788997026115, + "outputId": 2, + "inputModuleId": 8451952277485002, + "inputId": 2, + "color": "#67ff52" + }, + { + "id": 192850560558353, + "outputModuleId": 3492788997026115, + "outputId": 2, + "inputModuleId": 2528905409371299, + "inputId": 0, "color": "#67ff52" + }, + { + "id": 1934828668532774, + "outputModuleId": 2528905409371299, + "outputId": 0, + "inputModuleId": 8858399717280256, + "inputId": 0, + "color": "#52ffbe" + }, + { + "id": 6464088990534542, + "outputModuleId": 7649815730956881, + "outputId": 0, + "inputModuleId": 1772638206753921, + "inputId": 2, + "color": "#a8ff52" } ] -} \ No newline at end of file +} diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index c1af4c2b..891aafe7 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit c1af4c2b4faf7b50481a2cb71996302a7f03a43e +Subproject commit 891aafe7be25ffaf398a00670b9fbb99d1dfa51f From e2287e07eb28de3de05ca5464e6570123ab65b13 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 Dec 2022 20:46:44 +0000 Subject: [PATCH 168/451] Disable LTO post-release; Update JTB_-_Waves.vcv Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- patches/examples/JTB_-_Waves.vcv | 3126 +++++++++++++++--------------- 2 files changed, 1570 insertions(+), 1558 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b683029e..6a951bee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'true' + WITH_LTO: 'false' jobs: linux-arm64: diff --git a/patches/examples/JTB_-_Waves.vcv b/patches/examples/JTB_-_Waves.vcv index 4e6dc0d1..8633c286 100644 --- a/patches/examples/JTB_-_Waves.vcv +++ b/patches/examples/JTB_-_Waves.vcv @@ -1,9 +1,29 @@ { "version": "2.1.2", - "zoom": 1.0, + "zoom": 0.82074141502380371, + "gridOffset": [ + -44.997005462646484, + -0.079142682254314423 + ], "modules": [ { - "id": 6532964214833122, + "id": 3538881790933672, + "plugin": "MindMeldModular", + "model": "PatchMasterBlank", + "version": "2.0", + "params": [], + "leftModuleId": 8631911439676095, + "rightModuleId": 7579603213780856, + "data": { + "facePlate": 0 + }, + "pos": [ + 65, + 0 + ] + }, + { + "id": 2859633263682263, "plugin": "MindMeldModular", "model": "PatchMaster", "version": "2.0", @@ -13,23 +33,23 @@ "id": 0 }, { - "value": 1.0, + "value": 0.40481904149055481, "id": 1 }, { - "value": 0.6337316632270813, + "value": 0.29517701268196106, "id": 2 }, { - "value": 0.45300984382629395, + "value": 0.81927722692489624, "id": 3 }, { - "value": 0.61325019598007202, + "value": 0.28915113210678101, "id": 4 }, { - "value": 0.75903826951980591, + "value": 0.32771065831184387, "id": 5 }, { @@ -41,14 +61,13 @@ "id": 7 } ], - "leftModuleId": 1748021940156784, - "rightModuleId": 7545907193641280, + "rightModuleId": 359762865999381, "data": { "miscSettings": 65793, "miscSettings2": 1, "tileInfos": [ - 181, - 217, + 180, + 179, 179, 179, 179, @@ -65,15 +84,15 @@ 155 ], "tileNames": [ - "Mute", - "Level", - "Chord Dist", - "Bass Top", - "Ringmod", - "Chord Dist", + "Reset", + "Melody Clock", + "Note Chance", + "Glide", + "MainDist", + "Rev+Dlay", "No name", "No name", - "Chods", + "Control", "No name", "No name", "No name", @@ -84,8 +103,8 @@ ], "maps": [ { - "moduleId": 7693134582131517, - "paramId": 8, + "moduleId": 3492788997026115, + "paramId": 12, "rangeMax": 1.0, "rangeMin": 0.0 }, @@ -108,10 +127,10 @@ "rangeMin": 0.0 }, { - "moduleId": 7693134582131517, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 + "moduleId": 3492788997026115, + "paramId": 2, + "rangeMax": 0.7439998984336853, + "rangeMin": 0.42600008845329285 }, { "moduleId": -1, @@ -132,10 +151,10 @@ "rangeMin": 0.0 }, { - "moduleId": 2364063745493562, - "paramId": 2, - "rangeMax": 0.3600081205368042, - "rangeMin": 0.0 + "moduleId": 2528905409371299, + "paramId": 0, + "rangeMax": 0.0, + "rangeMin": 1.0 }, { "moduleId": -1, @@ -156,15 +175,15 @@ "rangeMin": 0.0 }, { - "moduleId": -1, + "moduleId": 7545907193641280, "paramId": 0, - "rangeMax": 1.0, + "rangeMax": 0.14999982714653015, "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, + "moduleId": 7545907193641280, + "paramId": 2, + "rangeMax": 0.14999990165233612, "rangeMin": 0.0 }, { @@ -180,16 +199,16 @@ "rangeMin": 0.0 }, { - "moduleId": 2364063745493562, - "paramId": 5, - "rangeMax": 0.49200648069381714, - "rangeMin": 0.0 + "moduleId": 8500492434533465, + "paramId": 0, + "rangeMax": 0.85000193119049072, + "rangeMin": 0.40299832820892334 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 + "moduleId": 8500492434533465, + "paramId": 2, + "rangeMax": 0.47900623083114624, + "rangeMin": 0.73800313472747803 }, { "moduleId": -1, @@ -204,14 +223,14 @@ "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, + "moduleId": 1629089543055674, + "paramId": 9, "rangeMax": 1.0, "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, + "moduleId": 7411284708330475, + "paramId": 9, "rangeMax": 1.0, "rangeMin": 0.0 }, @@ -288,12 +307,12 @@ ], "tileOrders": [ 8, - 2, - 4, 0, 1, - -1, - -1, + 2, + 3, + 4, + 5, -1, -1, -1, @@ -324,38 +343,38 @@ ] }, "pos": [ - 19, + 10, 0 ] }, { - "id": 1748021940156784, - "plugin": "MindMeldModular", - "model": "PatchMaster", + "id": 3492788997026115, + "plugin": "ImpromptuModular", + "model": "Clocked", "version": "2.0", "params": [ { - "value": 0.0, + "value": 87.0, "id": 0 }, { - "value": 1.0, + "value": -9.0, "id": 1 }, { - "value": 1.0, + "value": 4.0, "id": 2 }, { - "value": 0.45300984382629395, + "value": 0.0, "id": 3 }, { - "value": 0.90603351593017578, + "value": 0.0, "id": 4 }, { - "value": 0.75903826951980591, + "value": 0.0, "id": 5 }, { @@ -365,796 +384,144 @@ { "value": 0.0, "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.5, + "id": 9 + }, + { + "value": 0.84217530488967896, + "id": 10 + }, + { + "value": 0.5, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 } ], - "leftModuleId": 359762865999381, - "rightModuleId": 6532964214833122, + "rightModuleId": 6206908039426907, "data": { - "miscSettings": 65793, - "miscSettings2": 1, - "tileInfos": [ - 181, - 217, - 179, - 179, - 179, - 179, - 51, - 51, - 155, - 155, - 155, - 155, - 155, - 155, - 155, - 155 - ], - "tileNames": [ - "Mute", - "Level", - "Bass Top", - "Bass Top", - "Filer Cutoff", - "Chord Dist", - "No name", - "No name", - "Bass", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name" - ], - "maps": [ - { - "moduleId": 7693134582131517, - "paramId": 10, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 7693134582131517, - "paramId": 29, - "rangeMax": 0.85500186681747437, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 1202888979525309, - "paramId": 9, - "rangeMax": 0.70200371742248535, - "rangeMin": 0.43799790740013123 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 2120522391757438, - "paramId": 0, - "rangeMax": 0.7510036826133728, - "rangeMin": 0.2460002601146698 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - } - ], - "radioLits": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "tileOrders": [ - 8, - 2, - 4, - 0, - 1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ], - "tileSettings": [ - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] + "panelTheme": 1, + "panelContrast": 220.0, + "running": true, + "displayDelayNoteMode": true, + "bpmDetectionMode": false, + "resetOnStartStop": 0, + "ppqn": 4, + "resetClockOutputsHigh": false, + "momentaryRunInput": true, + "forceCvOnBpmOut": false, + "clockMaster": false }, "pos": [ - 15, - 0 + 34, + 2 ] }, { - "id": 359762865999381, - "plugin": "MindMeldModular", - "model": "PatchMaster", + "id": 2528905409371299, + "plugin": "AudibleInstruments", + "model": "Branches", "version": "2.0", "params": [ { - "value": 0.0, + "value": 0.70482301712036133, "id": 0 }, { - "value": 1.0, + "value": 0.5, "id": 1 }, { - "value": 0.5807153582572937, + "value": 0.0, "id": 2 }, { - "value": 0.45300984382629395, + "value": 0.0, "id": 3 + } + ], + "leftModuleId": 3147629330555360, + "rightModuleId": 8858399717280256, + "data": { + "modes": [ + false, + false + ] + }, + "pos": [ + 83, + 2 + ] + }, + { + "id": 8858399717280256, + "plugin": "Bogaudio", + "model": "Bogaudio-SampleHold", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 }, { - "value": 0.31565791368484497, - "id": 4 + "value": 0.0, + "id": 1 }, { - "value": 0.75903826951980591, - "id": 5 + "value": 0.0, + "id": 2 }, { "value": 0.0, - "id": 6 + "id": 3 }, { "value": 0.0, - "id": 7 + "id": 4 + }, + { + "value": 0.0, + "id": 5 } ], - "leftModuleId": 2859633263682263, - "rightModuleId": 1748021940156784, - "data": { - "miscSettings": 65793, - "miscSettings2": 1, - "tileInfos": [ - 181, - 217, - 179, - 179, - 179, - 179, - 51, - 51, - 155, - 155, - 155, - 155, - 155, - 155, - 155, - 155 - ], - "tileNames": [ - "Mute", - "Level", - "Lead Dist", - "Bass Top", - "Dist Tone", - "Chord Dist", - "No name", - "No name", - "Lead", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name" - ], - "maps": [ - { - "moduleId": 7693134582131517, - "paramId": 9, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 7693134582131517, - "paramId": 24, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 8631911439676095, - "paramId": 4, - "rangeMax": 0.44400703907012939, - "rangeMin": 0.0 - }, - { - "moduleId": 7354440315312540, - "paramId": 21, - "rangeMax": 0.67599606513977051, - "rangeMin": 0.75699460506439209 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 8631911439676095, - "paramId": 1, - "rangeMax": 0.39900767803192139, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - } - ], - "radioLits": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "tileOrders": [ - 8, - 2, - 4, - 0, - 1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ], - "tileSettings": [ - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - "pos": [ - 11, - 0 - ] - }, - { - "id": 3492788997026115, - "plugin": "ImpromptuModular", - "model": "Clocked", - "version": "2.0", - "params": [ - { - "value": 87.0, - "id": 0 - }, - { - "value": -9.0, - "id": 1 - }, - { - "value": 4.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.5, - "id": 8 - }, - { - "value": 0.5, - "id": 9 - }, - { - "value": 0.84217530488967896, - "id": 10 - }, - { - "value": 0.5, - "id": 11 - }, - { - "value": 0.0, - "id": 12 - }, - { - "value": 0.0, - "id": 13 - }, - { - "value": 0.0, - "id": 14 - }, - { - "value": 0.0, - "id": 15 - }, - { - "value": 0.0, - "id": 16 - }, - { - "value": 0.0, - "id": 17 - }, - { - "value": 0.0, - "id": 18 - }, - { - "value": 0.0, - "id": 19 - } - ], - "rightModuleId": 6206908039426907, - "data": { - "panelTheme": 1, - "panelContrast": 220.0, - "running": true, - "displayDelayNoteMode": true, - "bpmDetectionMode": false, - "resetOnStartStop": 0, - "ppqn": 4, - "resetClockOutputsHigh": false, - "momentaryRunInput": true, - "forceCvOnBpmOut": false, - "clockMaster": false - }, - "pos": [ - 28, - 2 - ] - }, - { - "id": 2528905409371299, - "plugin": "AudibleInstruments", - "model": "Branches", - "version": "2.0", - "params": [ - { - "value": 0.68915784358978271, - "id": 0 - }, - { - "value": 0.5, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - } - ], - "leftModuleId": 3147629330555360, - "rightModuleId": 8858399717280256, - "data": { - "modes": [ - false, - false - ] - }, - "pos": [ - 77, - 2 - ] - }, - { - "id": 8858399717280256, - "plugin": "Bogaudio", - "model": "Bogaudio-SampleHold", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - } - ], - "leftModuleId": 2528905409371299, - "rightModuleId": 1929072526365403, + "leftModuleId": 2528905409371299, + "rightModuleId": 1929072526365403, "data": { "poly_input": 0, "noise_type": 0, @@ -1163,71 +530,10 @@ "smoothing_ms": 0.0 }, "pos": [ - 83, - 2 - ] - }, - { - "id": 5599750386095483, - "plugin": "Bogaudio", - "model": "Bogaudio-Offset", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.10659158229827881, - "id": 1 - } - ], - "leftModuleId": 931699531175066, - "rightModuleId": 1660124145346554, - "data": { - "disableOutputLimit": false, - "offset_first": false - }, - "pos": [ - 92, + 89, 2 ] }, - { - "id": 8451952277485002, - "plugin": "Bogaudio", - "model": "Bogaudio-Slew", - "version": "2.0", - "params": [ - { - "value": 0.065060213208198547, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.49092867970466614, - "id": 2 - }, - { - "value": 0.34457814693450928, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - } - ], - "leftModuleId": 7614703401631065, - "rightModuleId": 7354440315312540, - "data": {}, - "pos": [ - 38, - 0 - ] - }, { "id": 7649815730956881, "plugin": "Bogaudio", @@ -1291,7 +597,7 @@ } ], "leftModuleId": 1232093242356119, - "rightModuleId": 7693134582131517, + "rightModuleId": 7744264450943662, "data": {}, "pos": [ 58, @@ -1363,7 +669,7 @@ "shouldTriggerOnLoad": true }, "pos": [ - 86, + 92, 2 ] }, @@ -1382,7 +688,7 @@ "rightModuleId": 5599750386095483, "data": {}, "pos": [ - 89, + 95, 2 ] }, @@ -1449,7 +755,7 @@ "range_scale": 1.0 }, "pos": [ - 48, + 54, 2 ] }, @@ -1722,7 +1028,7 @@ "autostepPaste": 0 }, "pos": [ - 54, + 60, 2 ] }, @@ -1942,7 +1248,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2221,7 +1527,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2248,7 +1554,7 @@ "version": "2.0", "params": [ { - "value": 3.0355033874511719, + "value": 0.23058414459228516, "id": 0 }, { @@ -2361,7 +1667,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2418,7 +1724,7 @@ "id": 8 }, { - "value": 0.70200371742248535, + "value": 0.5343744158744812, "id": 9 }, { @@ -2634,7 +1940,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2845,204 +2151,89 @@ "id": 45 }, { - "value": 0.0, - "id": 46 - }, - { - "value": 0.0, - "id": 47 - }, - { - "value": 1.0, - "id": 48 - }, - { - "value": 0.0, - "id": 49 - }, - { - "value": 1.0, - "id": 50 - } - ], - "rightModuleId": 7649815730956881, - "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - }, - "modulespecific": { - "halfbandM": 6, - "halfbandSteep": true, - "doDCBlock": true - } - }, - "pos": [ - 4, - 1 - ] - }, - { - "id": 3147629330555360, - "plugin": "GrandeModular", - "model": "Merge8", - "version": "2.0", - "params": [], - "leftModuleId": 3623085877119332, - "rightModuleId": 2528905409371299, - "data": { - "channels_merge": -1 - }, - "pos": [ - 75, - 2 - ] - }, - { - "id": 1660124145346554, - "plugin": "ML_modules", - "model": "Quantum", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - }, - { - "value": 0.0, - "id": 10 - }, - { - "value": 0.0, - "id": 11 - } - ], - "leftModuleId": 5599750386095483, - "data": { - "scale": [ - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 1, - 0 - ], - "mode": 1, - "transpose_select": 1, - "toggle_mode": 1 - }, - "pos": [ - 95, - 2 - ] - }, - { - "id": 7545907193641280, - "plugin": "Bogaudio", - "model": "Bogaudio-Slew", - "version": "2.0", - "params": [ - { - "value": 0.17526623606681824, - "id": 0 - }, - { - "value": -0.33734920620918274, - "id": 1 + "value": 0.0, + "id": 46 }, { - "value": 0.17285659909248352, - "id": 2 + "value": 0.0, + "id": 47 }, { - "value": -0.41927692294120789, - "id": 3 + "value": 1.0, + "id": 48 }, { "value": 0.0, - "id": 4 + "id": 49 + }, + { + "value": 1.0, + "id": 50 } ], - "leftModuleId": 6532964214833122, - "rightModuleId": 7614703401631065, - "data": {}, + "rightModuleId": 7649815730956881, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, "pos": [ - 23, - 0 + 4, + 1 ] }, { - "id": 7614703401631065, + "id": 3147629330555360, + "plugin": "GrandeModular", + "model": "Merge8", + "version": "2.0", + "params": [], + "leftModuleId": 3623085877119332, + "rightModuleId": 2528905409371299, + "data": { + "channels_merge": -1 + }, + "pos": [ + 81, + 2 + ] + }, + { + "id": 6408811696897743, "plugin": "SurgeXTRack", - "model": "SurgeXTOSCTwist", + "model": "SurgeXTOSCModern", "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.0, "id": 0 }, { - "value": 0.004999999888241291, + "value": 1.0, "id": 1 }, { - "value": 0.5, + "value": 0.62471598386764526, "id": 2 }, { - "value": 0.18885940313339233, + "value": 0.60414427518844604, "id": 3 }, { - "value": 0.68385952711105347, + "value": 0.5, "id": 4 }, { @@ -3050,11 +2241,11 @@ "id": 5 }, { - "value": 0.91899901628494263, + "value": 0.094571217894554138, "id": 6 }, { - "value": 0.5, + "value": 0.13726678490638733, "id": 7 }, { @@ -3230,12 +2421,11 @@ "id": 50 } ], - "leftModuleId": 7545907193641280, - "rightModuleId": 8451952277485002, + "rightModuleId": 977849113384714, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -3250,46 +2440,81 @@ } }, "pos": [ - 26, - 0 + 15, + 2 ] }, { - "id": 7354440315312540, + "id": 977849113384714, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 6408811696897743, + "rightModuleId": 1132602188892100, + "pos": [ + 27, + 2 + ] + }, + { + "id": 1132602188892100, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 977849113384714, + "pos": [ + 30, + 2 + ] + }, + { + "id": 2364063745493562, "plugin": "SurgeXTRack", - "model": "SurgeXTVCF", + "model": "SurgeXTMixer", "version": "2.0", "params": [ { - "value": 0.23143219947814941, + "value": 0.0, "id": 0 }, { - "value": 0.53199803829193115, + "value": 0.0, "id": 1 }, { - "value": 1.9437248706817627, + "value": 0.22814854979515076, "id": 2 }, { - "value": 1.0, + "value": 0.0, "id": 3 }, { - "value": 0.50480771064758301, + "value": 0.0, "id": 4 }, { - "value": 0.0, + "value": 0.30172306299209595, "id": 5 }, { - "value": 1.0, + "value": 0.37028577923774719, "id": 6 }, { - "value": 0.0, + "value": 1.0, "id": 7 }, { @@ -3309,7 +2534,7 @@ "id": 11 }, { - "value": 0.0, + "value": 1.0, "id": 12 }, { @@ -3341,11 +2566,11 @@ "id": 19 }, { - "value": 0.0, + "value": 0.88200151920318604, "id": 20 }, { - "value": 0.41991496086120605, + "value": 0.0, "id": 21 }, { @@ -3357,73 +2582,176 @@ "id": 23 }, { - "value": 0.0, + "value": 1.0, "id": 24 }, { - "value": 16.0, + "value": 0.0, "id": 25 }, { - "value": 3.0, + "value": 0.0, "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.2260001003742218, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.67200368642807007, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 } ], - "leftModuleId": 8451952277485002, - "rightModuleId": 8631911439676095, + "leftModuleId": 7649815730956881, + "rightModuleId": 8524145861178282, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, "localModulationColor": 900005, "localControlValueColor": 900001, "localPowerButtonColor": 900003 + }, + "modulespecific": { + "vuChannel": 0 } }, "pos": [ - 41, - 0 + 19, + 1 ] }, { - "id": 8631911439676095, + "id": 8524145861178282, "plugin": "SurgeXTRack", - "model": "SurgeXTFXExciter", + "model": "SurgeXTFXChorus", "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.1591431051492691, "id": 0 }, { - "value": 0.12594993412494659, + "value": 0.6618039608001709, "id": 1 }, { - "value": 0.49999994039535522, + "value": 0.41764268279075623, "id": 2 }, { - "value": 0.49999994039535522, + "value": 0.26871439814567566, "id": 3 }, { - "value": 0.25784170627593994, + "value": 0.27980762720108032, "id": 4 }, { - "value": 0.0, + "value": 0.96663463115692139, "id": 5 }, { - "value": 0.0, + "value": 0.42299914360046387, "id": 6 }, { - "value": 0.0, + "value": 0.5, "id": 7 }, { @@ -3633,14 +2961,22 @@ { "value": 0.0, "id": 59 + }, + { + "value": 1.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 } ], - "leftModuleId": 7354440315312540, - "rightModuleId": 3538881790933672, + "leftModuleId": 2364063745493562, + "rightModuleId": 1772638206753921, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -3650,40 +2986,41 @@ }, "modulespecific": { "loadedPreset": 0, - "presetName": "Init", + "presetName": "Init (Dry)", "presetIsDirty": true, + "clockStyle": 0, "polyphonicMode": false } }, "pos": [ - 53, - 0 + 31, + 1 ] }, { - "id": 6408811696897743, + "id": 1772638206753921, "plugin": "SurgeXTRack", - "model": "SurgeXTOSCModern", + "model": "SurgeXTWaveshaper", "version": "2.0", "params": [ { - "value": 0.0, + "value": 7.0902948379516602, "id": 0 }, { - "value": 1.0, + "value": 0.0, "id": 1 }, { - "value": 0.62471598386764526, + "value": 0.46771752834320068, "id": 2 }, { - "value": 0.60414427518844604, + "value": -23.228555679321289, "id": 3 }, { - "value": 0.5, + "value": 34.732803344726562, "id": 4 }, { @@ -3691,11 +3028,11 @@ "id": 5 }, { - "value": 0.094571217894554138, + "value": 0.0, "id": 6 }, { - "value": 0.13726678490638733, + "value": 0.0, "id": 7 }, { @@ -3719,7 +3056,7 @@ "id": 12 }, { - "value": 0.0, + "value": 0.094000227749347687, "id": 13 }, { @@ -3767,204 +3104,214 @@ "id": 24 }, { - "value": 0.0, + "value": 41.0, "id": 25 }, { - "value": 0.0, + "value": 1.0, "id": 26 }, { - "value": 0.0, + "value": 1.0, "id": 27 - }, - { - "value": 0.0, - "id": 28 - }, - { - "value": 0.0, - "id": 29 - }, - { - "value": 0.0, - "id": 30 - }, - { - "value": 0.0, - "id": 31 - }, - { - "value": 0.0, - "id": 32 - }, - { - "value": 0.0, - "id": 33 - }, - { - "value": 0.0, - "id": 34 - }, + } + ], + "leftModuleId": 8524145861178282, + "rightModuleId": 1232093242356119, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 43, + 1 + ] + }, + { + "id": 5599750386095483, + "plugin": "Bogaudio", + "model": "Bogaudio-Offset", + "version": "2.0", + "params": [ { "value": 0.0, - "id": 35 + "id": 0 }, { - "value": 0.0, - "id": 36 - }, + "value": 0.11173717677593231, + "id": 1 + } + ], + "leftModuleId": 931699531175066, + "rightModuleId": 1660124145346554, + "data": { + "disableOutputLimit": false, + "offset_first": false + }, + "pos": [ + 98, + 2 + ] + }, + { + "id": 1660124145346554, + "plugin": "ML_modules", + "model": "Quantum", + "version": "2.0", + "params": [ { "value": 0.0, - "id": 37 + "id": 0 }, { "value": 0.0, - "id": 38 + "id": 1 }, { "value": 0.0, - "id": 39 + "id": 2 }, { "value": 0.0, - "id": 40 + "id": 3 }, { "value": 0.0, - "id": 41 + "id": 4 }, { "value": 0.0, - "id": 42 + "id": 5 }, { "value": 0.0, - "id": 43 + "id": 6 }, { "value": 0.0, - "id": 44 + "id": 7 }, { "value": 0.0, - "id": 45 + "id": 8 }, { "value": 0.0, - "id": 46 + "id": 9 }, { "value": 0.0, - "id": 47 - }, - { - "value": 1.0, - "id": 48 + "id": 10 }, { "value": 0.0, - "id": 49 - }, - { - "value": 1.0, - "id": 50 + "id": 11 } ], - "rightModuleId": 977849113384714, + "leftModuleId": 5599750386095483, "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - }, - "modulespecific": { - "halfbandM": 6, - "halfbandSteep": true, - "doDCBlock": true - } + "scale": [ + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "mode": 1, + "transpose_select": 1, + "toggle_mode": 1 }, "pos": [ - 9, + 101, 2 ] }, { - "id": 977849113384714, - "plugin": "Fundamental", - "model": "Sum", + "id": 7545907193641280, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.12289144098758698, "id": 0 - } - ], - "leftModuleId": 6408811696897743, - "rightModuleId": 1132602188892100, - "pos": [ - 21, - 2 - ] - }, - { - "id": 1132602188892100, - "plugin": "Fundamental", - "model": "Sum", - "version": "2.0", - "params": [ + }, { - "value": 1.0, - "id": 0 + "value": -0.33734920620918274, + "id": 1 + }, + { + "value": 0.12289150059223175, + "id": 2 + }, + { + "value": -0.41927692294120789, + "id": 3 + }, + { + "value": 0.0, + "id": 4 } ], - "leftModuleId": 977849113384714, + "leftModuleId": 6532964214833122, + "rightModuleId": 7614703401631065, + "data": {}, "pos": [ - 24, - 2 + 26, + 0 ] }, { - "id": 2364063745493562, + "id": 7614703401631065, "plugin": "SurgeXTRack", - "model": "SurgeXTMixer", + "model": "SurgeXTOSCTwist", "version": "2.0", "params": [ { - "value": 0.0, + "value": 1.0, "id": 0 }, { - "value": 0.0, + "value": 0.004999999888241291, "id": 1 }, { - "value": 0.22814854979515076, + "value": 0.5, "id": 2 }, { - "value": 0.0, + "value": 0.18885940313339233, "id": 3 }, { - "value": 0.0, + "value": 0.68385952711105347, "id": 4 }, { - "value": 0.30172306299209595, + "value": 0.0, "id": 5 }, { - "value": 0.37028577923774719, + "value": 0.91899901628494263, "id": 6 }, { - "value": 1.0, + "value": 0.5, "id": 7 }, { @@ -3984,7 +3331,7 @@ "id": 11 }, { - "value": 1.0, + "value": 0.0, "id": 12 }, { @@ -4016,7 +3363,7 @@ "id": 19 }, { - "value": 0.88200151920318604, + "value": 0.0, "id": 20 }, { @@ -4032,7 +3379,7 @@ "id": 23 }, { - "value": 1.0, + "value": 0.0, "id": 24 }, { @@ -4048,7 +3395,7 @@ "id": 27 }, { - "value": 0.2260001003742218, + "value": 0.0, "id": 28 }, { @@ -4064,7 +3411,7 @@ "id": 31 }, { - "value": 0.67200368642807007, + "value": 0.0, "id": 32 }, { @@ -4128,7 +3475,7 @@ "id": 47 }, { - "value": 0.0, + "value": 1.0, "id": 48 }, { @@ -4136,20 +3483,16 @@ "id": 49 }, { - "value": 0.0, + "value": 1.0, "id": 50 - }, - { - "value": 0.0, - "id": 51 } ], - "leftModuleId": 7649815730956881, - "rightModuleId": 8524145861178282, + "leftModuleId": 7545907193641280, + "rightModuleId": 7354440315312540, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -4158,50 +3501,52 @@ "localPowerButtonColor": 900003 }, "modulespecific": { - "vuChannel": 0 + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true } }, "pos": [ - 19, - 1 + 29, + 0 ] }, { - "id": 8524145861178282, + "id": 7354440315312540, "plugin": "SurgeXTRack", - "model": "SurgeXTFXChorus", + "model": "SurgeXTVCF", "version": "2.0", "params": [ { - "value": 0.1591431051492691, + "value": 0.23143219947814941, "id": 0 }, { - "value": 0.6618039608001709, + "value": 0.53199803829193115, "id": 1 }, { - "value": 0.41764268279075623, + "value": 1.9437248706817627, "id": 2 }, { - "value": 0.26871439814567566, + "value": 1.0, "id": 3 }, { - "value": 0.27980762720108032, + "value": 1.4485224485397339, "id": 4 }, { - "value": 0.96663463115692139, + "value": 0.0, "id": 5 }, { - "value": 0.42299914360046387, + "value": 1.0, "id": 6 }, { - "value": 0.5, + "value": 0.0, "id": 7 }, { @@ -4257,7 +3602,7 @@ "id": 20 }, { - "value": 0.0, + "value": 0.44938600063323975, "id": 21 }, { @@ -4273,315 +3618,337 @@ "id": 24 }, { - "value": 0.0, + "value": 16.0, "id": 25 }, { - "value": 0.0, + "value": 3.0, "id": 26 - }, + } + ], + "leftModuleId": 7614703401631065, + "rightModuleId": 8631911439676095, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 41, + 0 + ] + }, + { + "id": 8631911439676095, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXExciter", + "version": "2.0", + "params": [ { - "value": 0.0, - "id": 27 + "value": 1.0, + "id": 0 }, { - "value": 0.0, - "id": 28 + "value": 0.24036593735218048, + "id": 1 }, { - "value": 0.0, - "id": 29 + "value": 0.49999994039535522, + "id": 2 }, { - "value": 0.0, - "id": 30 + "value": 0.49999994039535522, + "id": 3 }, { - "value": 0.0, - "id": 31 + "value": 0.17706665396690369, + "id": 4 }, { "value": 0.0, - "id": 32 + "id": 5 }, { "value": 0.0, - "id": 33 + "id": 6 }, { "value": 0.0, - "id": 34 + "id": 7 }, { "value": 0.0, - "id": 35 + "id": 8 }, { "value": 0.0, - "id": 36 + "id": 9 }, { "value": 0.0, - "id": 37 + "id": 10 }, { "value": 0.0, - "id": 38 + "id": 11 }, { - "value": 0.0, - "id": 39 + "value": -1.0, + "id": 12 }, { "value": 0.0, - "id": 40 + "id": 13 }, { "value": 0.0, - "id": 41 + "id": 14 }, { "value": 0.0, - "id": 42 + "id": 15 }, { "value": 0.0, - "id": 43 + "id": 16 }, { "value": 0.0, - "id": 44 + "id": 17 }, { "value": 0.0, - "id": 45 + "id": 18 }, { "value": 0.0, - "id": 46 + "id": 19 }, { "value": 0.0, - "id": 47 + "id": 20 }, { "value": 0.0, - "id": 48 + "id": 21 }, { "value": 0.0, - "id": 49 + "id": 22 }, { "value": 0.0, - "id": 50 + "id": 23 }, { "value": 0.0, - "id": 51 + "id": 24 }, { "value": 0.0, - "id": 52 + "id": 25 }, { "value": 0.0, - "id": 53 + "id": 26 }, { "value": 0.0, - "id": 54 + "id": 27 }, { "value": 0.0, - "id": 55 + "id": 28 }, { "value": 0.0, - "id": 56 + "id": 29 }, { "value": 0.0, - "id": 57 + "id": 30 }, { "value": 0.0, - "id": 58 + "id": 31 }, { "value": 0.0, - "id": 59 - }, - { - "value": 1.0, - "id": 60 - }, - { - "value": 1.0, - "id": 61 - } - ], - "leftModuleId": 2364063745493562, - "rightModuleId": 1772638206753921, - "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - }, - "modulespecific": { - "loadedPreset": 0, - "presetName": "Init (Dry)", - "presetIsDirty": true, - "clockStyle": 0, - "polyphonicMode": false - } - }, - "pos": [ - 31, - 1 - ] - }, - { - "id": 1772638206753921, - "plugin": "SurgeXTRack", - "model": "SurgeXTWaveshaper", - "version": "2.0", - "params": [ - { - "value": 7.0902948379516602, - "id": 0 + "id": 32 }, { "value": 0.0, - "id": 1 + "id": 33 }, { - "value": 0.46771752834320068, - "id": 2 + "value": 0.0, + "id": 34 }, { - "value": -23.228555679321289, - "id": 3 + "value": 0.0, + "id": 35 }, { - "value": 34.732803344726562, - "id": 4 + "value": 0.0, + "id": 36 }, { "value": 0.0, - "id": 5 + "id": 37 }, { "value": 0.0, - "id": 6 + "id": 38 }, { "value": 0.0, - "id": 7 + "id": 39 }, { "value": 0.0, - "id": 8 + "id": 40 }, { "value": 0.0, - "id": 9 + "id": 41 }, { "value": 0.0, - "id": 10 + "id": 42 }, { "value": 0.0, - "id": 11 + "id": 43 }, { "value": 0.0, - "id": 12 + "id": 44 }, { - "value": 0.094000227749347687, - "id": 13 + "value": 0.0, + "id": 45 }, { "value": 0.0, - "id": 14 + "id": 46 }, { "value": 0.0, - "id": 15 + "id": 47 }, { "value": 0.0, - "id": 16 + "id": 48 }, { "value": 0.0, - "id": 17 + "id": 49 }, { "value": 0.0, - "id": 18 + "id": 50 }, { "value": 0.0, - "id": 19 + "id": 51 }, { "value": 0.0, - "id": 20 + "id": 52 }, { "value": 0.0, - "id": 21 + "id": 53 }, { "value": 0.0, - "id": 22 + "id": 54 }, { "value": 0.0, - "id": 23 + "id": 55 }, { "value": 0.0, - "id": 24 + "id": 56 }, { - "value": 41.0, - "id": 25 + "value": 0.0, + "id": 57 }, { - "value": 1.0, - "id": 26 + "value": 0.0, + "id": 58 }, { - "value": 1.0, - "id": 27 + "value": 0.0, + "id": 59 } ], - "leftModuleId": 8524145861178282, - "rightModuleId": 1232093242356119, + "leftModuleId": 7354440315312540, + "rightModuleId": 3538881790933672, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, "localModulationColor": 900005, "localControlValueColor": 900001, "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": false } }, "pos": [ - 43, + 53, + 0 + ] + }, + { + "id": 7744264450943662, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.076470956206321716, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 8078887273046425, + "rightModuleId": 7693134582131517, + "data": {}, + "pos": [ + 61, 1 ] }, @@ -4592,7 +3959,7 @@ "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.89600133895874023, "id": 0 }, { @@ -4688,7 +4055,7 @@ "id": 23 }, { - "value": 0.8123, + "value": 0.80400252342224121, "id": 24 }, { @@ -4696,7 +4063,7 @@ "id": 25 }, { - "value": 0.0, + "value": -0.1679999977350235, "id": 26 }, { @@ -4708,7 +4075,7 @@ "id": 28 }, { - "value": 0.71000373363494873, + "value": 0.58688509464263916, "id": 29 }, { @@ -4800,12 +4167,12 @@ "id": 51 } ], - "leftModuleId": 8078887273046425, + "leftModuleId": 7744264450943662, "rightModuleId": 1629089543055674, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -4818,7 +4185,7 @@ } }, "pos": [ - 61, + 64, 1 ] }, @@ -4865,7 +4232,7 @@ "id": 8 }, { - "value": 0.26585954427719116, + "value": 0.32771065831184387, "id": 9 }, { @@ -5034,7 +4401,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -5047,7 +4414,7 @@ } }, "pos": [ - 73, + 76, 1 ] }, @@ -5094,7 +4461,7 @@ "id": 8 }, { - "value": 0.39957103133201599, + "value": 0.32771065831184387, "id": 9 }, { @@ -5303,7 +4670,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -5319,38 +4686,502 @@ } }, "pos": [ - 85, - 1 + 88, + 1 + ] + }, + { + "id": 8500492434533465, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": 1.5479965209960938, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 1.3262277841567993, + "id": 2 + }, + { + "value": -60.0, + "id": 3 + }, + { + "value": 70.0, + "id": 4 + }, + { + "value": -0.12199990451335907, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 1.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + } + ], + "leftModuleId": 7411284708330475, + "rightModuleId": 1, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 100, + 1 + ] + }, + { + "id": 359762865999381, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.90200126171112061, + "id": 1 + }, + { + "value": 0.39879244565963745, + "id": 2 + }, + { + "value": 0.45300984382629395, + "id": 3 + }, + { + "value": 0.60240930318832397, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 2859633263682263, + "rightModuleId": 1748021940156784, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Lead Dist", + "Bass Top", + "Dist Tone", + "Chord Dist", + "No name", + "No name", + "Lead", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 9, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 24, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 4, + "rangeMax": 0.44400703907012939, + "rangeMin": 0.0 + }, + { + "moduleId": 7354440315312540, + "paramId": 21, + "rangeMax": 0.67599606513977051, + "rangeMin": 0.75699460506439209 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 1, + "rangeMax": 0.39900767803192139, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 14, + 0 ] }, { - "id": 8500492434533465, - "plugin": "SurgeXTRack", - "model": "SurgeXTWaveshaper", + "id": 1748021940156784, + "plugin": "MindMeldModular", + "model": "PatchMaster", "version": "2.0", "params": [ { - "value": 13.206838607788086, + "value": 0.0, "id": 0 }, { - "value": 0.0, + "value": 0.92800092697143555, "id": 1 }, { - "value": 1.0, + "value": 0.36505457758903503, "id": 2 }, { - "value": -60.0, + "value": 0.45300984382629395, "id": 3 }, { - "value": 70.0, + "value": 0.35060781240463257, "id": 4 }, { - "value": -0.12199990451335907, + "value": 0.75903826951980591, "id": 5 }, { @@ -5360,109 +5191,297 @@ { "value": 0.0, "id": 7 - }, - { - "value": 0.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - }, - { - "value": 0.0, - "id": 10 - }, - { - "value": 0.0, - "id": 11 - }, - { - "value": 0.0, - "id": 12 - }, - { - "value": 0.0, - "id": 13 - }, - { - "value": 0.0, - "id": 14 - }, - { - "value": 0.0, - "id": 15 - }, - { - "value": 0.0, - "id": 16 - }, - { - "value": 0.0, - "id": 17 - }, - { - "value": 0.0, - "id": 18 - }, - { - "value": 0.0, - "id": 19 - }, - { - "value": 0.0, - "id": 20 - }, - { - "value": 0.0, - "id": 21 - }, - { - "value": 0.0, - "id": 22 - }, - { - "value": 0.0, - "id": 23 - }, - { - "value": 0.0, - "id": 24 - }, - { - "value": 1.0, - "id": 25 - }, - { - "value": 0.0, - "id": 26 - }, - { - "value": 0.0, - "id": 27 } ], - "leftModuleId": 7411284708330475, - "rightModuleId": 1, + "leftModuleId": 359762865999381, + "rightModuleId": 6532964214833122, "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - } + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Bass Top", + "Bass Top", + "Filer Cutoff", + "Chord Dist", + "No name", + "No name", + "Bass", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 10, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 29, + "rangeMax": 0.85500186681747437, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 1202888979525309, + "paramId": 9, + "rangeMax": 0.70200371742248535, + "rangeMin": 0.43799790740013123 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2120522391757438, + "paramId": 0, + "rangeMax": 0.7510036826133728, + "rangeMin": 0.2460002601146698 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] }, "pos": [ - 97, - 1 + 18, + 0 ] }, { - "id": 2859633263682263, + "id": 6532964214833122, "plugin": "MindMeldModular", "model": "PatchMaster", "version": "2.0", @@ -5472,19 +5491,19 @@ "id": 0 }, { - "value": 0.0, + "value": 0.89600133895874023, "id": 1 }, { - "value": 0.0, + "value": 0.6337316632270813, "id": 2 }, { - "value": 0.51688289642333984, + "value": 0.45300984382629395, "id": 3 }, { - "value": 0.21083655953407288, + "value": 0.61325019598007202, "id": 4 }, { @@ -5500,13 +5519,14 @@ "id": 7 } ], - "rightModuleId": 359762865999381, + "leftModuleId": 1748021940156784, + "rightModuleId": 7545907193641280, "data": { "miscSettings": 65793, "miscSettings2": 1, "tileInfos": [ - 180, - 180, + 181, + 217, 179, 179, 179, @@ -5523,15 +5543,15 @@ 155 ], "tileNames": [ - "Reset", - "Run", - "Lead Dist", + "Mute", + "Level", + "Chord Dist", "Bass Top", - "Dist Tone", + "Ringmod", "Chord Dist", "No name", "No name", - "Control", + "Chods", "No name", "No name", "No name", @@ -5542,8 +5562,8 @@ ], "maps": [ { - "moduleId": 3492788997026115, - "paramId": 12, + "moduleId": 7693134582131517, + "paramId": 8, "rangeMax": 1.0, "rangeMin": 0.0 }, @@ -5566,7 +5586,7 @@ "rangeMin": 0.0 }, { - "moduleId": -1, + "moduleId": 7693134582131517, "paramId": 0, "rangeMax": 1.0, "rangeMin": 0.0 @@ -5590,9 +5610,9 @@ "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, + "moduleId": 2364063745493562, + "paramId": 2, + "rangeMax": 0.3600081205368042, "rangeMin": 0.0 }, { @@ -5638,9 +5658,9 @@ "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, + "moduleId": 2364063745493562, + "paramId": 5, + "rangeMax": 0.49200648069381714, "rangeMin": 0.0 }, { @@ -5746,10 +5766,10 @@ ], "tileOrders": [ 8, + 2, + 4, 0, - -1, - -1, - -1, + 1, -1, -1, -1, @@ -5782,23 +5802,7 @@ ] }, "pos": [ - 7, - 0 - ] - }, - { - "id": 3538881790933672, - "plugin": "MindMeldModular", - "model": "PatchMasterBlank", - "version": "2.0", - "params": [], - "leftModuleId": 8631911439676095, - "rightModuleId": 7579603213780856, - "data": { - "facePlate": 0 - }, - "pos": [ - 65, + 22, 0 ] }, @@ -5809,7 +5813,7 @@ "version": "2.0", "params": [ { - "value": 1.1885021924972534, + "value": 1.1899975538253784, "id": 0 } ], @@ -5818,7 +5822,7 @@ "dcFilter": true }, "pos": [ - 109, + 112, 1 ] } @@ -5984,14 +5988,6 @@ "inputId": 0, "color": "#e8ff52" }, - { - "id": 4218135157649869, - "outputModuleId": 8858399717280256, - "outputId": 0, - "inputModuleId": 5599750386095483, - "inputId": 2, - "color": "#a8ff52" - }, { "id": 2550860768686067, "outputModuleId": 7614703401631065, @@ -6008,14 +6004,6 @@ "inputId": 0, "color": "#52ffff" }, - { - "id": 6208990526502806, - "outputModuleId": 8451952277485002, - "outputId": 0, - "inputModuleId": 7354440315312540, - "inputId": 2, - "color": "#527dff" - }, { "id": 3879998451215591, "outputModuleId": 3492788997026115, @@ -6336,14 +6324,6 @@ "inputId": 2, "color": "#e8ff52" }, - { - "id": 6602799437633275, - "outputModuleId": 3492788997026115, - "outputId": 2, - "inputModuleId": 8451952277485002, - "inputId": 2, - "color": "#67ff52" - }, { "id": 192850560558353, "outputModuleId": 3492788997026115, @@ -6367,6 +6347,38 @@ "inputModuleId": 1772638206753921, "inputId": 2, "color": "#a8ff52" + }, + { + "id": 2398088907667742, + "outputModuleId": 8631911439676095, + "outputId": 0, + "inputModuleId": 7744264450943662, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 2878078552254813, + "outputModuleId": 7744264450943662, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 8, + "color": "#ff9352" + }, + { + "id": 4221700082511182, + "outputModuleId": 7545907193641280, + "outputId": 0, + "inputModuleId": 8631911439676095, + "inputId": 5, + "color": "#ff5252" + }, + { + "id": 655041172928169, + "outputModuleId": 8858399717280256, + "outputId": 0, + "inputModuleId": 5599750386095483, + "inputId": 2, + "color": "#e8ff52" } ] } From 76cdce063cd16ab2558c5de802995d134335a151 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 24 Dec 2022 20:42:58 +0000 Subject: [PATCH 169/451] Fix rebuilds with different NOPLUGINS Signed-off-by: falkTX --- plugins/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/Makefile b/plugins/Makefile index e6f7057d..515378b6 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -297,6 +297,11 @@ FUNDAMENTAL_CUSTOM = $(DRWAV) # PLUGIN_FILES += $(wildcard ZamAudio/src/*.cpp) +# -------------------------------------------------------------- +# noplugins build + +NOPLUGIN_FILES = $(PLUGIN_FILES:%=%) + ifneq ($(NOPLUGINS),true) # -------------------------------------------------------------- # 21kHz @@ -1534,17 +1539,24 @@ endif PLUGIN_OBJS = $(PLUGIN_FILES:%=$(BUILD_DIR)/%.o) PLUGIN_OBJS += $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.o) +NOPLUGIN_OBJS = $(NOPLUGIN_FILES:%=$(BUILD_DIR)/%.o) + .PRECIOUS: $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.c) # function for custom module names macro custom_module_names = -D${1}=${2}${1} -Dmodel${1}=model${2}${1} -D${1}Widget=${2}${1}Widget custom_per_file_names = -D${1}=${2}_${1} -$(TARGET): $(PLUGIN_OBJS) +plugins.a: $(PLUGIN_OBJS) @echo "Creating $@" $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ +noplugins.a: $(NOPLUGIN_OBJS) + @echo "Creating $@" $(NOPLUGIN_OBJS) + $(SILENT)rm -f $@ + $(SILENT)$(AR) crs $@ $^ + $(BUILD_DIR)/%.bin.c: % ../deps/res2c.py -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Generating $*.bin.c" From 058ad891d2e3795b61d18a82323ae19ff6b5567d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 24 Dec 2022 21:59:04 +0000 Subject: [PATCH 170/451] Move some code around to help remote tool later Signed-off-by: falkTX --- plugins/Cardinal/src/plugincontext.hpp | 7 + src/CardinalCommon.cpp | 113 +++++++++ src/CardinalPlugin.cpp | 71 +----- src/CardinalRemote/Makefile | 147 ++++++++++-- src/CardinalRemote/RemoteUI.cpp | 313 +++++++++++++++++++++---- src/CardinalRemote/RemoteUI.hpp | 11 +- src/CardinalRemote/main.cpp | 80 ++++++- src/CardinalUI.cpp | 34 --- src/PluginContext.hpp | 8 +- src/custom/glfw.cpp | 16 +- src/override/Window.cpp | 131 ++++++++++- 11 files changed, 740 insertions(+), 191 deletions(-) diff --git a/plugins/Cardinal/src/plugincontext.hpp b/plugins/Cardinal/src/plugincontext.hpp index f48b2a83..e0877842 100644 --- a/plugins/Cardinal/src/plugincontext.hpp +++ b/plugins/Cardinal/src/plugincontext.hpp @@ -29,6 +29,12 @@ // ----------------------------------------------------------------------------------------------------------- // from PluginContext.hpp +#ifndef HEADLESS +START_NAMESPACE_DGL +class NanoTopLevelWidget; +END_NAMESPACE_DGL +#endif + START_NAMESPACE_DISTRHO static constexpr const uint32_t kModuleParameters = 24; @@ -68,6 +74,7 @@ struct CardinalPluginContext : rack::Context { uint32_t midiEventCount; Plugin* const plugin; #ifndef HEADLESS + DGL_NAMESPACE::NanoTopLevelWidget* tlw; UI* ui; #endif CardinalPluginContext(Plugin* const p); diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index ff93cc75..4de81006 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -59,6 +59,115 @@ const std::string CARDINAL_VERSION = "22.12"; +START_NAMESPACE_DISTRHO + +// ----------------------------------------------------------------------------------------------------------- + +void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index, bool started) +{ + DISTRHO_SAFE_ASSERT_RETURN(pcontext->ui != nullptr,); + + if (started) + { + pcontext->ui->editParameter(index, true); + pcontext->ui->setParameterValue(index, pcontext->parameters[index]); + } + else + { + pcontext->ui->editParameter(index, false); + } +} + +// -------------------------------------------------------------------------------------------------------------------- + +bool CardinalPluginContext::addIdleCallback(IdleCallback* const cb) const +{ + if (ui == nullptr) + return false; + + ui->addIdleCallback(cb); + return true; +} + +void CardinalPluginContext::removeIdleCallback(IdleCallback* const cb) const +{ + if (ui == nullptr) + return; + + ui->removeIdleCallback(cb); +} + +void CardinalPluginContext::writeMidiMessage(const rack::midi::Message& message, const uint8_t channel) +{ + if (bypassed) + return; + + const size_t size = message.bytes.size(); + DISTRHO_SAFE_ASSERT_RETURN(size > 0,); + DISTRHO_SAFE_ASSERT_RETURN(message.frame >= 0,); + + MidiEvent event; + event.frame = message.frame; + + switch (message.bytes[0] & 0xF0) + { + case 0x80: + case 0x90: + case 0xA0: + case 0xB0: + case 0xE0: + event.size = 3; + break; + case 0xC0: + case 0xD0: + event.size = 2; + break; + case 0xF0: + switch (message.bytes[0] & 0x0F) + { + case 0x0: + case 0x4: + case 0x5: + case 0x7: + case 0x9: + case 0xD: + // unsupported + return; + case 0x1: + case 0x2: + case 0x3: + case 0xE: + event.size = 3; + break; + case 0x6: + case 0x8: + case 0xA: + case 0xB: + case 0xC: + case 0xF: + event.size = 1; + break; + } + break; + default: + // invalid + return; + } + + DISTRHO_SAFE_ASSERT_RETURN(size >= event.size,); + + std::memcpy(event.data, message.bytes.data(), event.size); + + if (channel != 0 && event.data[0] < 0xF0) + event.data[0] |= channel & 0x0F; + + plugin->writeMidiEvent(event); +} + +END_NAMESPACE_DISTRHO + +// -------------------------------------------------------------------------------------------------------------------- + namespace rack { bool isStandalone() @@ -118,6 +227,8 @@ std::string homeDir() } // namespace rack +// -------------------------------------------------------------------------------------------------------------------- + namespace patchUtils { @@ -289,6 +400,8 @@ void openBrowser(const std::string& url) } +// -------------------------------------------------------------------------------------------------------------------- + void async_dialog_filebrowser(const bool saving, const char* const defaultName, const char* const startDir, diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 8d93932a..de654ea2 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -430,75 +430,6 @@ struct Initializer // ----------------------------------------------------------------------------------------------------------- -void CardinalPluginContext::writeMidiMessage(const rack::midi::Message& message, const uint8_t channel) -{ - if (bypassed) - return; - - const size_t size = message.bytes.size(); - DISTRHO_SAFE_ASSERT_RETURN(size > 0,); - DISTRHO_SAFE_ASSERT_RETURN(message.frame >= 0,); - - MidiEvent event; - event.frame = message.frame; - - switch (message.bytes[0] & 0xF0) - { - case 0x80: - case 0x90: - case 0xA0: - case 0xB0: - case 0xE0: - event.size = 3; - break; - case 0xC0: - case 0xD0: - event.size = 2; - break; - case 0xF0: - switch (message.bytes[0] & 0x0F) - { - case 0x0: - case 0x4: - case 0x5: - case 0x7: - case 0x9: - case 0xD: - // unsupported - return; - case 0x1: - case 0x2: - case 0x3: - case 0xE: - event.size = 3; - break; - case 0x6: - case 0x8: - case 0xA: - case 0xB: - case 0xC: - case 0xF: - event.size = 1; - break; - } - break; - default: - // invalid - return; - } - - DISTRHO_SAFE_ASSERT_RETURN(size >= event.size,); - - std::memcpy(event.data, message.bytes.data(), event.size); - - if (channel != 0 && event.data[0] < 0xF0) - event.data[0] |= channel & 0x0F; - - plugin->writeMidiEvent(event); -} - -// ----------------------------------------------------------------------------------------------------------- - struct ScopedContext { ScopedContext(const CardinalBasePlugin* const plugin) { @@ -1393,6 +1324,6 @@ Plugin* createPlugin() return new CardinalPlugin(); } -// ----------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- END_NAMESPACE_DISTRHO diff --git a/src/CardinalRemote/Makefile b/src/CardinalRemote/Makefile index 8c0666f1..61dadd04 100644 --- a/src/CardinalRemote/Makefile +++ b/src/CardinalRemote/Makefile @@ -7,8 +7,11 @@ # -------------------------------------------------------------- # Carla stuff -CWD = ../../carla/source +ifneq ($(STATIC_BUILD),true) + STATIC_PLUGIN_TARGET = true + +CWD = ../../carla/source include $(CWD)/Makefile.deps.mk CARLA_BUILD_DIR = ../../carla/build @@ -23,7 +26,9 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_engine_ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_plugin.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/native-plugins.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/audio_decoder.a +ifneq ($(WASM),true) CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/jackbridge.min.a +endif CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/sfzero.a @@ -31,10 +36,17 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a +endif # STATIC_BUILD + # -------------------------------------------------------------- # Import base definitions +DISTRHO_NAMESPACE = CardinalDISTRHO +DGL_NAMESPACE = CardinalDGL +NVG_DISABLE_SKIPPING_WHITESPACE = true +NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST USE_NANOVG_FBO = true +WASM_EXCEPTIONS = true include ../../dpf/Makefile.base.mk # -------------------------------------------------------------- @@ -57,7 +69,11 @@ endif # -------------------------------------------------------------- # Extra libraries to link against +ifeq ($(NOPLUGINS),true) +RACK_EXTRA_LIBS = ../../plugins/noplugins.a +else RACK_EXTRA_LIBS = ../../plugins/plugins.a +endif RACK_EXTRA_LIBS += ../rack.a RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libquickjs.a @@ -74,22 +90,51 @@ RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libzstd.a endif # -------------------------------------------------------------- +# surgext libraries + +ifneq ($(NOPLUGINS),true) +SURGE_DEP_PATH = $(abspath ../../deps/surge-build) +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libsurge-common.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libjuce_dsp_rack_sub.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/airwindows/libairwindows.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/eurorack/libeurorack.a +ifeq ($(DEBUG),true) +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/fmt/libfmtd.a +else +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/fmt/libfmt.a +endif +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sqlite-3.23.3/libsqlite.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libsst-plugininfra.a +ifneq ($(WINDOWS),true) +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/filesystem/libfilesystem.a +endif +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a +RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a +endif + +# -------------------------------------------------------------- + +# FIXME +ifeq ($(CIBUILD)$(WASM),truetrue) +ifneq ($(STATIC_BUILD),true) +STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm +endif +endif EXTRA_DEPENDENCIES = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) EXTRA_LIBS = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) $(STATIC_CARLA_PLUGIN_LIBS) -ifeq ($(shell pkg-config --exists fftw3f && echo true),true) +ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) EXTRA_DEPENDENCIES += ../../deps/aubio/libaubio.a EXTRA_LIBS += ../../deps/aubio/libaubio.a EXTRA_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) endif -# -------------------------------------------------------------- -# Extra flags for liblo - -BASE_FLAGS += -DHAVE_LIBLO -BASE_FLAGS += $(LIBLO_FLAGS) -LINK_FLAGS += $(LIBLO_LIBS) +ifneq ($(NOPLUGINS),true) +ifeq ($(MACOS),true) +EXTRA_LIBS += -framework Accelerate +endif +endif # -------------------------------------------------------------- # Extra flags for VCV stuff @@ -106,11 +151,11 @@ BASE_FLAGS += -DPRIVATE= BASE_FLAGS += -I.. BASE_FLAGS += -I../../dpf/dgl/src/nanovg BASE_FLAGS += -I../../include -BASE_FLAGS += -I../../include/neon-compat +BASE_FLAGS += -I../../include/simd-compat BASE_FLAGS += -I../Rack/include ifeq ($(SYSDEPS),true) BASE_FLAGS += -DCARDINAL_SYSDEPS -BASE_FLAGS += $(shell pkg-config --cflags jansson libarchive samplerate speexdsp) +BASE_FLAGS += $(shell $(PKG_CONFIG) --cflags jansson libarchive samplerate speexdsp) else BASE_FLAGS += -DZSTDLIB_VISIBILITY= BASE_FLAGS += -I../Rack/dep/include @@ -119,41 +164,98 @@ BASE_FLAGS += -I../Rack/dep/glfw/include BASE_FLAGS += -I../Rack/dep/nanosvg/src BASE_FLAGS += -I../Rack/dep/oui-blendish -ifeq ($(WASM),true) -BASE_FLAGS += -DNANOVG_GLES2=1 -BASE_FLAGS += -msse -msse2 -msse3 -msimd128 -else ifneq ($(HAIKU),true) +ifeq ($(HEADLESS),true) +BASE_FLAGS += -DHEADLESS +endif + +ifeq ($(MOD_BUILD),true) +BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff +endif + +ifneq ($(WASM),true) +ifneq ($(HAIKU),true) BASE_FLAGS += -pthread endif +endif ifeq ($(WINDOWS),true) BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN +BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../../include/mingw-compat BASE_FLAGS += -I../../include/mingw-std-threads endif +ifeq ($(USE_GLES2),true) +BASE_FLAGS += -DNANOVG_GLES2_FORCED +else ifeq ($(USE_GLES3),true) +BASE_FLAGS += -DNANOVG_GLES3_FORCED +endif + BUILD_C_FLAGS += -std=gnu11 BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -std=gnu++17 +endif 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 BASE_FLAGS += -Wno-unused-parameter BASE_FLAGS += -Wno-unused-variable -# -------------------------------------------------------------- -# extra linker flags - -ifeq ($(HAIKU),true) +ifeq ($(WASM),true) +ifneq ($(STATIC_BUILD),true) +LINK_FLAGS += --use-preload-plugins +LINK_FLAGS += --preload-file=./jsfx +LINK_FLAGS += --preload-file=./lv2 +endif +LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources +LINK_FLAGS += --use-preload-cache +ifneq ($(NOPLUGINS),true) +SYMLINKED_DIRS_RESOURCES = +# find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort +SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/chopin +SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/debussy +SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/goldberg +SYMLINKED_DIRS_RESOURCES += cf/playeroscs +SYMLINKED_DIRS_RESOURCES += DrumKit/res/samples +SYMLINKED_DIRS_RESOURCES += Fundamental/presets +SYMLINKED_DIRS_RESOURCES += GrandeModular/presets +SYMLINKED_DIRS_RESOURCES += LyraeModules/presets +SYMLINKED_DIRS_RESOURCES += Meander/res +SYMLINKED_DIRS_RESOURCES += MindMeldModular/presets +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/CommunityPresets +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/CommunityShapes +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/MindMeldPresets +SYMLINKED_DIRS_RESOURCES += MindMeldModular/res/ShapeMaster/MindMeldShapes +SYMLINKED_DIRS_RESOURCES += Mog/res +SYMLINKED_DIRS_RESOURCES += nonlinearcircuits/res +SYMLINKED_DIRS_RESOURCES += Orbits/presets +SYMLINKED_DIRS_RESOURCES += stoermelder-packone/presets +SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/fx_presets +SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/wavetables +SYMLINKED_DIRS_RESOURCES += surgext/patches +SYMLINKED_DIRS_RESOURCES += surgext/presets +LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) +endif +LINK_FLAGS += -sALLOW_MEMORY_GROWTH +LINK_FLAGS += -sINITIAL_MEMORY=64Mb +LINK_FLAGS += -sLZ4=1 +LINK_FLAGS += --shell-file=../emscripten/shell.html +LINK_FLAGS += -O3 +else ifeq ($(HAIKU),true) LINK_FLAGS += -lpthread else LINK_FLAGS += -pthread @@ -181,7 +283,7 @@ EXTRA_LIBS += -lws2_32 -lwinmm endif ifeq ($(SYSDEPS),true) -EXTRA_LIBS += $(shell pkg-config --libs jansson libarchive samplerate speexdsp) +EXTRA_LIBS += $(shell $(PKG_CONFIG) --libs jansson libarchive samplerate speexdsp) endif ifeq ($(WITH_LTO),true) @@ -193,6 +295,13 @@ LINK_FLAGS += -Wno-stringop-overflow endif endif +# -------------------------------------------------------------- +# Extra flags for liblo + +BASE_FLAGS += -DHAVE_LIBLO +BASE_FLAGS += $(LIBLO_FLAGS) +LINK_FLAGS += $(LIBLO_LIBS) + # -------------------------------------------------------------- # fallback path to resource files diff --git a/src/CardinalRemote/RemoteUI.cpp b/src/CardinalRemote/RemoteUI.cpp index 1295f13c..97f40383 100644 --- a/src/CardinalRemote/RemoteUI.cpp +++ b/src/CardinalRemote/RemoteUI.cpp @@ -17,7 +17,7 @@ #include "RemoteUI.hpp" -// #include +#include // #include #include #include @@ -26,66 +26,293 @@ #include #include +#include "AsyncDialog.hpp" +#include "WindowParameters.hpp" + +// -------------------------------------------------------------------------------------------------------------------- + +namespace rack { +namespace app { + widget::Widget* createMenuBar(bool isStandalone); +} +namespace window { + void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw); + void WindowSetMods(Window* window, int mods); + void WindowSetInternalSize(rack::window::Window* window, math::Vec size); +} +} + +// -------------------------------------------------------------------------------------------------------------------- + CardinalRemoteUI::CardinalRemoteUI(Window& window, const std::string& templatePath) - : NanoTopLevelWidget(window), - context(nullptr) + : NanoTopLevelWidget(window) { - // create unique temporary path for this instance - try { - char uidBuf[24]; - const std::string tmp = rack::system::getTempDirectory(); + CardinalPluginContext& context(*static_cast(rack::contextGet())); + context.nativeWindowId = getWindow().getNativeWindowHandle(); + context.tlw = this; - for (int i=1;; ++i) - { - std::snprintf(uidBuf, sizeof(uidBuf), "CardinalRemote.%04d", i); - const std::string trypath = rack::system::join(tmp, uidBuf); - - if (! rack::system::exists(trypath)) - { - if (rack::system::createDirectories(trypath)) - autosavePath = trypath; - break; - } - } - } DISTRHO_SAFE_EXCEPTION("create unique temporary path"); + window.setIgnoringKeyRepeat(true); + context.nativeWindowId = window.getNativeWindowHandle(); - rack::contextSet(&context); + const double scaleFactor = getScaleFactor(); - context.bufferSize = 512; - rack::settings::sampleRate = context.sampleRate = 48000; + setGeometryConstraints(648 * scaleFactor, 538 * scaleFactor); - context.engine = new rack::engine::Engine; - context.engine->setSampleRate(context.sampleRate); + if (scaleFactor != 1.0) + setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor); - context.history = new rack::history::State; - context.patch = new rack::patch::Manager; - context.patch->autosavePath = autosavePath; - context.patch->templatePath = templatePath; + rack::window::WindowSetPluginRemote(context.window, this); - context.event = new rack::widget::EventState; - context.scene = new rack::app::Scene; - context.event->rootWidget = context.scene; - context.window = new rack::window::Window; + if (rack::widget::Widget* const menuBar = context.scene->menuBar) + { + context.scene->removeChild(menuBar); + delete menuBar; + } - context.patch->loadTemplate(); - context.scene->rackScroll->reset(); + context.scene->menuBar = rack::app::createMenuBar(true); + context.scene->addChildBelow(context.scene->menuBar, context.scene->rackScroll); - context.nativeWindowId = getWindow().getNativeWindowHandle(); + // hide "Browse VCV Library" button + rack::widget::Widget* const browser = context.scene->browser->children.back(); + rack::widget::Widget* const headerLayout = browser->children.front(); + rack::widget::Widget* const libraryButton = headerLayout->children.back(); + libraryButton->hide(); + + // Report to user if something is wrong with the installation + std::string errorMessage; + + if (rack::asset::systemDir.empty()) + { + errorMessage = "Failed to locate Cardinal plugin bundle.\n" + "Install Cardinal with its plugin bundle folder intact and try again."; + } + else if (! rack::system::exists(rack::asset::systemDir)) + { + errorMessage = rack::string::f("System directory \"%s\" does not exist. " + "Make sure Cardinal was downloaded and installed correctly.", + rack::asset::systemDir.c_str()); + } + + if (! errorMessage.empty()) + { + static bool shown = false; + + if (! shown) + { + shown = true; + asyncDialog::create(errorMessage.c_str()); + } + } + + context.window->step(); + + // WindowParametersSetCallback(context.window, this); } CardinalRemoteUI::~CardinalRemoteUI() { - rack::contextSet(&context); - + CardinalPluginContext& context(*static_cast(rack::contextGet())); context.nativeWindowId = 0; - context.patch->clear(); - - if (! autosavePath.empty()) - rack::system::removeRecursively(autosavePath); } void CardinalRemoteUI::onNanoDisplay() { - rack::contextSet(&context); + CardinalPluginContext& context(*static_cast(rack::contextGet())); context.window->step(); + + // TODO + repaint(); +} + +// -------------------------------------------------------------------------------------------------------------------- + +static int glfwMods(const uint mod) noexcept +{ + int mods = 0; + + if (mod & kModifierControl) + mods |= GLFW_MOD_CONTROL; + if (mod & kModifierShift) + mods |= GLFW_MOD_SHIFT; + if (mod & kModifierAlt) + mods |= GLFW_MOD_ALT; + if (mod & kModifierSuper) + mods |= GLFW_MOD_SUPER; + + /* + if (glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS) + mods |= GLFW_MOD_SHIFT; + if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) + mods |= GLFW_MOD_CONTROL; + if (glfwGetKey(win, GLFW_KEY_LEFT_ALT) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_ALT) == GLFW_PRESS) + mods |= GLFW_MOD_ALT; + if (glfwGetKey(win, GLFW_KEY_LEFT_SUPER) == GLFW_PRESS || glfwGetKey(win, GLFW_KEY_RIGHT_SUPER) == GLFW_PRESS) + mods |= GLFW_MOD_SUPER; + */ + + return mods; +} + +bool CardinalRemoteUI::onMouse(const MouseEvent& ev) +{ + if (ev.press) + getWindow().focus(); + + const int action = ev.press ? GLFW_PRESS : GLFW_RELEASE; + int mods = glfwMods(ev.mod); + + int button; + + switch (ev.button) + { + case 1: button = GLFW_MOUSE_BUTTON_LEFT; break; + case 2: button = GLFW_MOUSE_BUTTON_RIGHT; break; + case 3: button = GLFW_MOUSE_BUTTON_MIDDLE; break; + default: + button = ev.button; + break; + } + + #ifdef DISTRHO_OS_MAC + // Remap Ctrl-left click to right click on macOS + if (button == GLFW_MOUSE_BUTTON_LEFT && (mods & RACK_MOD_MASK) == GLFW_MOD_CONTROL) { + button = GLFW_MOUSE_BUTTON_RIGHT; + mods &= ~GLFW_MOD_CONTROL; + } + // Remap Ctrl-shift-left click to middle click on macOS + if (button == GLFW_MOUSE_BUTTON_LEFT && (mods & RACK_MOD_MASK) == (GLFW_MOD_CONTROL | GLFW_MOD_SHIFT)) { + button = GLFW_MOUSE_BUTTON_MIDDLE; + mods &= ~(GLFW_MOD_CONTROL | GLFW_MOD_SHIFT); + } + #endif + + CardinalPluginContext* context = static_cast(rack::contextGet()); + return context->event->handleButton(lastMousePos, button, action, mods); +} + +bool CardinalRemoteUI::onMotion(const MotionEvent& ev) +{ + const rack::math::Vec mousePos = rack::math::Vec(ev.pos.getX(), ev.pos.getY()).div(getScaleFactor()).round(); + const rack::math::Vec mouseDelta = mousePos.minus(lastMousePos); + + lastMousePos = mousePos; + + CardinalPluginContext* context = static_cast(rack::contextGet()); + return context->event->handleHover(mousePos, mouseDelta); +} + +bool CardinalRemoteUI::onScroll(const ScrollEvent& ev) +{ + rack::math::Vec scrollDelta = rack::math::Vec(ev.delta.getX(), ev.delta.getY()); + #ifndef DISTRHO_OS_MAC + scrollDelta = scrollDelta.mult(50.0); + #endif + + const int mods = glfwMods(ev.mod); + + CardinalPluginContext* context = static_cast(rack::contextGet()); + return context->event->handleScroll(lastMousePos, scrollDelta); } + +bool CardinalRemoteUI::onCharacterInput(const CharacterInputEvent& ev) +{ + if (ev.character < ' ' || ev.character >= kKeyDelete) + return false; + + const int mods = glfwMods(ev.mod); + + CardinalPluginContext* context = static_cast(rack::contextGet()); + return context->event->handleText(lastMousePos, ev.character); +} + +bool CardinalRemoteUI::onKeyboard(const KeyboardEvent& ev) +{ + const int action = ev.press ? GLFW_PRESS : GLFW_RELEASE; + const int mods = glfwMods(ev.mod); + + /* These are unsupported in pugl right now + #define GLFW_KEY_KP_0 320 + #define GLFW_KEY_KP_1 321 + #define GLFW_KEY_KP_2 322 + #define GLFW_KEY_KP_3 323 + #define GLFW_KEY_KP_4 324 + #define GLFW_KEY_KP_5 325 + #define GLFW_KEY_KP_6 326 + #define GLFW_KEY_KP_7 327 + #define GLFW_KEY_KP_8 328 + #define GLFW_KEY_KP_9 329 + #define GLFW_KEY_KP_DECIMAL 330 + #define GLFW_KEY_KP_DIVIDE 331 + #define GLFW_KEY_KP_MULTIPLY 332 + #define GLFW_KEY_KP_SUBTRACT 333 + #define GLFW_KEY_KP_ADD 334 + #define GLFW_KEY_KP_ENTER 335 + #define GLFW_KEY_KP_EQUAL 336 + */ + + int key; + switch (ev.key) + { + case '\r': key = GLFW_KEY_ENTER; break; + case '\t': key = GLFW_KEY_TAB; break; + case kKeyBackspace: key = GLFW_KEY_BACKSPACE; break; + case kKeyEscape: key = GLFW_KEY_ESCAPE; break; + case kKeyDelete: key = GLFW_KEY_DELETE; break; + case kKeyF1: key = GLFW_KEY_F1; break; + case kKeyF2: key = GLFW_KEY_F2; break; + case kKeyF3: key = GLFW_KEY_F3; break; + case kKeyF4: key = GLFW_KEY_F4; break; + case kKeyF5: key = GLFW_KEY_F5; break; + case kKeyF6: key = GLFW_KEY_F6; break; + case kKeyF7: key = GLFW_KEY_F7; break; + case kKeyF8: key = GLFW_KEY_F8; break; + case kKeyF9: key = GLFW_KEY_F9; break; + case kKeyF10: key = GLFW_KEY_F10; break; + case kKeyF11: key = GLFW_KEY_F11; break; + case kKeyF12: key = GLFW_KEY_F12; break; + case kKeyLeft: key = GLFW_KEY_LEFT; break; + case kKeyUp: key = GLFW_KEY_UP; break; + case kKeyRight: key = GLFW_KEY_RIGHT; break; + case kKeyDown: key = GLFW_KEY_DOWN; break; + case kKeyPageUp: key = GLFW_KEY_PAGE_UP; break; + case kKeyPageDown: key = GLFW_KEY_PAGE_DOWN; break; + case kKeyHome: key = GLFW_KEY_HOME; break; + case kKeyEnd: key = GLFW_KEY_END; break; + case kKeyInsert: key = GLFW_KEY_INSERT; break; + case kKeyShiftL: key = GLFW_KEY_LEFT_SHIFT; break; + case kKeyShiftR: key = GLFW_KEY_RIGHT_SHIFT; break; + case kKeyControlL: key = GLFW_KEY_LEFT_CONTROL; break; + case kKeyControlR: key = GLFW_KEY_RIGHT_CONTROL; break; + case kKeyAltL: key = GLFW_KEY_LEFT_ALT; break; + case kKeyAltR: key = GLFW_KEY_RIGHT_ALT; break; + case kKeySuperL: key = GLFW_KEY_LEFT_SUPER; break; + case kKeySuperR: key = GLFW_KEY_RIGHT_SUPER; break; + case kKeyMenu: key = GLFW_KEY_MENU; break; + case kKeyCapsLock: key = GLFW_KEY_CAPS_LOCK; break; + case kKeyScrollLock: key = GLFW_KEY_SCROLL_LOCK; break; + case kKeyNumLock: key = GLFW_KEY_NUM_LOCK; break; + case kKeyPrintScreen: key = GLFW_KEY_PRINT_SCREEN; break; + case kKeyPause: key = GLFW_KEY_PAUSE; break; + default: + // glfw expects uppercase + if (ev.key >= 'a' && ev.key <= 'z') + key = ev.key - ('a' - 'A'); + else + key = ev.key; + break; + } + + CardinalPluginContext* context = static_cast(rack::contextGet()); + return context->event->handleKey(lastMousePos, key, ev.keycode, action, mods); +} + +void CardinalRemoteUI::onResize(const ResizeEvent& ev) +{ + NanoTopLevelWidget::onResize(ev); + + CardinalPluginContext* context = static_cast(rack::contextGet()); + if (context->window != nullptr) + WindowSetInternalSize(context->window, rack::math::Vec(ev.size.getWidth(), ev.size.getHeight())); +} + +// -------------------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalRemote/RemoteUI.hpp b/src/CardinalRemote/RemoteUI.hpp index 1ed46965..ca29d28e 100644 --- a/src/CardinalRemote/RemoteUI.hpp +++ b/src/CardinalRemote/RemoteUI.hpp @@ -20,10 +20,11 @@ #include "NanoVG.hpp" #include "PluginContext.hpp" +#include + class CardinalRemoteUI : public NanoTopLevelWidget { - CardinalPluginContext context; - std::string autosavePath; + rack::math::Vec lastMousePos; public: explicit CardinalRemoteUI(Window& window, const std::string& templatePath); @@ -31,6 +32,12 @@ class CardinalRemoteUI : public NanoTopLevelWidget protected: void onNanoDisplay() override; + bool onMouse(const MouseEvent& ev) override; + bool onMotion(const MotionEvent& ev) override; + bool onScroll(const ScrollEvent& ev) override; + bool onCharacterInput(const CharacterInputEvent& ev) override; + bool onKeyboard(const KeyboardEvent& ev) override; + void onResize(const ResizeEvent& ev) override; DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CardinalRemoteUI) }; diff --git a/src/CardinalRemote/main.cpp b/src/CardinalRemote/main.cpp index a2329fea..b5b67880 100644 --- a/src/CardinalRemote/main.cpp +++ b/src/CardinalRemote/main.cpp @@ -20,13 +20,19 @@ #include "RemoteUI.hpp" #include +#include #include #include #include #include +#include +#include #include + +#include "PluginContext.hpp" + namespace rack { namespace plugin { void initStaticPlugins(); @@ -34,6 +40,26 @@ namespace plugin { } } +START_NAMESPACE_DISTRHO + +bool isUsingNativeAudio() noexcept { return false; } +bool supportsAudioInput() { return false; } +bool supportsBufferSizeChanges() { return false; } +bool supportsMIDI() { return false; } +bool isAudioInputEnabled() { return false; } +bool isMIDIEnabled() { return false; } +uint getBufferSize() { return 0; } +bool requestAudioInput() { return false; } +bool requestBufferSizeChange(uint) { return false; } +bool requestMIDI() { return false; } +const char* getPluginFormatName() noexcept { return "Remote"; } + +uint32_t Plugin::getBufferSize() const noexcept { return 128; } +double Plugin::getSampleRate() const noexcept { return 48000; } +bool Plugin::writeMidiEvent(const MidiEvent&) noexcept { return false; } + +END_NAMESPACE_DISTRHO + int main(const int argc, const char* argv[]) { using namespace rack; @@ -42,7 +68,6 @@ int main(const int argc, const char* argv[]) settings::autoCheckUpdates = false; settings::autosaveInterval = 0; settings::devMode = true; - settings::discordUpdateActivity = false; settings::isPlugin = true; settings::skipLoadOnLaunch = true; settings::showTipsOnLaunch = false; @@ -131,17 +156,68 @@ int main(const int argc, const char* argv[]) INFO("Initializing plugin browser DB"); app::browserInit(); + // create unique temporary path for this instance + std::string autosavePath; + + try { + char uidBuf[24]; + const std::string tmp = rack::system::getTempDirectory(); + + for (int i=1;; ++i) + { + std::snprintf(uidBuf, sizeof(uidBuf), "CardinalRemote.%04d", i); + const std::string trypath = rack::system::join(tmp, uidBuf); + + if (! rack::system::exists(trypath)) + { + if (rack::system::createDirectories(trypath)) + autosavePath = trypath; + break; + } + } + } DISTRHO_SAFE_EXCEPTION("create unique temporary path"); + + CardinalPluginContext context(nullptr); + rack::contextSet(&context); + + context.bufferSize = 512; + rack::settings::sampleRate = context.sampleRate = 48000; + + context.engine = new rack::engine::Engine; + context.engine->setSampleRate(context.sampleRate); + + context.history = new rack::history::State; + context.patch = new rack::patch::Manager; + context.patch->autosavePath = autosavePath; + context.patch->templatePath = templatePath; + + context.event = new rack::widget::EventState; + context.scene = new rack::app::Scene; + context.event->rootWidget = context.scene; + context.window = new rack::window::Window; + + context.patch->loadTemplate(); + context.scene->rackScroll->reset(); + Application app; Window win(app); + win.setResizable(true); win.setTitle("CardinalRemote"); ScopedPointer remoteUI; - + { + const Window::ScopedGraphicsContext sgc(win); remoteUI = new CardinalRemoteUI(win, templatePath); } + win.show(); app.exec(); + context.patch->clear(); + + if (! autosavePath.empty()) + rack::system::removeRecursively(autosavePath); + INFO("Clearing asset paths"); asset::bundlePath.clear(); asset::systemDir.clear(); diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 5b1496e2..49caa38c 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -67,40 +67,6 @@ START_NAMESPACE_DISTRHO // ----------------------------------------------------------------------------------------------------------- -bool CardinalPluginContext::addIdleCallback(IdleCallback* const cb) const -{ - if (ui == nullptr) - return false; - - ui->addIdleCallback(cb); - return true; -} - -void CardinalPluginContext::removeIdleCallback(IdleCallback* const cb) const -{ - if (ui == nullptr) - return; - - ui->removeIdleCallback(cb); -} - -void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index, bool started) -{ - DISTRHO_SAFE_ASSERT_RETURN(pcontext->ui != nullptr,); - - if (started) - { - pcontext->ui->editParameter(index, true); - pcontext->ui->setParameterValue(index, pcontext->parameters[index]); - } - else - { - pcontext->ui->editParameter(index, false); - } -} - -// ----------------------------------------------------------------------------------------------------------- - #ifdef DISTRHO_OS_WASM struct WasmWelcomeDialog : rack::widget::OpaqueWidget { diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index c5a22920..933d4163 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -64,13 +64,14 @@ struct CardinalPluginContext : rack::Context { uint32_t midiEventCount; Plugin* const plugin; #ifndef HEADLESS + NanoTopLevelWidget* tlw; UI* ui; #endif CardinalPluginContext(Plugin* const p) - : bufferSize(p->getBufferSize()), + : bufferSize(p != nullptr ? p->getBufferSize() : 0), processCounter(0), - sampleRate(p->getSampleRate()), + sampleRate(p != nullptr ? p->getSampleRate() : 0.0), #if CARDINAL_VARIANT_MAIN variant(kCardinalVariantMain), #elif CARDINAL_VARIANT_FX @@ -105,6 +106,7 @@ struct CardinalPluginContext : rack::Context { midiEventCount(0), plugin(p) #ifndef HEADLESS + , tlw(nullptr) , ui(nullptr) #endif { @@ -169,6 +171,7 @@ class CardinalBaseUI : public UI { filebrowseraction(), filebrowserhandle(nullptr) { + context->tlw = this; context->ui = this; } @@ -177,6 +180,7 @@ class CardinalBaseUI : public UI { if (filebrowserhandle != nullptr) fileBrowserClose(filebrowserhandle); + context->tlw = nullptr; context->ui = nullptr; } }; diff --git a/src/custom/glfw.cpp b/src/custom/glfw.cpp index 250586e9..b4fa62af 100644 --- a/src/custom/glfw.cpp +++ b/src/custom/glfw.cpp @@ -30,10 +30,10 @@ GLFWAPI const char* glfwGetClipboardString(GLFWwindow*) { CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, nullptr); - DISTRHO_SAFE_ASSERT_RETURN(context->ui != nullptr, nullptr); + DISTRHO_SAFE_ASSERT_RETURN(context->tlw != nullptr, nullptr); size_t dataSize; - return static_cast(context->ui->getClipboard(dataSize)); + return static_cast(context->tlw->getClipboard(dataSize)); } GLFWAPI void glfwSetClipboardString(GLFWwindow*, const char* const text) @@ -42,9 +42,9 @@ GLFWAPI void glfwSetClipboardString(GLFWwindow*, const char* const text) CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr,); - DISTRHO_SAFE_ASSERT_RETURN(context->ui != nullptr,); + DISTRHO_SAFE_ASSERT_RETURN(context->tlw != nullptr,); - context->ui->setClipboard(nullptr, text, std::strlen(text)+1); + context->tlw->setClipboard(nullptr, text, std::strlen(text)+1); } GLFWAPI GLFWcursor* glfwCreateStandardCursor(const int shape) @@ -91,18 +91,18 @@ GLFWAPI void glfwSetCursor(GLFWwindow*, GLFWcursor* const cursor) { CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr,); - DISTRHO_SAFE_ASSERT_RETURN(context->ui != nullptr,); + DISTRHO_SAFE_ASSERT_RETURN(context->tlw != nullptr,); - context->ui->setCursor(cursor != nullptr ? cursor->cursorId : kMouseCursorArrow); + context->tlw->setCursor(cursor != nullptr ? cursor->cursorId : kMouseCursorArrow); } GLFWAPI double glfwGetTime(void) { CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, 0.0); - DISTRHO_SAFE_ASSERT_RETURN(context->ui != nullptr, 0.0); + DISTRHO_SAFE_ASSERT_RETURN(context->tlw != nullptr, 0.0); - return context->ui->getApp().getTime(); + return context->tlw->getApp().getTime(); } GLFWAPI const char* glfwGetKeyName(const int key, int) diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 7c9d481b..32fddbbc 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -145,6 +145,7 @@ struct Window::Internal { std::string lastWindowTitle; DISTRHO_NAMESPACE::UI* ui = nullptr; + DGL_NAMESPACE::NanoTopLevelWidget* tlw = nullptr; DISTRHO_NAMESPACE::WindowParameters params; DISTRHO_NAMESPACE::WindowParametersCallback* callback = nullptr; DGL_NAMESPACE::Application hiddenApp; @@ -238,6 +239,112 @@ Window::Window() { #endif } +void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) +{ + // if nanovg context failed, init only bare minimum + if (window->vg == nullptr) + { + if (tlw != nullptr) + { + window->internal->tlw = tlw; + window->internal->size = rack::math::Vec(tlw->getWidth(), tlw->getHeight()); + } + else + { + window->internal->tlw = nullptr; + window->internal->callback = nullptr; + } + return; + } + + if (tlw != nullptr) + { + const GLubyte* vendor = glGetString(GL_VENDOR); + const GLubyte* renderer = glGetString(GL_RENDERER); + const GLubyte* version = glGetString(GL_VERSION); + INFO("Renderer: %s %s", vendor, renderer); + INFO("OpenGL: %s", version); + + window->internal->tlw = tlw; + window->internal->size = rack::math::Vec(tlw->getWidth(), tlw->getHeight()); + + // Set up NanoVG + window->internal->r_vg = tlw->getContext(); +#ifdef NANOVG_GLES2 + window->internal->r_fbVg = nvgCreateSharedGLES2(window->internal->r_vg, NVG_ANTIALIAS); +#else + window->internal->r_fbVg = nvgCreateSharedGL2(window->internal->r_vg, NVG_ANTIALIAS); +#endif + + // swap contexts + window->internal->o_vg = window->vg; + window->internal->o_fbVg = window->fbVg; + window->vg = window->internal->r_vg; + window->fbVg = window->internal->r_fbVg; + + // also for fonts and images + window->uiFont->vg = window->vg; + window->uiFont->handle = loadFallbackFont(window->vg); + for (auto& font : window->internal->fontCache) + { + font.second->vg = window->vg; + font.second->ohandle = font.second->handle; + font.second->handle = nvgCreateFont(window->vg, + font.second->ofilename.c_str(), font.second->ofilename.c_str()); + } + for (auto& image : window->internal->imageCache) + { + image.second->vg = window->vg; + image.second->ohandle = image.second->handle; + image.second->handle = nvgCreateImage(window->vg, image.second->ofilename.c_str(), + NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); + } + + // Init settings + WindowParametersRestore(window); + + widget::Widget::ContextCreateEvent e; + APP->scene->onContextCreate(e); + } + else + { + widget::Widget::ContextDestroyEvent e; + APP->scene->onContextDestroy(e); + + // swap contexts + window->uiFont->vg = window->internal->o_vg; + window->vg = window->internal->o_vg; + window->fbVg = window->internal->o_fbVg; + window->internal->o_vg = nullptr; + window->internal->o_fbVg = nullptr; + + // also for fonts and images + window->uiFont->vg = window->vg; + window->uiFont->handle = loadFallbackFont(window->vg); + for (auto& font : window->internal->fontCache) + { + font.second->vg = window->vg; + font.second->handle = font.second->ohandle; + font.second->ohandle = -1; + } + for (auto& image : window->internal->imageCache) + { + image.second->vg = window->vg; + image.second->handle = image.second->ohandle; + image.second->ohandle = -1; + } + +#if defined NANOVG_GLES2 + nvgDeleteGLES2(window->internal->r_fbVg); +#else + nvgDeleteGL2(window->internal->r_fbVg); +#endif + + window->internal->tlw = nullptr; + window->internal->callback = nullptr; + } +} + void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) { // if nanovg context failed, init only bare minimum @@ -264,6 +371,7 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) INFO("Renderer: %s %s", vendor, renderer); INFO("OpenGL: %s", version); + window->internal->tlw = ui; window->internal->ui = ui; window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); @@ -339,6 +447,7 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) nvgDeleteGL2(window->internal->r_fbVg); #endif + window->internal->tlw = nullptr; window->internal->ui = nullptr; window->internal->callback = nullptr; } @@ -384,8 +493,8 @@ void Window::setSize(math::Vec size) { size = size.max(WINDOW_SIZE_MIN); internal->size = size; - if (DISTRHO_NAMESPACE::UI* const ui = internal->ui) - ui->setSize(internal->size.x, internal->size.y); + if (DGL_NAMESPACE::NanoTopLevelWidget* const tlw = internal->ui) + tlw->setSize(internal->size.x, internal->size.y); } void WindowSetInternalSize(rack::window::Window* const window, math::Vec size) { @@ -453,7 +562,7 @@ static void Window__writeImagePNG(void* context, void* data, int size) { void Window::step() { - DISTRHO_SAFE_ASSERT_RETURN(internal->ui != nullptr,); + DISTRHO_SAFE_ASSERT_RETURN(internal->tlw != nullptr,); if (vg == nullptr) return; @@ -480,12 +589,12 @@ void Window::step() { windowTitle += system::getFilename(APP->patch->path); } if (windowTitle != internal->lastWindowTitle) { - internal->ui->getWindow().setTitle(windowTitle.c_str()); + internal->tlw->getWindow().setTitle(windowTitle.c_str()); internal->lastWindowTitle = windowTitle; } // Get desired pixel ratio - float newPixelRatio = internal->ui->getScaleFactor(); + float newPixelRatio = internal->tlw->getScaleFactor(); if (newPixelRatio != pixelRatio) { pixelRatio = newPixelRatio; APP->event->handleDirty(); @@ -504,8 +613,8 @@ void Window::step() { #endif // Get framebuffer/window ratio - int winWidth = internal->ui->getWidth(); - int winHeight = internal->ui->getHeight(); + int winWidth = internal->tlw->getWidth(); + int winHeight = internal->tlw->getHeight(); int fbWidth = winWidth;// * newPixelRatio; int fbHeight = winHeight;// * newPixelRatio; windowRatio = (float)fbWidth / winWidth; @@ -599,9 +708,9 @@ void Window::screenshotModules(const std::string&, float) { void Window::close() { - DISTRHO_SAFE_ASSERT_RETURN(internal->ui != nullptr,); + DISTRHO_SAFE_ASSERT_RETURN(internal->tlw != nullptr,); - internal->ui->getWindow().close(); + internal->tlw->getWindow().close(); } @@ -610,7 +719,7 @@ void Window::cursorLock() { if (!settings::allowCursorLock) return; - emscripten_request_pointerlock(internal->ui->getWindow().getApp().getClassName(), false); + emscripten_request_pointerlock(internal->tlw->getWindow().getApp().getClassName(), false); #endif } @@ -643,7 +752,7 @@ int Window::getMods() { void Window::setFullScreen(const bool fullscreen) { #ifdef DISTRHO_OS_WASM if (fullscreen) - emscripten_request_fullscreen(internal->ui->getWindow().getApp().getClassName(), false); + emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false); else emscripten_exit_fullscreen(); #endif From c0fc6cd78b315e26e205692cf462b597f0ce71a6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 25 Dec 2022 01:23:31 +0000 Subject: [PATCH 171/451] Import all relevant code to remote tool Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 5 - src/CardinalRemote/RemoteUI.cpp | 197 +++++++++++++++++++++++--------- src/CardinalRemote/RemoteUI.hpp | 50 +++++++- src/CardinalRemote/main.cpp | 165 ++++++++++++++++++-------- 4 files changed, 310 insertions(+), 107 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index de654ea2..fd26266d 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -87,11 +87,6 @@ namespace plugin { void initStaticPlugins(); void destroyStaticPlugins(); } -#ifndef HEADLESS -namespace window { -void WindowInit(Window* window, DISTRHO_NAMESPACE::Plugin* plugin); -} -#endif } START_NAMESPACE_DISTRHO diff --git a/src/CardinalRemote/RemoteUI.cpp b/src/CardinalRemote/RemoteUI.cpp index 97f40383..95555657 100644 --- a/src/CardinalRemote/RemoteUI.cpp +++ b/src/CardinalRemote/RemoteUI.cpp @@ -27,53 +27,31 @@ #include #include "AsyncDialog.hpp" -#include "WindowParameters.hpp" - -// -------------------------------------------------------------------------------------------------------------------- - -namespace rack { -namespace app { - widget::Widget* createMenuBar(bool isStandalone); -} -namespace window { - void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw); - void WindowSetMods(Window* window, int mods); - void WindowSetInternalSize(rack::window::Window* window, math::Vec size); -} -} // -------------------------------------------------------------------------------------------------------------------- CardinalRemoteUI::CardinalRemoteUI(Window& window, const std::string& templatePath) : NanoTopLevelWidget(window) { - CardinalPluginContext& context(*static_cast(rack::contextGet())); - context.nativeWindowId = getWindow().getNativeWindowHandle(); - context.tlw = this; - - window.setIgnoringKeyRepeat(true); - context.nativeWindowId = window.getNativeWindowHandle(); - - const double scaleFactor = getScaleFactor(); + CardinalPluginContext* const context = static_cast(rack::contextGet()); + context->nativeWindowId = window.getNativeWindowHandle(); + context->tlw = this; - setGeometryConstraints(648 * scaleFactor, 538 * scaleFactor); + // -------------------------------------------------------------------------- - if (scaleFactor != 1.0) - setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor); + rack::window::WindowSetPluginRemote(context->window, this); - rack::window::WindowSetPluginRemote(context.window, this); - - if (rack::widget::Widget* const menuBar = context.scene->menuBar) + if (rack::widget::Widget* const menuBar = context->scene->menuBar) { - context.scene->removeChild(menuBar); + context->scene->removeChild(menuBar); delete menuBar; } - context.scene->menuBar = rack::app::createMenuBar(true); - context.scene->addChildBelow(context.scene->menuBar, context.scene->rackScroll); + context->scene->menuBar = rack::app::createMenuBar(true); + context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll); // hide "Browse VCV Library" button - rack::widget::Widget* const browser = context.scene->browser->children.back(); + rack::widget::Widget* const browser = context->scene->browser->children.back(); rack::widget::Widget* const headerLayout = browser->children.front(); rack::widget::Widget* const libraryButton = headerLayout->children.back(); libraryButton->hide(); @@ -84,46 +62,157 @@ CardinalRemoteUI::CardinalRemoteUI(Window& window, const std::string& templatePa if (rack::asset::systemDir.empty()) { errorMessage = "Failed to locate Cardinal plugin bundle.\n" - "Install Cardinal with its plugin bundle folder intact and try again."; + "Install Cardinal with its plugin bundle folder intact and try again."; } else if (! rack::system::exists(rack::asset::systemDir)) { errorMessage = rack::string::f("System directory \"%s\" does not exist. " - "Make sure Cardinal was downloaded and installed correctly.", - rack::asset::systemDir.c_str()); + "Make sure Cardinal was downloaded and installed correctly.", + rack::asset::systemDir.c_str()); } if (! errorMessage.empty()) - { - static bool shown = false; + asyncDialog::create(errorMessage.c_str()); - if (! shown) - { - shown = true; - asyncDialog::create(errorMessage.c_str()); - } - } + context->window->step(); + + WindowParametersSetCallback(context->window, this); - context.window->step(); + // -------------------------------------------------------------------------- - // WindowParametersSetCallback(context.window, this); + addIdleCallback(this); } CardinalRemoteUI::~CardinalRemoteUI() { - CardinalPluginContext& context(*static_cast(rack::contextGet())); - context.nativeWindowId = 0; + removeIdleCallback(this); + + // -------------------------------------------------------------------------- + + CardinalPluginContext* const context = static_cast(rack::contextGet()); + + context->nativeWindowId = 0; + + if (rack::widget::Widget* const menuBar = context->scene->menuBar) + { + context->scene->removeChild(menuBar); + delete menuBar; + } + + context->scene->menuBar = rack::app::createMenuBar(true); + context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll); + + rack::window::WindowSetPluginRemote(context->window, nullptr); } void CardinalRemoteUI::onNanoDisplay() { - CardinalPluginContext& context(*static_cast(rack::contextGet())); - context.window->step(); + CardinalPluginContext* const context = static_cast(rack::contextGet()); + const ScopedContext sc(context); + context->window->step(); +} - // TODO +void CardinalRemoteUI::idleCallback() +{ + /* + if (filebrowserhandle != nullptr && fileBrowserIdle(filebrowserhandle)) + { + { + const char* const path = fileBrowserGetPath(filebrowserhandle); + + const ScopedContext sc(this); + filebrowseraction(path != nullptr ? strdup(path) : nullptr); + } + + fileBrowserClose(filebrowserhandle); + filebrowseraction = nullptr; + filebrowserhandle = nullptr; + } + */ + + if (windowParameters.rateLimit != 0 && ++rateLimitStep % (windowParameters.rateLimit * 2)) + return; + + rateLimitStep = 0; repaint(); } +void CardinalRemoteUI::WindowParametersChanged(const WindowParameterList param, float value) +{ + float mult = 1.0f; + + switch (param) + { + case kWindowParameterShowTooltips: + windowParameters.tooltips = value > 0.5f; + break; + case kWindowParameterCableOpacity: + mult = 100.0f; + windowParameters.cableOpacity = value; + break; + case kWindowParameterCableTension: + mult = 100.0f; + windowParameters.cableTension = value; + break; + case kWindowParameterRackBrightness: + mult = 100.0f; + windowParameters.rackBrightness = value; + break; + case kWindowParameterHaloBrightness: + mult = 100.0f; + windowParameters.haloBrightness = value; + break; + case kWindowParameterKnobMode: + switch (static_cast(value + 0.5f)) + { + case rack::settings::KNOB_MODE_LINEAR: + value = 0; + windowParameters.knobMode = rack::settings::KNOB_MODE_LINEAR; + break; + case rack::settings::KNOB_MODE_ROTARY_ABSOLUTE: + value = 1; + windowParameters.knobMode = rack::settings::KNOB_MODE_ROTARY_ABSOLUTE; + break; + case rack::settings::KNOB_MODE_ROTARY_RELATIVE: + value = 2; + windowParameters.knobMode = rack::settings::KNOB_MODE_ROTARY_RELATIVE; + break; + } + break; + case kWindowParameterWheelKnobControl: + windowParameters.knobScroll = value > 0.5f; + break; + case kWindowParameterWheelSensitivity: + mult = 1000.0f; + windowParameters.knobScrollSensitivity = value; + break; + case kWindowParameterLockModulePositions: + windowParameters.lockModules = value > 0.5f; + break; + case kWindowParameterUpdateRateLimit: + windowParameters.rateLimit = static_cast(value + 0.5f); + rateLimitStep = 0; + break; + case kWindowParameterBrowserSort: + windowParameters.browserSort = static_cast(value + 0.5f); + break; + case kWindowParameterBrowserZoom: + windowParameters.browserZoom = value; + value = std::pow(2.f, value) * 100.0f; + break; + case kWindowParameterInvertZoom: + windowParameters.invertZoom = value > 0.5f; + break; + case kWindowParameterSqueezeModulePositions: + windowParameters.squeezeModules = value > 0.5f; + break; + default: + return; + } + + // setParameterValue(kModuleParameters + param + 1, value * mult); +} + // -------------------------------------------------------------------------------------------------------------------- static int glfwMods(const uint mod) noexcept @@ -187,6 +276,7 @@ bool CardinalRemoteUI::onMouse(const MouseEvent& ev) #endif CardinalPluginContext* context = static_cast(rack::contextGet()); + const ScopedContext sc(context, mods); return context->event->handleButton(lastMousePos, button, action, mods); } @@ -198,6 +288,7 @@ bool CardinalRemoteUI::onMotion(const MotionEvent& ev) lastMousePos = mousePos; CardinalPluginContext* context = static_cast(rack::contextGet()); + const ScopedContext sc(context); return context->event->handleHover(mousePos, mouseDelta); } @@ -211,6 +302,7 @@ bool CardinalRemoteUI::onScroll(const ScrollEvent& ev) const int mods = glfwMods(ev.mod); CardinalPluginContext* context = static_cast(rack::contextGet()); + const ScopedContext sc(context, mods); return context->event->handleScroll(lastMousePos, scrollDelta); } @@ -222,6 +314,7 @@ bool CardinalRemoteUI::onCharacterInput(const CharacterInputEvent& ev) const int mods = glfwMods(ev.mod); CardinalPluginContext* context = static_cast(rack::contextGet()); + const ScopedContext sc(context, mods); return context->event->handleText(lastMousePos, ev.character); } @@ -303,6 +396,7 @@ bool CardinalRemoteUI::onKeyboard(const KeyboardEvent& ev) } CardinalPluginContext* context = static_cast(rack::contextGet()); + const ScopedContext sc(context, mods); return context->event->handleKey(lastMousePos, key, ev.keycode, action, mods); } @@ -311,8 +405,7 @@ void CardinalRemoteUI::onResize(const ResizeEvent& ev) NanoTopLevelWidget::onResize(ev); CardinalPluginContext* context = static_cast(rack::contextGet()); - if (context->window != nullptr) - WindowSetInternalSize(context->window, rack::math::Vec(ev.size.getWidth(), ev.size.getHeight())); + WindowSetInternalSize(context->window, rack::math::Vec(ev.size.getWidth(), ev.size.getHeight())); } // -------------------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalRemote/RemoteUI.hpp b/src/CardinalRemote/RemoteUI.hpp index ca29d28e..402c48fd 100644 --- a/src/CardinalRemote/RemoteUI.hpp +++ b/src/CardinalRemote/RemoteUI.hpp @@ -19,12 +19,54 @@ #include "NanoVG.hpp" #include "PluginContext.hpp" +#include "WindowParameters.hpp" -#include +#include -class CardinalRemoteUI : public NanoTopLevelWidget +// -------------------------------------------------------------------------------------------------------------------- + +namespace rack { +namespace app { + widget::Widget* createMenuBar(bool isStandalone); +} +namespace window { + void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw); + void WindowSetMods(Window* window, int mods); + void WindowSetInternalSize(rack::window::Window* window, math::Vec size); +} +} + +// -------------------------------------------------------------------------------------------------------------------- + +class CardinalRemoteUI : public NanoTopLevelWidget, + public IdleCallback, + public WindowParametersCallback { rack::math::Vec lastMousePos; + WindowParameters windowParameters; + int rateLimitStep = 0; + + struct ScopedContext { + CardinalPluginContext* const context; + + ScopedContext(CardinalPluginContext* const c) + : context(c) + { + WindowParametersRestore(context->window); + } + + ScopedContext(CardinalPluginContext* const c, const int mods) + : context(c) + { + rack::window::WindowSetMods(context->window, mods); + WindowParametersRestore(context->window); + } + + ~ScopedContext() + { + WindowParametersSave(context->window); + } + }; public: explicit CardinalRemoteUI(Window& window, const std::string& templatePath); @@ -32,6 +74,8 @@ class CardinalRemoteUI : public NanoTopLevelWidget protected: void onNanoDisplay() override; + void idleCallback() override; + void WindowParametersChanged(const WindowParameterList param, float value) override; bool onMouse(const MouseEvent& ev) override; bool onMotion(const MotionEvent& ev) override; bool onScroll(const ScrollEvent& ev) override; @@ -41,3 +85,5 @@ class CardinalRemoteUI : public NanoTopLevelWidget DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CardinalRemoteUI) }; + +// -------------------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalRemote/main.cpp b/src/CardinalRemote/main.cpp index b5b67880..381b086d 100644 --- a/src/CardinalRemote/main.cpp +++ b/src/CardinalRemote/main.cpp @@ -30,13 +30,24 @@ #include #include - #include "PluginContext.hpp" +#include "extra/ScopedValueSetter.hpp" + +#define CARDINAL_TEMPLATE_NAME "init/main.vcv" + +extern const std::string CARDINAL_VERSION; namespace rack { +namespace asset { +std::string patchesPath(); +void destroy(); +} +namespace engine { +void Engine_setAboutToClose(Engine*); +} namespace plugin { - void initStaticPlugins(); - void destroyStaticPlugins(); +void initStaticPlugins(); +void destroyStaticPlugins(); } } @@ -54,17 +65,32 @@ bool requestBufferSizeChange(uint) { return false; } bool requestMIDI() { return false; } const char* getPluginFormatName() noexcept { return "Remote"; } +FileBrowserHandle fileBrowserCreate(bool, ulong, double, const FileBrowserOptions&) { return nullptr; } + uint32_t Plugin::getBufferSize() const noexcept { return 128; } double Plugin::getSampleRate() const noexcept { return 48000; } bool Plugin::writeMidiEvent(const MidiEvent&) noexcept { return false; } +void UI::editParameter(uint, bool) {} +void UI::setParameterValue(uint, float) {} +void UI::setState(const char*, const char*) {} +bool UI::openFileBrowser(const FileBrowserOptions&) { return false; } + END_NAMESPACE_DISTRHO int main(const int argc, const char* argv[]) { using namespace rack; + std::string templatePath, factoryTemplatePath; + + // -------------------------------------------------------------------------- + + #ifdef DISTRHO_OS_WASM + settings::allowCursorLock = true; + #else settings::allowCursorLock = false; + #endif settings::autoCheckUpdates = false; settings::autosaveInterval = 0; settings::devMode = true; @@ -98,20 +124,18 @@ int main(const int argc, const char* argv[]) random::init(); ui::init(); - std::string templatePath; #ifdef CARDINAL_PLUGIN_SOURCE_DIR // Make system dir point to source code location as fallback asset::systemDir = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "Rack"; + asset::bundlePath.clear(); - if (system::exists(system::join(asset::systemDir, "res"))) - { - templatePath = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "template.vcv"; - } // If source code dir does not exist use install target prefix as system dir - else + if (!system::exists(system::join(asset::systemDir, "res"))) #endif { - #if defined(ARCH_MAC) + #if defined(DISTRHO_OS_WASM) + asset::systemDir = "/resources"; + #elif defined(ARCH_MAC) asset::systemDir = "/Library/Application Support/Cardinal"; #elif defined(ARCH_WIN) const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles); @@ -121,33 +145,37 @@ int main(const int argc, const char* argv[]) asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; #endif - if (! asset::systemDir.empty()) - { - asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); - templatePath = system::join(asset::systemDir, "template.vcv"); - } + asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); } - + asset::userDir = asset::systemDir; + const std::string patchesPath = asset::patchesPath(); + #ifdef DISTRHO_OS_WASM + templatePath = system::join(patchesPath, CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME); + #else + templatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); + #endif + factoryTemplatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); + // Log environment - INFO("%s %s version %s", APP_NAME.c_str(), APP_EDITION.c_str(), APP_VERSION.c_str()); + INFO("%s %s %s, compatible with Rack version %s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); INFO("%s", system::getOperatingSystemInfo().c_str()); -// INFO("Binary filename: %s", getBinaryFilename()); INFO("System directory: %s", asset::systemDir.c_str()); INFO("User directory: %s", asset::userDir.c_str()); INFO("Template patch: %s", templatePath.c_str()); + INFO("System template patch: %s", factoryTemplatePath.c_str()); // Report to user if something is wrong with the installation if (asset::systemDir.empty()) { d_stderr2("Failed to locate Cardinal plugin bundle.\n" - "Install Cardinal with its bundle folder intact and try again."); + "Install Cardinal with its bundle folder intact and try again."); } else if (! system::exists(asset::systemDir)) { d_stderr2("System directory \"%s\" does not exist.\n" - "Make sure Cardinal was downloaded and installed correctly.", asset::systemDir.c_str()); + "Make sure Cardinal was downloaded and installed correctly.", asset::systemDir.c_str()); } INFO("Initializing plugins"); @@ -156,8 +184,10 @@ int main(const int argc, const char* argv[]) INFO("Initializing plugin browser DB"); app::browserInit(); + // -------------------------------------------------------------------------- + // create unique temporary path for this instance - std::string autosavePath; + std::string fAutosavePath; try { char uidBuf[24]; @@ -165,58 +195,92 @@ int main(const int argc, const char* argv[]) for (int i=1;; ++i) { - std::snprintf(uidBuf, sizeof(uidBuf), "CardinalRemote.%04d", i); + std::snprintf(uidBuf, sizeof(uidBuf), "Cardinal.%04d", i); const std::string trypath = rack::system::join(tmp, uidBuf); if (! rack::system::exists(trypath)) { if (rack::system::createDirectories(trypath)) - autosavePath = trypath; + fAutosavePath = trypath; break; } } } DISTRHO_SAFE_EXCEPTION("create unique temporary path"); - CardinalPluginContext context(nullptr); - rack::contextSet(&context); + CardinalPluginContext* const context = new CardinalPluginContext(nullptr); + rack::contextSet(context); + + const float sampleRate = 48000; + rack::settings::sampleRate = sampleRate; + + context->bufferSize = 512; + context->sampleRate = sampleRate; - context.bufferSize = 512; - rack::settings::sampleRate = context.sampleRate = 48000; + context->engine = new rack::engine::Engine; + context->engine->setSampleRate(sampleRate); - context.engine = new rack::engine::Engine; - context.engine->setSampleRate(context.sampleRate); + context->history = new rack::history::State; + context->patch = new rack::patch::Manager; + context->patch->autosavePath = fAutosavePath; + context->patch->templatePath = templatePath; + context->patch->factoryTemplatePath = factoryTemplatePath; - context.history = new rack::history::State; - context.patch = new rack::patch::Manager; - context.patch->autosavePath = autosavePath; - context.patch->templatePath = templatePath; + context->event = new rack::widget::EventState; + context->scene = new rack::app::Scene; + context->event->rootWidget = context->scene; - context.event = new rack::widget::EventState; - context.scene = new rack::app::Scene; - context.event->rootWidget = context.scene; - context.window = new rack::window::Window; + context->window = new rack::window::Window; - context.patch->loadTemplate(); - context.scene->rackScroll->reset(); + context->patch->loadTemplate(); + context->scene->rackScroll->reset(); + // swap to factory template after first load + context->patch->templatePath = context->patch->factoryTemplatePath; + + // -------------------------------------------------------------------------- Application app; - Window win(app); - win.setResizable(true); - win.setTitle("CardinalRemote"); + Window window(app); + window.setIgnoringKeyRepeat(true); + window.setResizable(true); + window.setTitle("CardinalRemote"); + + // -------------------------------------------------------------------------- + + const double scaleFactor = window.getScaleFactor(); + + window.setGeometryConstraints(648 * scaleFactor, 538 * scaleFactor); + + if (scaleFactor != 1.0) + window.setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, + DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor); + + // -------------------------------------------------------------------------- + ScopedPointer remoteUI; { - const Window::ScopedGraphicsContext sgc(win); - remoteUI = new CardinalRemoteUI(win, templatePath); + const Window::ScopedGraphicsContext sgc(window); + remoteUI = new CardinalRemoteUI(window, templatePath); } - win.show(); + window.show(); app.exec(); - context.patch->clear(); + // -------------------------------------------------------------------------- + + { + context->patch->clear(); + + // do a little dance to prevent context scene deletion from saving to temp dir + const ScopedValueSetter svs(rack::settings::headless, true); + Engine_setAboutToClose(context->engine); + delete context; + } + + if (! fAutosavePath.empty()) + rack::system::removeRecursively(fAutosavePath); - if (! autosavePath.empty()) - rack::system::removeRecursively(autosavePath); + // -------------------------------------------------------------------------- INFO("Clearing asset paths"); asset::bundlePath.clear(); @@ -226,11 +290,16 @@ int main(const int argc, const char* argv[]) INFO("Destroying plugins"); plugin::destroyStaticPlugins(); + INFO("Destroying colourized assets"); + asset::destroy(); + INFO("Destroying settings"); settings::destroy(); INFO("Destroying logger"); logger::destroy(); + // -------------------------------------------------------------------------- + return 0; } From cf743245685d40bf56c7c1ca3a2ed84f2ed87e1c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 25 Dec 2022 22:28:36 +0000 Subject: [PATCH 172/451] Initial work towards a mini variant, WIP Signed-off-by: falkTX --- dpf | 2 +- plugins/Cardinal/src/plugincontext.hpp | 1 + plugins/Makefile | 73 ++++++++- plugins/plugins-mini.cpp | 195 +++++++++++++++++++++++++ src/Cardinal/DistrhoPluginInfo.h | 1 + src/CardinalCommon.cpp | 8 + src/CardinalFX/DistrhoPluginInfo.h | 1 + src/CardinalMini/CardinalCommon.cpp | 1 + src/CardinalMini/CardinalPlugin.cpp | 1 + src/CardinalMini/CardinalUI.cpp | 1 + src/CardinalMini/DistrhoPluginInfo.h | 55 +++++++ src/CardinalMini/Makefile | 8 + src/CardinalMini/RemoteNanoVG.cpp | 1 + src/CardinalMini/RemoteWindow.cpp | 1 + src/CardinalMini/Window.cpp | 1 + src/CardinalMini/common.cpp | 1 + src/CardinalMini/glfw.cpp | 1 + src/CardinalNative/DistrhoPluginInfo.h | 1 + src/CardinalPlugin.cpp | 4 +- src/Makefile | 34 +++-- src/Makefile.cardinal.mk | 75 +++++++--- src/PluginContext.hpp | 10 ++ src/custom/RemoteNanoVG.cpp | 14 +- 23 files changed, 449 insertions(+), 41 deletions(-) create mode 100644 plugins/plugins-mini.cpp create mode 120000 src/CardinalMini/CardinalCommon.cpp create mode 120000 src/CardinalMini/CardinalPlugin.cpp create mode 120000 src/CardinalMini/CardinalUI.cpp create mode 100644 src/CardinalMini/DistrhoPluginInfo.h create mode 100644 src/CardinalMini/Makefile create mode 120000 src/CardinalMini/RemoteNanoVG.cpp create mode 120000 src/CardinalMini/RemoteWindow.cpp create mode 120000 src/CardinalMini/Window.cpp create mode 120000 src/CardinalMini/common.cpp create mode 120000 src/CardinalMini/glfw.cpp diff --git a/dpf b/dpf index 924576a5..564f6519 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 924576a58c3f3a98d7df56f189f3f53fc4da0abb +Subproject commit 564f6519b4bbf1c6cc8791a9adbb377f6cfd4984 diff --git a/plugins/Cardinal/src/plugincontext.hpp b/plugins/Cardinal/src/plugincontext.hpp index e0877842..935a0072 100644 --- a/plugins/Cardinal/src/plugincontext.hpp +++ b/plugins/Cardinal/src/plugincontext.hpp @@ -41,6 +41,7 @@ static constexpr const uint32_t kModuleParameters = 24; enum CardinalVariant { kCardinalVariantMain, + kCardinalVariantMini, kCardinalVariantFX, kCardinalVariantNative, kCardinalVariantSynth, diff --git a/plugins/Makefile b/plugins/Makefile index 515378b6..e9bfc20e 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -231,7 +231,13 @@ DRWAV += drwav_write_raw # -------------------------------------------------------------- # Files to build +ifeq ($(NOPLUGINS),true) +PLUGIN_FILES = noplugins.cpp +else PLUGIN_FILES = plugins.cpp +endif + +MINIPLUGIN_FILES = plugins-mini.cpp # -------------------------------------------------------------- # Cardinal (built-in) @@ -250,6 +256,17 @@ PLUGIN_FILES += Cardinal/src/HostParameters-Map.cpp PLUGIN_FILES += Cardinal/src/HostTime.cpp PLUGIN_FILES += Cardinal/src/TextEditor.cpp +MINIPLUGIN_FILES += Cardinal/src/HostAudio.cpp +MINIPLUGIN_FILES += Cardinal/src/HostCV.cpp +MINIPLUGIN_FILES += Cardinal/src/HostMIDI.cpp +MINIPLUGIN_FILES += Cardinal/src/HostMIDI-CC.cpp +MINIPLUGIN_FILES += Cardinal/src/HostMIDI-Gate.cpp +MINIPLUGIN_FILES += Cardinal/src/HostMIDI-Map.cpp +MINIPLUGIN_FILES += Cardinal/src/HostParameters.cpp +MINIPLUGIN_FILES += Cardinal/src/HostParameters-Map.cpp +MINIPLUGIN_FILES += Cardinal/src/HostTime.cpp +MINIPLUGIN_FILES += Cardinal/src/TextEditor.cpp + ifneq ($(USE_GLES2),true) ifneq ($(USE_GLES3),true) PLUGIN_FILES += Cardinal/src/glBars.cpp @@ -280,6 +297,7 @@ endif ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) PLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp +MINIPLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp BASE_FLAGS += -DHAVE_FFTW3F endif @@ -1106,7 +1124,11 @@ endif # !NOPLUGINS # -------------------------------------------------------------- # Build setup +ifeq ($(HEADLESS),true) +BUILD_DIR = ../build-headless/plugins +else BUILD_DIR = ../build/plugins +endif ifeq ($(MACOS),true) BASE_FLAGS += -DARCH_MAC @@ -1261,16 +1283,23 @@ endif # -------------------------------------------------------------- # Build targets +ifeq ($(HEADLESS),true) +TARGET_SUFFIX = -headless +endif + ifeq ($(NOPLUGINS),true) -TARGET = noplugins.a +TARGETS = noplugins$(TARGET_SUFFIX).a else -TARGET = plugins.a +TARGETS = plugins$(TARGET_SUFFIX).a plugins-mini-headless.a endif -all: $(TARGET) +all: $(TARGETS) +ifneq ($(HEADLESS),true) + $(MAKE) HEADLESS=true plugins-mini-headless.a +endif clean: - rm -f $(TARGET) + rm -f $(TARGETS) rm -rf $(BUILD_DIR) rm -rf surgext/build @@ -1342,6 +1371,9 @@ 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 # MOD builds only have LV2 main and FX variant @@ -1349,8 +1381,10 @@ ifeq ($(MOD_BUILD),true) 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) @@ -1362,10 +1396,12 @@ 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 += $(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) @@ -1404,6 +1440,10 @@ resources: $(JACK_RESOURCES) $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/CardinalMini.lv2/resources/%: % + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + ../bin/CardinalNative.lv2/resources/%: % -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -1426,6 +1466,10 @@ endif -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ +../bin/CardinalMini.lv2/resources/PluginManifests/%.json: %/plugin.json + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + ../bin/CardinalNative.lv2/resources/PluginManifests/%.json: %/plugin.json -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ @@ -1539,6 +1583,8 @@ endif PLUGIN_OBJS = $(PLUGIN_FILES:%=$(BUILD_DIR)/%.o) PLUGIN_OBJS += $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.o) +MINIPLUGIN_OBJS = $(MINIPLUGIN_FILES:%=$(BUILD_DIR)/%.o) + NOPLUGIN_OBJS = $(NOPLUGIN_FILES:%=$(BUILD_DIR)/%.o) .PRECIOUS: $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.c) @@ -1547,12 +1593,17 @@ NOPLUGIN_OBJS = $(NOPLUGIN_FILES:%=$(BUILD_DIR)/%.o) custom_module_names = -D${1}=${2}${1} -Dmodel${1}=model${2}${1} -D${1}Widget=${2}${1}Widget custom_per_file_names = -D${1}=${2}_${1} -plugins.a: $(PLUGIN_OBJS) +plugins$(TARGET_SUFFIX).a: $(PLUGIN_OBJS) + @echo "Creating $@" + $(SILENT)rm -f $@ + $(SILENT)$(AR) crs $@ $^ + +plugins-mini$(TARGET_SUFFIX).a: $(MINIPLUGIN_OBJS) @echo "Creating $@" $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ -noplugins.a: $(NOPLUGIN_OBJS) +noplugins$(TARGET_SUFFIX).a: $(NOPLUGIN_OBJS) @echo "Creating $@" $(NOPLUGIN_OBJS) $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ @@ -1572,6 +1623,16 @@ $(BUILD_DIR)/plugins.cpp.o: plugins.cpp @echo "Compiling $<" $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ +$(BUILD_DIR)/plugins-mini.cpp.o: plugins-mini.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ + +$(BUILD_DIR)/noplugins.cpp.o: plugins.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ + $(BUILD_DIR)/Cardinal/%.cpp.o: Cardinal/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp new file mode 100644 index 00000000..3c50e389 --- /dev/null +++ b/plugins/plugins-mini.cpp @@ -0,0 +1,195 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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 "rack.hpp" +#include "plugin.hpp" + +#include "DistrhoUtils.hpp" + +// Cardinal (built-in) +#include "Cardinal/src/plugin.hpp" + +// known terminal modules +std::vector hostTerminalModels; + +// plugin instances +Plugin* pluginInstance__Cardinal; + +namespace rack { + +namespace asset { +std::string pluginManifest(const std::string& dirname); +std::string pluginPath(const std::string& dirname); +} + +namespace plugin { + +struct StaticPluginLoader { + Plugin* const plugin; + FILE* file; + json_t* rootJ; + + StaticPluginLoader(Plugin* const p, const char* const name) + : plugin(p), + file(nullptr), + rootJ(nullptr) + { +#ifdef DEBUG + DEBUG("Loading plugin module %s", name); +#endif + + p->path = asset::pluginPath(name); + + const std::string manifestFilename = asset::pluginManifest(name); + + if ((file = std::fopen(manifestFilename.c_str(), "r")) == nullptr) + { + d_stderr2("Manifest file %s does not exist", manifestFilename.c_str()); + return; + } + + json_error_t error; + if ((rootJ = json_loadf(file, 0, &error)) == nullptr) + { + d_stderr2("JSON parsing error at %s %d:%d %s", manifestFilename.c_str(), error.line, error.column, error.text); + return; + } + + // force ABI, we use static plugins so this doesnt matter as long as it builds + json_t* const version = json_string((APP_VERSION_MAJOR + ".0").c_str()); + json_object_set(rootJ, "version", version); + json_decref(version); + + // Load manifest + p->fromJson(rootJ); + + // Reject plugin if slug already exists + if (Plugin* const existingPlugin = getPlugin(p->slug)) + throw Exception("Plugin %s is already loaded, not attempting to load it again", p->slug.c_str()); + } + + ~StaticPluginLoader() + { + if (rootJ != nullptr) + { + // Load modules manifest + json_t* const modulesJ = json_object_get(rootJ, "modules"); + plugin->modulesFromJson(modulesJ); + + json_decref(rootJ); + plugins.push_back(plugin); + } + + if (file != nullptr) + std::fclose(file); + } + + bool ok() const noexcept + { + return rootJ != nullptr; + } + + void removeModule(const char* const slugToRemove) const noexcept + { + json_t* const modules = json_object_get(rootJ, "modules"); + DISTRHO_SAFE_ASSERT_RETURN(modules != nullptr,); + + size_t i; + json_t* v; + json_array_foreach(modules, i, v) + { + if (json_t* const slug = json_object_get(v, "slug")) + { + if (const char* const value = json_string_value(slug)) + { + if (std::strcmp(value, slugToRemove) == 0) + { + json_array_remove(modules, i); + break; + } + } + } + } + } +}; + +static void initStatic__Cardinal() +{ + Plugin* const p = new Plugin; + pluginInstance__Cardinal = p; + + const StaticPluginLoader spl(p, "Cardinal"); + if (spl.ok()) + { + p->addModel(modelHostAudio2); + p->addModel(modelHostCV); + p->addModel(modelHostMIDI); + p->addModel(modelHostMIDICC); + p->addModel(modelHostMIDIGate); + p->addModel(modelHostMIDIMap); + p->addModel(modelHostParameters); + p->addModel(modelHostParametersMap); + p->addModel(modelHostTime); + p->addModel(modelTextEditor); + #ifdef HAVE_FFTW3F + p->addModel(modelAudioToCVPitch); + #else + spl.removeModule("AudioToCVPitch"); + #endif + spl.removeModule("AudioFile"); + spl.removeModule("Blank"); + spl.removeModule("Carla"); + spl.removeModule("ExpanderInputMIDI"); + spl.removeModule("ExpanderOutputMIDI"); + spl.removeModule("HostAudio8"); + spl.removeModule("Ildaeil"); + spl.removeModule("MPV"); + spl.removeModule("SassyScope"); + spl.removeModule("glBars"); + + hostTerminalModels = { + modelHostAudio2, + modelHostCV, + modelHostMIDI, + modelHostMIDICC, + modelHostMIDIGate, + modelHostMIDIMap, + modelHostParameters, + modelHostParametersMap, + modelHostTime, + }; + } +} + +void initStaticPlugins() +{ + initStatic__Cardinal(); +} + +void destroyStaticPlugins() +{ + for (Plugin* p : plugins) + delete p; + plugins.clear(); +} + +void updateStaticPluginsDarkMode() +{ +} + +} +} diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index df7f9554..408f43b4 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -19,6 +19,7 @@ #define DISTRHO_PLUGIN_INFO_H_INCLUDED #define CARDINAL_VARIANT_MAIN 1 +#define CARDINAL_VARIANT_MINI 0 #define CARDINAL_VARIANT_FX 0 #define CARDINAL_VARIANT_NATIVE 0 #define CARDINAL_VARIANT_SYNTH 0 diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 4de81006..9a718954 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -57,6 +57,14 @@ # include #endif +#ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# error wrong build +#endif + +#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# define HEADLESS +#endif + const std::string CARDINAL_VERSION = "22.12"; START_NAMESPACE_DISTRHO diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index 9c702123..fef86fce 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -19,6 +19,7 @@ #define DISTRHO_PLUGIN_INFO_H_INCLUDED #define CARDINAL_VARIANT_MAIN 0 +#define CARDINAL_VARIANT_MINI 0 #define CARDINAL_VARIANT_FX 1 #define CARDINAL_VARIANT_NATIVE 0 #define CARDINAL_VARIANT_SYNTH 0 diff --git a/src/CardinalMini/CardinalCommon.cpp b/src/CardinalMini/CardinalCommon.cpp new file mode 120000 index 00000000..76b4b5f3 --- /dev/null +++ b/src/CardinalMini/CardinalCommon.cpp @@ -0,0 +1 @@ +../CardinalCommon.cpp \ No newline at end of file diff --git a/src/CardinalMini/CardinalPlugin.cpp b/src/CardinalMini/CardinalPlugin.cpp new file mode 120000 index 00000000..c0c7e71e --- /dev/null +++ b/src/CardinalMini/CardinalPlugin.cpp @@ -0,0 +1 @@ +../CardinalPlugin.cpp \ No newline at end of file diff --git a/src/CardinalMini/CardinalUI.cpp b/src/CardinalMini/CardinalUI.cpp new file mode 120000 index 00000000..5558256b --- /dev/null +++ b/src/CardinalMini/CardinalUI.cpp @@ -0,0 +1 @@ +../CardinalUI.cpp \ No newline at end of file diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h new file mode 100644 index 00000000..a27e82e1 --- /dev/null +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -0,0 +1,55 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED +#define DISTRHO_PLUGIN_INFO_H_INCLUDED + +#define CARDINAL_VARIANT_MAIN 0 +#define CARDINAL_VARIANT_MINI 1 +#define CARDINAL_VARIANT_FX 0 +#define CARDINAL_VARIANT_NATIVE 0 +#define CARDINAL_VARIANT_SYNTH 0 + +#define CARDINAL_NUM_AUDIO_INPUTS 2 +#define CARDINAL_NUM_AUDIO_OUTPUTS 2 + +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#mini" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#mini" + +#define DISTRHO_PLUGIN_NAME "Cardinal FX" +#define DISTRHO_PLUGIN_LABEL "CardinalFX" + +#define DISTRHO_PLUGIN_HAS_UI 1 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 +#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 +#define DISTRHO_PLUGIN_IS_SYNTH 0 +#define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS +#define DISTRHO_PLUGIN_NUM_OUTPUTS CARDINAL_NUM_AUDIO_OUTPUTS +#define DISTRHO_PLUGIN_WANT_MIDI_INPUT 1 +#define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 1 +#define DISTRHO_PLUGIN_WANT_FULL_STATE 1 +#define DISTRHO_PLUGIN_WANT_STATE 1 +#define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" + +#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalMini/Makefile b/src/CardinalMini/Makefile new file mode 100644 index 00000000..24e50436 --- /dev/null +++ b/src/CardinalMini/Makefile @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +# Makefile for DISTRHO Plugins # +# ---------------------------- # +# Created by falkTX +# + +NAME = CardinalMini +include ../Makefile.cardinal.mk diff --git a/src/CardinalMini/RemoteNanoVG.cpp b/src/CardinalMini/RemoteNanoVG.cpp new file mode 120000 index 00000000..a6394af3 --- /dev/null +++ b/src/CardinalMini/RemoteNanoVG.cpp @@ -0,0 +1 @@ +../custom/RemoteNanoVG.cpp \ No newline at end of file diff --git a/src/CardinalMini/RemoteWindow.cpp b/src/CardinalMini/RemoteWindow.cpp new file mode 120000 index 00000000..7e00fed5 --- /dev/null +++ b/src/CardinalMini/RemoteWindow.cpp @@ -0,0 +1 @@ +../custom/RemoteWindow.cpp \ No newline at end of file diff --git a/src/CardinalMini/Window.cpp b/src/CardinalMini/Window.cpp new file mode 120000 index 00000000..759f2728 --- /dev/null +++ b/src/CardinalMini/Window.cpp @@ -0,0 +1 @@ +../override/Window.cpp \ No newline at end of file diff --git a/src/CardinalMini/common.cpp b/src/CardinalMini/common.cpp new file mode 120000 index 00000000..915948e3 --- /dev/null +++ b/src/CardinalMini/common.cpp @@ -0,0 +1 @@ +../override/common.cpp \ No newline at end of file diff --git a/src/CardinalMini/glfw.cpp b/src/CardinalMini/glfw.cpp new file mode 120000 index 00000000..8c6a6e44 --- /dev/null +++ b/src/CardinalMini/glfw.cpp @@ -0,0 +1 @@ +../custom/glfw.cpp \ No newline at end of file diff --git a/src/CardinalNative/DistrhoPluginInfo.h b/src/CardinalNative/DistrhoPluginInfo.h index b820481a..5cdfbd64 100644 --- a/src/CardinalNative/DistrhoPluginInfo.h +++ b/src/CardinalNative/DistrhoPluginInfo.h @@ -19,6 +19,7 @@ #define DISTRHO_PLUGIN_INFO_H_INCLUDED #define CARDINAL_VARIANT_MAIN 0 +#define CARDINAL_VARIANT_MINI 0 #define CARDINAL_VARIANT_FX 0 #define CARDINAL_VARIANT_NATIVE 1 #define CARDINAL_VARIANT_SYNTH 0 diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index fd26266d..f8839490 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -647,6 +647,8 @@ class CardinalPlugin : public CardinalBasePlugin { #if CARDINAL_VARIANT_MAIN || CARDINAL_VARIANT_NATIVE return d_cconst('d', 'C', 'd', 'n'); + #elif CARDINAL_VARIANT_MINI + return d_cconst('d', 'C', 'd', 'M'); #elif CARDINAL_VARIANT_FX return d_cconst('d', 'C', 'n', 'F'); #elif CARDINAL_VARIANT_SYNTH @@ -671,7 +673,7 @@ class CardinalPlugin : public CardinalBasePlugin port.hints = kAudioPortIsCV | kCVPortHasPositiveUnipolarRange | kCVPortHasScaledRange | kCVPortIsOptional; index -= 8; } - #elif CARDINAL_VARIANT_FX || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_SYNTH + #elif CARDINAL_VARIANT_MINI || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_FX || CARDINAL_VARIANT_SYNTH if (index < 2) port.groupId = kPortGroupStereo; #endif diff --git a/src/Makefile b/src/Makefile index a3a1f203..ecdbd966 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,7 +25,11 @@ endif # -------------------------------------------------------------- # Build setup +ifeq ($(HEADLESS),true) +BUILD_DIR = ../build-headless/rack +else BUILD_DIR = ../build/rack +endif ifeq ($(MACOS),true) BASE_FLAGS += -DARCH_MAC @@ -213,14 +217,18 @@ endif # -------------------------------------------------------------- # Build targets -TARGET = rack.a +ifeq ($(HEADLESS),true) +TARGET_SUFFIX = -headless +endif + +TARGETS = rack$(TARGET_SUFFIX).a rack-headless.a ifneq ($(MACOS),true) 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) +all: $(TARGETS) ifeq ($(MOD_BUILD),true) $(MAKE) -C Cardinal lv2 $(MAKE) -C CardinalFX lv2 @@ -228,37 +236,38 @@ else ifeq ($(WASM),true) $(MAKE) -C CardinalNative else $(MAKE) -C Cardinal + $(MAKE) -C CardinalMini $(MAKE) -C CardinalNative $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) endif -jack: $(TARGET) +jack: $(TARGETS) $(MAKE) jack -C Cardinal -native: $(TARGET) +native: $(TARGETS) $(MAKE) jack -C CardinalNative -lv2: $(TARGET) +lv2: $(TARGETS) $(MAKE) lv2 -C Cardinal $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) lv2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) -vst2: $(TARGET) +vst2: $(TARGETS) $(MAKE) vst2 -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) vst2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) -vst3: $(TARGET) +vst3: $(TARGETS) $(MAKE) vst3 -C Cardinal $(MAKE) vst3 -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) vst3 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) -clap: $(TARGET) +clap: $(TARGETS) $(MAKE) clap -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) clap -C CardinalSynth $(CARDINAL_SYNTH_ARGS) clean: - rm -f $(TARGET) + rm -f $(TARGETS) rm -rf $(BUILD_DIR) $(MAKE) clean -C Cardinal $(MAKE) clean -C CardinalFX $(CARDINAL_FX_ARGS) @@ -269,11 +278,16 @@ clean: RACK_OBJS = $(RACK_FILES:%=$(BUILD_DIR)/%.o) -$(TARGET): $(RACK_OBJS) +rack$(TARGET_SUFFIX).a: $(RACK_OBJS) @echo "Creating $@" $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ +ifneq ($(HEADLESS),true) +rack-headless.a: + $(MAKE) HEADLESS=true $@ +endif + $(BUILD_DIR)/%.c.o: %.c -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 05e9f225..af12cb25 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -8,6 +8,8 @@ ifeq ($(NAME),Cardinal) CARDINAL_VARIANT = main +else ifeq ($(NAME),CardinalMini) +CARDINAL_VARIANT = mini else ifeq ($(NAME),CardinalFX) CARDINAL_VARIANT = fx else ifeq ($(NAME),CardinalNative) @@ -19,6 +21,7 @@ endif # -------------------------------------------------------------- # Carla stuff +ifneq ($(CARDINAL_VARIANT),mini) ifneq ($(STATIC_BUILD),true) STATIC_PLUGIN_TARGET = true @@ -49,6 +52,7 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a endif # STATIC_BUILD +endif # CARDINAL_VARIANT mini # -------------------------------------------------------------- # Import base definitions @@ -64,7 +68,7 @@ ifeq ($(CARDINAL_VARIANT),main) # main variant should not use rtaudio/sdl2 fallback (it has CV ports) SKIP_NATIVE_AUDIO_FALLBACK = true else -# fx and synth variants should only use rtaudio/sdl2 fallbacks +# other variants should only use rtaudio/sdl2 fallbacks FORCE_NATIVE_AUDIO_FALLBACK = true endif @@ -94,7 +98,10 @@ FILES_DSP = CardinalPlugin.cpp FILES_DSP += CardinalCommon.cpp FILES_DSP += common.cpp -ifeq ($(HEADLESS),true) +ifeq ($(CARDINAL_VARIANT),mini) +FILES_DSP += RemoteNanoVG.cpp +FILES_DSP += RemoteWindow.cpp +else ifeq ($(HEADLESS),true) FILES_DSP += RemoteNanoVG.cpp FILES_DSP += RemoteWindow.cpp else @@ -110,12 +117,24 @@ endif # -------------------------------------------------------------- # Extra libraries to link against -ifeq ($(NOPLUGINS),true) -RACK_EXTRA_LIBS = ../../plugins/noplugins.a +ifeq ($(HEADLESS),true) +TARGET_SUFFIX = -headless +endif + +ifeq ($(CARDINAL_VARIANT),mini) +RACK_EXTRA_LIBS = ../../plugins/plugins-mini-headless.a +else ifeq ($(NOPLUGINS),true) +RACK_EXTRA_LIBS = ../../plugins/noplugins$(TARGET_SUFFIX).a +else +RACK_EXTRA_LIBS = ../../plugins/plugins$(TARGET_SUFFIX).a +endif + +ifeq ($(CARDINAL_VARIANT),mini) +RACK_EXTRA_LIBS += ../rack-headless.a else -RACK_EXTRA_LIBS = ../../plugins/plugins.a +RACK_EXTRA_LIBS += ../rack$(TARGET_SUFFIX).a endif -RACK_EXTRA_LIBS += ../rack.a + RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libquickjs.a ifneq ($(SYSDEPS),true) @@ -133,6 +152,7 @@ endif # -------------------------------------------------------------- # surgext libraries +ifneq ($(CARDINAL_VARIANT),mini) ifneq ($(NOPLUGINS),true) SURGE_DEP_PATH = $(abspath ../../deps/surge-build) RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libsurge-common.a @@ -152,6 +172,7 @@ endif RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a endif +endif # -------------------------------------------------------------- @@ -162,18 +183,18 @@ STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -l endif endif -EXTRA_DEPENDENCIES = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) -EXTRA_LIBS = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) $(STATIC_CARLA_PLUGIN_LIBS) +EXTRA_DSP_DEPENDENCIES = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) +EXTRA_DSP_LIBS = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) $(STATIC_CARLA_PLUGIN_LIBS) ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) -EXTRA_DEPENDENCIES += ../../deps/aubio/libaubio.a -EXTRA_LIBS += ../../deps/aubio/libaubio.a -EXTRA_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) +EXTRA_DSP_DEPENDENCIES += ../../deps/aubio/libaubio.a +EXTRA_DSP_LIBS += ../../deps/aubio/libaubio.a +EXTRA_DSP_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) endif ifneq ($(NOPLUGINS),true) ifeq ($(MACOS),true) -EXTRA_LIBS += -framework Accelerate +EXTRA_DSP_LIBS += -framework Accelerate endif endif @@ -216,9 +237,22 @@ ifneq ($(STATIC_BUILD),true) WASM_RESOURCES += $(CURDIR)/lv2/fomp.lv2/manifest.ttl endif -EXTRA_DEPENDENCIES += $(WASM_RESOURCES) +EXTRA_DSP_DEPENDENCIES += $(WASM_RESOURCES) endif +# -------------------------------------------------------------- +# mini variant UI + +# ifeq ($(CARDINAL_VARIANT),mini) +# ifneq ($(HEADLESS)$(MOD_BUILD),true) +# FILES_UI = CardinalUI.cpp +# FILES_UI += glfw.cpp +# FILES_UI += Window.cpp +# EXTRA_UI_DEPENDENCIES = $(subst -headless,,$(EXTRA_DSP_DEPENDENCIES)) +# EXTRA_UI_LIBS = $(subst -headless,,$(EXTRA_DSP_LIBS)) +# endif +# endif + # -------------------------------------------------------------- # Do some magic @@ -370,13 +404,13 @@ ifeq ($(MACOS),true) LINK_FLAGS += -framework IOKit else ifeq ($(WINDOWS),true) # needed by VCVRack -EXTRA_LIBS += -ldbghelp -lshlwapi -Wl,--stack,0x100000 +EXTRA_DSP_LIBS += -ldbghelp -lshlwapi -Wl,--stack,0x100000 # needed by JW-Modules -EXTRA_LIBS += -lws2_32 -lwinmm +EXTRA_DSP_LIBS += -lws2_32 -lwinmm endif ifeq ($(SYSDEPS),true) -EXTRA_LIBS += $(shell $(PKG_CONFIG) --libs jansson libarchive samplerate speexdsp) +EXTRA_DSP_LIBS += $(shell $(PKG_CONFIG) --libs jansson libarchive samplerate speexdsp) endif ifeq ($(WITH_LTO),true) @@ -393,7 +427,7 @@ endif ifeq ($(HAVE_LIBLO),true) BASE_FLAGS += $(LIBLO_FLAGS) -LINK_FLAGS += $(LIBLO_LIBS) +EXTRA_DSP_LIBS += $(LIBLO_LIBS) endif # -------------------------------------------------------------- @@ -422,10 +456,9 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' # Enable all possible plugin types and setup resources ifeq ($(CARDINAL_VARIANT),main) -TARGETS = lv2 vst3 clap -ifeq ($(HAVE_JACK),true) -TARGETS += jack -endif +TARGETS = jack lv2 vst3 clap +else ifeq ($(CARDINAL_VARIANT),mini) +TARGETS = lv2_sep else ifeq ($(CARDINAL_VARIANT),native) TARGETS = jack else diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 933d4163..1b51333d 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -40,6 +40,7 @@ static constexpr const uint kModuleParameters = 24; enum CardinalVariant { kCardinalVariantMain, + kCardinalVariantMini, kCardinalVariantFX, kCardinalVariantNative, kCardinalVariantSynth, @@ -74,6 +75,8 @@ struct CardinalPluginContext : rack::Context { sampleRate(p != nullptr ? p->getSampleRate() : 0.0), #if CARDINAL_VARIANT_MAIN variant(kCardinalVariantMain), + #elif CARDINAL_VARIANT_MINI + variant(kCardinalVariantMini), #elif CARDINAL_VARIANT_FX variant(kCardinalVariantFX), #elif CARDINAL_VARIANT_NATIVE @@ -162,7 +165,11 @@ class CardinalBaseUI : public UI { CardinalBaseUI(const uint width, const uint height) : UI(width, height), + #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS context(getRackContextFromPlugin(getPluginInstancePointer())), + #else + context(new CardinalPluginContext(nullptr)), + #endif saving(false), savingUncompressed(false), #ifdef DISTRHO_OS_WASM @@ -182,6 +189,9 @@ class CardinalBaseUI : public UI { context->tlw = nullptr; context->ui = nullptr; + #if !DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + delete context; + #endif } }; #endif diff --git a/src/custom/RemoteNanoVG.cpp b/src/custom/RemoteNanoVG.cpp index a299cf05..ef7c6535 100644 --- a/src/custom/RemoteNanoVG.cpp +++ b/src/custom/RemoteNanoVG.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -15,8 +15,18 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ +#include "DistrhoPluginInfo.h" + +#ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# error wrong build +#endif + +#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# define HEADLESS +#endif + #ifndef HEADLESS -#include "OpenGL.hpp" +# include "OpenGL.hpp" #endif #include "nanovg.h" From a85679758c34a958418d58c6763659f769764ea0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 26 Dec 2022 09:10:52 +0000 Subject: [PATCH 173/451] Setup mini variant UI, move around more code to accomodate this Signed-off-by: falkTX --- dpf | 2 +- plugins/Makefile | 6 +- plugins/plugins-mini.cpp | 1 + src/CardinalCommon.cpp | 300 +++++++++++++++++++++++++ src/CardinalCommon.hpp | 45 +++- src/CardinalMini/DistrhoPluginInfo.h | 4 +- src/CardinalPlugin.cpp | 314 +-------------------------- src/CardinalUI.cpp | 111 +++++++++- src/Makefile.cardinal.mk | 29 ++- src/PluginContext.hpp | 3 - src/extra/SharedResourcePointer.hpp | 19 ++ src/override/Window.cpp | 34 ++- 12 files changed, 534 insertions(+), 334 deletions(-) diff --git a/dpf b/dpf index 564f6519..79948069 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 564f6519b4bbf1c6cc8791a9adbb377f6cfd4984 +Subproject commit 79948069d581c64bd19bc454234550de88b459a2 diff --git a/plugins/Makefile b/plugins/Makefile index e9bfc20e..d8d7ac7c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -293,6 +293,10 @@ PLUGIN_FILES += Cardinal/src/ImGuiTextEditor.cpp PLUGIN_FILES += Cardinal/src/SassyScope.cpp PLUGIN_FILES += Cardinal/src/DearImGui.cpp PLUGIN_FILES += Cardinal/src/DearImGuiColorTextEditor.cpp +MINIPLUGIN_FILES += Cardinal/src/ImGuiWidget.cpp +MINIPLUGIN_FILES += Cardinal/src/ImGuiTextEditor.cpp +MINIPLUGIN_FILES += Cardinal/src/DearImGui.cpp +MINIPLUGIN_FILES += Cardinal/src/DearImGuiColorTextEditor.cpp endif ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) @@ -1290,7 +1294,7 @@ endif ifeq ($(NOPLUGINS),true) TARGETS = noplugins$(TARGET_SUFFIX).a else -TARGETS = plugins$(TARGET_SUFFIX).a plugins-mini-headless.a +TARGETS = plugins$(TARGET_SUFFIX).a plugins-mini.a endif all: $(TARGETS) diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 3c50e389..afdd0961 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -189,6 +189,7 @@ void destroyStaticPlugins() void updateStaticPluginsDarkMode() { + d_stdout("TODO"); } } diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 9a718954..ea61c0f4 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -65,6 +66,27 @@ # define HEADLESS #endif +#if CARDINAL_VARIANT_FX +# define CARDINAL_TEMPLATE_NAME "init/fx.vcv" +#elif CARDINAL_VARIANT_NATIVE +# define CARDINAL_TEMPLATE_NAME "init/native.vcv" +#elif CARDINAL_VARIANT_SYNTH +# define CARDINAL_TEMPLATE_NAME "init/synth.vcv" +#else +# define CARDINAL_TEMPLATE_NAME "init/main.vcv" +#endif + +namespace rack { +namespace asset { +std::string patchesPath(); +void destroy(); +} +namespace plugin { +void initStaticPlugins(); +void destroyStaticPlugins(); +} +} + const std::string CARDINAL_VERSION = "22.12"; START_NAMESPACE_DISTRHO @@ -172,6 +194,284 @@ void CardinalPluginContext::writeMidiMessage(const rack::midi::Message& message, plugin->writeMidiEvent(event); } +// ----------------------------------------------------------------------------------------------------------- + +#ifdef CARDINAL_INIT_OSC_THREAD +static void osc_error_handler(int num, const char* msg, const char* path) +{ + d_stderr("Cardinal OSC Error: code: %i, msg: \"%s\", path: \"%s\")", num, msg, path); +} + +static int osc_fallback_handler(const char* const path, const char* const types, lo_arg**, int, lo_message, void*) +{ + d_stderr("Cardinal OSC unhandled message \"%s\" with types \"%s\"", path, types); + return 0; +} + +static int osc_hello_handler(const char*, const char*, lo_arg**, int, const lo_message m, void* const self) +{ + d_stdout("osc_hello_handler()"); + const lo_address source = lo_message_get_source(m); + lo_send_from(source, static_cast(self)->oscServer, LO_TT_IMMEDIATE, "/resp", "ss", "hello", "ok"); + return 0; +} + +static int osc_load_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) +{ + d_stdout("osc_load_handler()"); + DISTRHO_SAFE_ASSERT_RETURN(argc == 1, 0); + DISTRHO_SAFE_ASSERT_RETURN(types != nullptr && types[0] == 'b', 0); + + const int32_t size = argv[0]->blob.size; + DISTRHO_SAFE_ASSERT_RETURN(size > 4, 0); + + const uint8_t* const blob = (uint8_t*)(&argv[0]->blob.data); + DISTRHO_SAFE_ASSERT_RETURN(blob != nullptr, 0); + + bool ok = false; + + if (CardinalBasePlugin* const plugin = static_cast(self)->oscPlugin) + { + CardinalPluginContext* const context = plugin->context; + std::vector data(size); + std::memcpy(data.data(), blob, size); + + rack::contextSet(context); + rack::system::removeRecursively(context->patch->autosavePath); + rack::system::createDirectories(context->patch->autosavePath); + try { + rack::system::unarchiveToDirectory(data, context->patch->autosavePath); + context->patch->loadAutosave(); + ok = true; + } + catch (rack::Exception& e) { + WARN("%s", e.what()); + } + rack::contextSet(nullptr); + } + + const lo_address source = lo_message_get_source(m); + lo_send_from(source, static_cast(self)->oscServer, + LO_TT_IMMEDIATE, "/resp", "ss", "load", ok ? "ok" : "fail"); + return 0; +} + +static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) +{ + d_stdout("osc_screenshot_handler()"); + DISTRHO_SAFE_ASSERT_RETURN(argc == 1, 0); + DISTRHO_SAFE_ASSERT_RETURN(types != nullptr && types[0] == 'b', 0); + + const int32_t size = argv[0]->blob.size; + DISTRHO_SAFE_ASSERT_RETURN(size > 4, 0); + + const uint8_t* const blob = (uint8_t*)(&argv[0]->blob.data); + DISTRHO_SAFE_ASSERT_RETURN(blob != nullptr, 0); + + bool ok = false; + + if (CardinalBasePlugin* const plugin = static_cast(self)->oscPlugin) + ok = plugin->updateStateValue("screenshot", String::asBase64(blob, size).buffer()); + + const lo_address source = lo_message_get_source(m); + lo_send_from(source, static_cast(self)->oscServer, + LO_TT_IMMEDIATE, "/resp", "ss", "screenshot", ok ? "ok" : "fail"); + return 0; +} +#endif + +Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalBaseUI* const ui) +{ + using namespace rack; + +#ifdef DISTRHO_OS_WASM + settings::allowCursorLock = true; +#else + settings::allowCursorLock = false; +#endif + settings::autoCheckUpdates = false; + settings::autosaveInterval = 0; + settings::devMode = true; + settings::isPlugin = true; + settings::skipLoadOnLaunch = true; + settings::showTipsOnLaunch = false; + settings::windowPos = math::Vec(0, 0); +#ifdef HEADLESS + settings::headless = true; +#endif + + // copied from https://community.vcvrack.com/t/16-colour-cable-palette/15951 + settings::cableColors = { + color::fromHexString("#ff5252"), + color::fromHexString("#ff9352"), + color::fromHexString("#ffd452"), + color::fromHexString("#e8ff52"), + color::fromHexString("#a8ff52"), + color::fromHexString("#67ff52"), + color::fromHexString("#52ff7d"), + color::fromHexString("#52ffbe"), + color::fromHexString("#52ffff"), + color::fromHexString("#52beff"), + color::fromHexString("#527dff"), + color::fromHexString("#6752ff"), + color::fromHexString("#a852ff"), + color::fromHexString("#e952ff"), + color::fromHexString("#ff52d4"), + color::fromHexString("#ff5293"), + }; + + system::init(); + logger::init(); + random::init(); + ui::init(); + + if (asset::systemDir.empty()) + { + if (const char* const bundlePath = (plugin != nullptr ? plugin->getBundlePath() : + ui != nullptr ? ui->getBundlePath() : nullptr)) + { + if (const char* const resourcePath = getResourcePath(bundlePath)) + { + asset::systemDir = resourcePath; + asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); + } + } + + if (asset::systemDir.empty() || ! system::exists(asset::systemDir) || ! system::exists(asset::bundlePath)) + { + #ifdef CARDINAL_PLUGIN_SOURCE_DIR + // Make system dir point to source code location as fallback + asset::systemDir = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "Rack"; + asset::bundlePath.clear(); + + // If source code dir does not exist use install target prefix as system dir + if (!system::exists(system::join(asset::systemDir, "res"))) + #endif + { + #if defined(DISTRHO_OS_WASM) + asset::systemDir = "/resources"; + #elif defined(ARCH_MAC) + asset::systemDir = "/Library/Application Support/Cardinal"; + #elif defined(ARCH_WIN) + const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles); + if (! commonprogfiles.empty()) + asset::systemDir = system::join(commonprogfiles, "Cardinal"); + #else + asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; + #endif + + asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); + } + } + + asset::userDir = asset::systemDir; + } + + const std::string patchesPath = asset::patchesPath(); + #ifdef DISTRHO_OS_WASM + templatePath = system::join(patchesPath, CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME); + #else + templatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); + #endif + factoryTemplatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); + + // Log environment + INFO("%s %s %s, compatible with Rack version %s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); + INFO("%s", system::getOperatingSystemInfo().c_str()); + INFO("Binary filename: %s", getBinaryFilename()); + if (plugin != nullptr) { + INFO("Bundle path: %s", plugin->getBundlePath()); + } else if (ui != nullptr) { + INFO("Bundle path: %s", ui->getBundlePath()); + } + INFO("System directory: %s", asset::systemDir.c_str()); + INFO("User directory: %s", asset::userDir.c_str()); + INFO("Template patch: %s", templatePath.c_str()); + INFO("System template patch: %s", factoryTemplatePath.c_str()); + + // Report to user if something is wrong with the installation + if (asset::systemDir.empty()) + { + d_stderr2("Failed to locate Cardinal plugin bundle.\n" + "Install Cardinal with its bundle folder intact and try again."); + } + else if (! system::exists(asset::systemDir)) + { + d_stderr2("System directory \"%s\" does not exist.\n" + "Make sure Cardinal was downloaded and installed correctly.", asset::systemDir.c_str()); + } + + INFO("Initializing plugins"); + plugin::initStaticPlugins(); + + INFO("Initializing plugin browser DB"); + app::browserInit(); + +#ifdef CARDINAL_INIT_OSC_THREAD + INFO("Initializing OSC Remote control"); + oscServer = lo_server_new_with_proto(REMOTE_HOST_PORT, LO_UDP, osc_error_handler); + DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr,); + + lo_server_add_method(oscServer, "/hello", "", osc_hello_handler, this); + lo_server_add_method(oscServer, "/load", "b", osc_load_handler, this); + lo_server_add_method(oscServer, "/screenshot", "b", osc_screenshot_handler, this); + lo_server_add_method(oscServer, nullptr, nullptr, osc_fallback_handler, nullptr); + + startThread(); +#else + INFO("OSC Remote control is not enabled in this build"); +#endif +} + +Initializer::~Initializer() +{ + using namespace rack; + +#ifdef CARDINAL_INIT_OSC_THREAD + if (oscServer != nullptr) + { + stopThread(5000); + lo_server_del_method(oscServer, nullptr, nullptr); + lo_server_free(oscServer); + oscServer = nullptr; + } +#endif + + INFO("Clearing asset paths"); + asset::bundlePath.clear(); + asset::systemDir.clear(); + asset::userDir.clear(); + + INFO("Destroying plugins"); + plugin::destroyStaticPlugins(); + + INFO("Destroying colourized assets"); + asset::destroy(); + + INFO("Destroying settings"); + settings::destroy(); + + INFO("Destroying logger"); + logger::destroy(); +} + +#ifdef CARDINAL_INIT_OSC_THREAD +void Initializer::run() +{ + INFO("OSC Thread Listening for remote commands"); + + while (! shouldThreadExit()) + { + d_msleep(200); + while (lo_server_recv_noblock(oscServer, 0) != 0) {} + } + + INFO("OSC Thread Closed"); +} +#endif + +// -------------------------------------------------------------------------------------------------------------------- + END_NAMESPACE_DISTRHO // -------------------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 188a454c..601fad49 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -15,14 +15,17 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ -#include - #pragma once +#include "DistrhoUtils.hpp" + +#include + #ifdef HAVE_LIBLO // # define REMOTE_HOST "localhost" # define REMOTE_HOST "192.168.51.1" # define REMOTE_HOST_PORT "2228" +# include "extra/Thread.hpp" #endif #ifdef DISTRHO_OS_WASM @@ -35,6 +38,8 @@ extern const std::string CARDINAL_VERSION; +// ----------------------------------------------------------------------------------------------------------- + namespace rack { namespace ui { @@ -65,6 +70,8 @@ extern char* patchStorageSlug; } // namespace rack +// ----------------------------------------------------------------------------------------------------------- + namespace patchUtils { void loadDialog(); @@ -86,3 +93,37 @@ void deployToRemote(); void sendScreenshotToRemote(const char* screenshot); } // namespace patchUtils + +// ----------------------------------------------------------------------------------------------------------- + +#if defined(HAVE_LIBLO) && defined(HEADLESS) && DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# define CARDINAL_INIT_OSC_THREAD +#endif + +START_NAMESPACE_DISTRHO + +class CardinalBasePlugin; +class CardinalBaseUI; + +struct Initializer +#ifdef CARDINAL_INIT_OSC_THREAD + : public Thread +#endif +{ +#ifdef CARDINAL_INIT_OSC_THREAD + lo_server oscServer = nullptr; + CardinalBasePlugin* oscPlugin = nullptr; +#endif + std::string templatePath; + std::string factoryTemplatePath; + + Initializer(const CardinalBasePlugin* plugin, const CardinalBaseUI* ui); + ~Initializer(); +#ifdef CARDINAL_INIT_OSC_THREAD + void run() override; +#endif +}; + +END_NAMESPACE_DISTRHO + +// ----------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index a27e82e1..ac6a9429 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -31,8 +31,8 @@ #define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#mini" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#mini" -#define DISTRHO_PLUGIN_NAME "Cardinal FX" -#define DISTRHO_PLUGIN_LABEL "CardinalFX" +#define DISTRHO_PLUGIN_NAME "Cardinal Mini" +#define DISTRHO_PLUGIN_LABEL "CardinalMini" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index f8839490..7ec6012c 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -15,7 +15,6 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ -#include #include #include #include @@ -24,7 +23,6 @@ #include #include -#include #include #include #include @@ -52,16 +50,6 @@ # include "extra/SharedResourcePointer.hpp" #endif -#if CARDINAL_VARIANT_FX -# define CARDINAL_TEMPLATE_NAME "init/fx.vcv" -#elif CARDINAL_VARIANT_NATIVE -# define CARDINAL_TEMPLATE_NAME "init/native.vcv" -#elif CARDINAL_VARIANT_SYNTH -# define CARDINAL_TEMPLATE_NAME "init/synth.vcv" -#else -# define CARDINAL_TEMPLATE_NAME "init/main.vcv" -#endif - static const constexpr uint kCardinalStateBaseCount = 3; // patch, screenshot, comment #ifndef HEADLESS @@ -76,17 +64,9 @@ static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount; extern const std::string CARDINAL_VERSION; namespace rack { -namespace asset { -std::string patchesPath(); -void destroy(); -} namespace engine { void Engine_setAboutToClose(Engine*); } -namespace plugin { -void initStaticPlugins(); -void destroyStaticPlugins(); -} } START_NAMESPACE_DISTRHO @@ -98,6 +78,10 @@ bool d_isDiffHigherThanLimit(const T& v1, const T& v2, const T& limit) return v1 != v2 ? (v1 > v2 ? v1 - v2 : v2 - v1) > limit : false; } +#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +const char* UI::getBundlePath() const noexcept { return nullptr; } +#endif + // ----------------------------------------------------------------------------------------------------------- #ifdef DISTRHO_OS_WASM @@ -143,288 +127,6 @@ static char* getPatchStorageSlug() { // ----------------------------------------------------------------------------------------------------------- -struct Initializer -#if defined(HAVE_LIBLO) && defined(HEADLESS) -: public Thread -#endif -{ -#if defined(HAVE_LIBLO) && defined(HEADLESS) - lo_server oscServer = nullptr; - CardinalBasePlugin* oscPlugin = nullptr; -#endif - std::string templatePath; - std::string factoryTemplatePath; - - Initializer(const CardinalBasePlugin* const plugin) - { - using namespace rack; - -#ifdef DISTRHO_OS_WASM - settings::allowCursorLock = true; -#else - settings::allowCursorLock = false; -#endif - settings::autoCheckUpdates = false; - settings::autosaveInterval = 0; - settings::devMode = true; - settings::isPlugin = true; - settings::skipLoadOnLaunch = true; - settings::showTipsOnLaunch = false; - settings::windowPos = math::Vec(0, 0); -#ifdef HEADLESS - settings::headless = true; -#endif - - // copied from https://community.vcvrack.com/t/16-colour-cable-palette/15951 - settings::cableColors = { - color::fromHexString("#ff5252"), - color::fromHexString("#ff9352"), - color::fromHexString("#ffd452"), - color::fromHexString("#e8ff52"), - color::fromHexString("#a8ff52"), - color::fromHexString("#67ff52"), - color::fromHexString("#52ff7d"), - color::fromHexString("#52ffbe"), - color::fromHexString("#52ffff"), - color::fromHexString("#52beff"), - color::fromHexString("#527dff"), - color::fromHexString("#6752ff"), - color::fromHexString("#a852ff"), - color::fromHexString("#e952ff"), - color::fromHexString("#ff52d4"), - color::fromHexString("#ff5293"), - }; - - system::init(); - logger::init(); - random::init(); - ui::init(); - - if (asset::systemDir.empty()) - { - if (const char* const bundlePath = plugin->getBundlePath()) - { - if (const char* const resourcePath = getResourcePath(bundlePath)) - { - asset::systemDir = resourcePath; - asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); - } - } - - if (asset::systemDir.empty() || ! system::exists(asset::systemDir) || ! system::exists(asset::bundlePath)) - { - #ifdef CARDINAL_PLUGIN_SOURCE_DIR - // Make system dir point to source code location as fallback - asset::systemDir = CARDINAL_PLUGIN_SOURCE_DIR DISTRHO_OS_SEP_STR "Rack"; - asset::bundlePath.clear(); - - // If source code dir does not exist use install target prefix as system dir - if (!system::exists(system::join(asset::systemDir, "res"))) - #endif - { - #if defined(DISTRHO_OS_WASM) - asset::systemDir = "/resources"; - #elif defined(ARCH_MAC) - asset::systemDir = "/Library/Application Support/Cardinal"; - #elif defined(ARCH_WIN) - const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles); - if (! commonprogfiles.empty()) - asset::systemDir = system::join(commonprogfiles, "Cardinal"); - #else - asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; - #endif - - asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); - } - } - - asset::userDir = asset::systemDir; - } - - const std::string patchesPath = asset::patchesPath(); - #ifdef DISTRHO_OS_WASM - templatePath = system::join(patchesPath, CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME); - #else - templatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); - #endif - factoryTemplatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); - - // Log environment - INFO("%s %s %s, compatible with Rack version %s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); - INFO("%s", system::getOperatingSystemInfo().c_str()); - INFO("Binary filename: %s", getBinaryFilename()); - INFO("Bundle path: %s", plugin->getBundlePath()); - INFO("System directory: %s", asset::systemDir.c_str()); - INFO("User directory: %s", asset::userDir.c_str()); - INFO("Template patch: %s", templatePath.c_str()); - INFO("System template patch: %s", factoryTemplatePath.c_str()); - - // Report to user if something is wrong with the installation - if (asset::systemDir.empty()) - { - d_stderr2("Failed to locate Cardinal plugin bundle.\n" - "Install Cardinal with its bundle folder intact and try again."); - } - else if (! system::exists(asset::systemDir)) - { - d_stderr2("System directory \"%s\" does not exist.\n" - "Make sure Cardinal was downloaded and installed correctly.", asset::systemDir.c_str()); - } - - INFO("Initializing plugins"); - plugin::initStaticPlugins(); - - INFO("Initializing plugin browser DB"); - app::browserInit(); - -#if defined(HAVE_LIBLO) && defined(HEADLESS) - INFO("Initializing OSC Remote control"); - oscServer = lo_server_new_with_proto(REMOTE_HOST_PORT, LO_UDP, osc_error_handler); - DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr,); - - lo_server_add_method(oscServer, "/hello", "", osc_hello_handler, this); - lo_server_add_method(oscServer, "/load", "b", osc_load_handler, this); - lo_server_add_method(oscServer, "/screenshot", "b", osc_screenshot_handler, this); - lo_server_add_method(oscServer, nullptr, nullptr, osc_fallback_handler, nullptr); - - startThread(); -#elif defined(HEADLESS) - INFO("OSC Remote control is not enabled in this build"); -#endif - } - - ~Initializer() - { - using namespace rack; - -#if defined(HAVE_LIBLO) && defined(HEADLESS) - if (oscServer != nullptr) - { - stopThread(5000); - lo_server_del_method(oscServer, nullptr, nullptr); - lo_server_free(oscServer); - oscServer = nullptr; - } -#endif - - INFO("Clearing asset paths"); - asset::bundlePath.clear(); - asset::systemDir.clear(); - asset::userDir.clear(); - - INFO("Destroying plugins"); - plugin::destroyStaticPlugins(); - - INFO("Destroying colourized assets"); - asset::destroy(); - - INFO("Destroying settings"); - settings::destroy(); - - INFO("Destroying logger"); - logger::destroy(); - } - -#if defined(HAVE_LIBLO) && defined(HEADLESS) - void run() override - { - INFO("OSC Thread Listening for remote commands"); - - while (! shouldThreadExit()) - { - d_msleep(200); - while (lo_server_recv_noblock(oscServer, 0) != 0) {} - } - - INFO("OSC Thread Closed"); - } - - static void osc_error_handler(int num, const char* msg, const char* path) - { - d_stderr("Cardinal OSC Error: code: %i, msg: \"%s\", path: \"%s\")", num, msg, path); - } - - static int osc_fallback_handler(const char* const path, const char* const types, lo_arg**, int, lo_message, void*) - { - d_stderr("Cardinal OSC unhandled message \"%s\" with types \"%s\"", path, types); - return 0; - } - - static int osc_hello_handler(const char*, const char*, lo_arg**, int, const lo_message m, void* const self) - { - d_stdout("osc_hello_handler()"); - const lo_address source = lo_message_get_source(m); - lo_send_from(source, static_cast(self)->oscServer, LO_TT_IMMEDIATE, "/resp", "ss", "hello", "ok"); - return 0; - } - - static int osc_load_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) - { - d_stdout("osc_load_handler()"); - DISTRHO_SAFE_ASSERT_RETURN(argc == 1, 0); - DISTRHO_SAFE_ASSERT_RETURN(types != nullptr && types[0] == 'b', 0); - - const int32_t size = argv[0]->blob.size; - DISTRHO_SAFE_ASSERT_RETURN(size > 4, 0); - - const uint8_t* const blob = (uint8_t*)(&argv[0]->blob.data); - DISTRHO_SAFE_ASSERT_RETURN(blob != nullptr, 0); - - bool ok = false; - - if (CardinalBasePlugin* const plugin = static_cast(self)->oscPlugin) - { - CardinalPluginContext* const context = plugin->context; - std::vector data(size); - std::memcpy(data.data(), blob, size); - - rack::contextSet(context); - rack::system::removeRecursively(context->patch->autosavePath); - rack::system::createDirectories(context->patch->autosavePath); - try { - rack::system::unarchiveToDirectory(data, context->patch->autosavePath); - context->patch->loadAutosave(); - ok = true; - } - catch (rack::Exception& e) { - WARN("%s", e.what()); - } - rack::contextSet(nullptr); - } - - const lo_address source = lo_message_get_source(m); - lo_send_from(source, static_cast(self)->oscServer, - LO_TT_IMMEDIATE, "/resp", "ss", "load", ok ? "ok" : "fail"); - return 0; - } - - static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) - { - d_stdout("osc_screenshot_handler()"); - DISTRHO_SAFE_ASSERT_RETURN(argc == 1, 0); - DISTRHO_SAFE_ASSERT_RETURN(types != nullptr && types[0] == 'b', 0); - - const int32_t size = argv[0]->blob.size; - DISTRHO_SAFE_ASSERT_RETURN(size > 4, 0); - - const uint8_t* const blob = (uint8_t*)(&argv[0]->blob.data); - DISTRHO_SAFE_ASSERT_RETURN(blob != nullptr, 0); - - bool ok = false; - - if (CardinalBasePlugin* const plugin = static_cast(self)->oscPlugin) - ok = plugin->updateStateValue("screenshot", String::asBase64(blob, size).buffer()); - - const lo_address source = lo_message_get_source(m); - lo_send_from(source, static_cast(self)->oscServer, - LO_TT_IMMEDIATE, "/resp", "ss", "screenshot", ok ? "ok" : "fail"); - return 0; - } -#endif -}; - -// ----------------------------------------------------------------------------------------------------------- - struct ScopedContext { ScopedContext(const CardinalBasePlugin* const plugin) { @@ -479,9 +181,9 @@ class CardinalPlugin : public CardinalBasePlugin CardinalPlugin() : CardinalBasePlugin(kModuleParameters + kWindowParameterCount + 1, 0, kCardinalStateCount), #ifdef DISTRHO_OS_WASM - fInitializer(new Initializer(this)), + fInitializer(new Initializer(this, static_cast(nullptr))), #else - fInitializer(this), + fInitializer(this, static_cast(nullptr)), #endif #if DISTRHO_PLUGIN_NUM_INPUTS != 0 fAudioBufferCopy(nullptr), @@ -571,14 +273,14 @@ class CardinalPlugin : public CardinalBasePlugin context->patch->templatePath = context->patch->factoryTemplatePath; } - #if defined(HAVE_LIBLO) && defined(HEADLESS) + #ifdef CARDINAL_INIT_OSC_THREAD fInitializer->oscPlugin = this; #endif } ~CardinalPlugin() override { - #if defined(HAVE_LIBLO) && defined(HEADLESS) + #ifdef CARDINAL_INIT_OSC_THREAD fInitializer->oscPlugin = nullptr; #endif diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 49caa38c..451dd9bd 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -39,7 +39,6 @@ # include # include # include -# include "CardinalCommon.hpp" # include #endif @@ -47,15 +46,27 @@ # undef DEBUG #endif -#include +#include "Application.hpp" #include "AsyncDialog.hpp" +#include "CardinalCommon.hpp" #include "PluginContext.hpp" #include "WindowParameters.hpp" +#ifndef DISTRHO_OS_WASM +# include "extra/SharedResourcePointer.hpp" +#endif + +#ifndef HEADLESS +# include "extra/ScopedValueSetter.hpp" +#endif + namespace rack { namespace app { widget::Widget* createMenuBar(bool isStandalone); } +namespace engine { +void Engine_setAboutToClose(Engine*); +} namespace window { void WindowSetPluginUI(Window* window, DISTRHO_NAMESPACE::UI* ui); void WindowSetMods(Window* window, int mods); @@ -65,7 +76,14 @@ namespace window { START_NAMESPACE_DISTRHO -// ----------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- + +#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +const char* Plugin::getBundlePath() const noexcept { return nullptr; } +bool Plugin::writeMidiEvent(const MidiEvent&) noexcept { return false; } +#endif + +// -------------------------------------------------------------------------------------------------------------------- #ifdef DISTRHO_OS_WASM struct WasmWelcomeDialog : rack::widget::OpaqueWidget @@ -268,6 +286,15 @@ static void downloadRemotePatchSucceeded(const char* const filename) class CardinalUI : public CardinalBaseUI, public WindowParametersCallback { + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + #ifdef DISTRHO_OS_WASM + ScopedPointer fInitializer; + #else + SharedResourcePointer fInitializer; + #endif + std::string fAutosavePath; + #endif + rack::math::Vec lastMousePos; WindowParameters windowParameters; int rateLimitStep = 0; @@ -305,8 +332,65 @@ class CardinalUI : public CardinalBaseUI, public: CardinalUI() - : CardinalBaseUI(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT) + : CardinalBaseUI(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT), + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + #ifdef DISTRHO_OS_WASM + fInitializer(new Initializer(static_cast(nullptr), this)), + #else + fInitializer(static_cast(nullptr), this), + #endif + #endif + lastMousePos() { + rack::contextSet(context); + + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + // create unique temporary path for this instance + try { + char uidBuf[24]; + const std::string tmp = rack::system::getTempDirectory(); + + for (int i=1;; ++i) + { + std::snprintf(uidBuf, sizeof(uidBuf), "Cardinal.%04d", i); + const std::string trypath = rack::system::join(tmp, uidBuf); + + if (! rack::system::exists(trypath)) + { + if (rack::system::createDirectories(trypath)) + fAutosavePath = trypath; + break; + } + } + } DISTRHO_SAFE_EXCEPTION("create unique temporary path"); + + const float sampleRate = getSampleRate(); + rack::settings::sampleRate = sampleRate; + + context->bufferSize = 128; + context->sampleRate = sampleRate; + + context->engine = new rack::engine::Engine; + context->engine->setSampleRate(sampleRate); + + context->history = new rack::history::State; + context->patch = new rack::patch::Manager; + context->patch->autosavePath = fAutosavePath; + context->patch->templatePath = fInitializer->templatePath; + context->patch->factoryTemplatePath = fInitializer->factoryTemplatePath; + + context->event = new rack::widget::EventState; + context->scene = new rack::app::Scene; + context->event->rootWidget = context->scene; + + context->window = new rack::window::Window; + + context->patch->loadTemplate(); + context->scene->rackScroll->reset(); + // swap to factory template after first load + context->patch->templatePath = context->patch->factoryTemplatePath; + #endif + Window& window(getWindow()); window.setIgnoringKeyRepeat(true); @@ -319,8 +403,6 @@ class CardinalUI : public CardinalBaseUI, if (scaleFactor != 1.0) setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor); - rack::contextSet(context); - rack::window::WindowSetPluginUI(context->window, this); if (rack::widget::Widget* const menuBar = context->scene->menuBar) @@ -408,6 +490,23 @@ class CardinalUI : public CardinalBaseUI, rack::window::WindowSetPluginUI(context->window, nullptr); + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + { + const ScopedContext sc(this); + context->patch->clear(); + + // do a little dance to prevent context scene deletion from saving to temp dir + #ifndef HEADLESS + const ScopedValueSetter svs(rack::settings::headless, true); + #endif + Engine_setAboutToClose(context->engine); + delete context; + } + + if (! fAutosavePath.empty()) + rack::system::removeRecursively(fAutosavePath); + #endif + rack::contextSet(nullptr); } diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index af12cb25..baa9f9da 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -201,8 +201,10 @@ endif # -------------------------------------------------------------- # Setup resources -CORE_RESOURCES = patches -CORE_RESOURCES += $(subst ../Rack/res/,,$(wildcard ../Rack/res/ComponentLibrary/*.svg ../Rack/res/fonts/*.ttf)) +CORE_RESOURCES = $(subst ../Rack/res/,,$(wildcard ../Rack/res/ComponentLibrary/*.svg ../Rack/res/fonts/*.ttf)) +# ifneq ($(CARDINAL_VARIANT),mini) +CORE_RESOURCES += patches +# endif LV2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).lv2/resources/%) VST3_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%) @@ -243,15 +245,19 @@ endif # -------------------------------------------------------------- # mini variant UI -# ifeq ($(CARDINAL_VARIANT),mini) -# ifneq ($(HEADLESS)$(MOD_BUILD),true) -# FILES_UI = CardinalUI.cpp -# FILES_UI += glfw.cpp -# FILES_UI += Window.cpp -# EXTRA_UI_DEPENDENCIES = $(subst -headless,,$(EXTRA_DSP_DEPENDENCIES)) -# EXTRA_UI_LIBS = $(subst -headless,,$(EXTRA_DSP_LIBS)) -# endif -# endif +ifeq ($(CARDINAL_VARIANT),mini) +ifneq ($(HEADLESS)$(MOD_BUILD),true) +FILES_UI = CardinalUI.cpp +FILES_UI += CardinalCommon.cpp +FILES_UI += common.cpp +FILES_UI += glfw.cpp +FILES_UI += Window.cpp +EXTRA_UI_DEPENDENCIES = $(subst -headless,,$(EXTRA_DSP_DEPENDENCIES)) +EXTRA_UI_LIBS = -Wl,--start-group +EXTRA_UI_LIBS += $(subst -headless,,$(EXTRA_DSP_LIBS)) +EXTRA_UI_LIBS += -Wl,--end-group +endif +endif # -------------------------------------------------------------- # Do some magic @@ -467,6 +473,7 @@ endif all: $(TARGETS) lv2: $(LV2_RESOURCES) +lv2_sep: $(LV2_RESOURCES) vst2: $(VST2_RESOURCES) vst3: $(VST3_RESOURCES) clap: $(CLAP_RESOURCES) diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 1b51333d..2e8a612e 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -189,9 +189,6 @@ class CardinalBaseUI : public UI { context->tlw = nullptr; context->ui = nullptr; - #if !DISTRHO_PLUGIN_WANT_DIRECT_ACCESS - delete context; - #endif } }; #endif diff --git a/src/extra/SharedResourcePointer.hpp b/src/extra/SharedResourcePointer.hpp index 005c42e9..4688ade3 100644 --- a/src/extra/SharedResourcePointer.hpp +++ b/src/extra/SharedResourcePointer.hpp @@ -107,6 +107,13 @@ class SharedResourcePointer initialise_variant(variant); } + template + SharedResourcePointer(const T1* const v1, const T2* const v2) + : sharedObject(nullptr) + { + initialise_variant2(v1, v2); + } + SharedResourcePointer (const SharedResourcePointer&) : sharedObject(nullptr) { @@ -179,6 +186,18 @@ class SharedResourcePointer sharedObject = holder.sharedInstance; } + template + void initialise_variant2(const T1* const v1, const T2* const v2) + { + SharedObjectHolder& holder = getSharedObjectHolder(); + const SpinLock::ScopedLockType sl (holder.lock); + + if (++(holder.refCount) == 1) + holder.sharedInstance = new SharedObjectType(v1, v2); + + sharedObject = holder.sharedInstance; + } + // There's no need to assign to a SharedResourcePointer because every // instance of the class is exactly the same! SharedResourcePointer& operator= (const SharedResourcePointer&) = delete; diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 32fddbbc..12c52d99 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -56,6 +56,7 @@ #include "Application.hpp" #include "extra/String.hpp" #include "../CardinalCommon.hpp" +#include "../PluginContext.hpp" #include "../WindowParameters.hpp" #ifndef DGL_NO_SHARED_RESOURCES @@ -148,12 +149,14 @@ struct Window::Internal { DGL_NAMESPACE::NanoTopLevelWidget* tlw = nullptr; DISTRHO_NAMESPACE::WindowParameters params; DISTRHO_NAMESPACE::WindowParametersCallback* callback = nullptr; +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS DGL_NAMESPACE::Application hiddenApp; DGL_NAMESPACE::Window hiddenWindow; NVGcontext* r_vg = nullptr; NVGcontext* r_fbVg = nullptr; NVGcontext* o_vg = nullptr; NVGcontext* o_fbVg = nullptr; +#endif math::Vec size = WINDOW_SIZE_MIN; @@ -176,12 +179,16 @@ struct Window::Internal { int fbCount = 0; Internal() +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS : hiddenApp(false), hiddenWindow(hiddenApp) { hiddenWindow.setIgnoringKeyRepeat(true); hiddenApp.idle(); } +#else + {} +#endif }; @@ -203,12 +210,17 @@ static int loadFallbackFont(NVGcontext* const vg) Window::Window() { internal = new Internal; - DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); - // Set up NanoVG const int nvgFlags = NVG_ANTIALIAS; + +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); vg = nvgCreateGL(nvgFlags); +#else + vg = static_cast(APP)->tlw->getContext(); +#endif DISTRHO_SAFE_ASSERT_RETURN(vg != nullptr,); + #ifdef NANOVG_GLES2 fbVg = nvgCreateSharedGLES2(vg, nvgFlags); #else @@ -268,6 +280,7 @@ void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) window->internal->tlw = tlw; window->internal->size = rack::math::Vec(tlw->getWidth(), tlw->getHeight()); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS // Set up NanoVG window->internal->r_vg = tlw->getContext(); #ifdef NANOVG_GLES2 @@ -299,6 +312,7 @@ void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) image.second->handle = nvgCreateImage(window->vg, image.second->ofilename.c_str(), NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); } +#endif // Init settings WindowParametersRestore(window); @@ -311,6 +325,7 @@ void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) widget::Widget::ContextDestroyEvent e; APP->scene->onContextDestroy(e); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS // swap contexts window->uiFont->vg = window->internal->o_vg; window->vg = window->internal->o_vg; @@ -338,6 +353,7 @@ void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) nvgDeleteGLES2(window->internal->r_fbVg); #else nvgDeleteGL2(window->internal->r_fbVg); +#endif #endif window->internal->tlw = nullptr; @@ -375,6 +391,7 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) window->internal->ui = ui; window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS // Set up NanoVG window->internal->r_vg = ui->getContext(); #ifdef NANOVG_GLES2 @@ -406,6 +423,7 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) image.second->handle = nvgCreateImage(window->vg, image.second->ofilename.c_str(), NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); } +#endif // Init settings WindowParametersRestore(window); @@ -418,6 +436,7 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) widget::Widget::ContextDestroyEvent e; APP->scene->onContextDestroy(e); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS // swap contexts window->uiFont->vg = window->internal->o_vg; window->vg = window->internal->o_vg; @@ -445,6 +464,7 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) nvgDeleteGLES2(window->internal->r_fbVg); #else nvgDeleteGL2(window->internal->r_fbVg); +#endif #endif window->internal->tlw = nullptr; @@ -460,9 +480,11 @@ void WindowSetMods(Window* const window, const int mods) Window::~Window() { { +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); internal->hiddenWindow.close(); internal->hiddenApp.idle(); +#endif // Fonts and Images in the cache must be deleted before the NanoVG context is deleted internal->fontCache.clear(); @@ -470,12 +492,20 @@ Window::~Window() { if (vg != nullptr) { +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #if defined NANOVG_GLES2 nvgDeleteGLES2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); nvgDeleteGLES2(internal->o_vg != nullptr ? internal->o_vg : vg); #else nvgDeleteGL2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); nvgDeleteGL2(internal->o_vg != nullptr ? internal->o_vg : vg); +#endif +#else +#if defined NANOVG_GLES2 + nvgDeleteGLES2(fbVg); +#else + nvgDeleteGL2(fbVg); +#endif #endif } } From b00e0f7c018c50c9347a9439541aae8f459025e5 Mon Sep 17 00:00:00 2001 From: tpltnt <1172976+tpltnt@users.noreply.github.com> Date: Mon, 26 Dec 2022 15:51:47 +0100 Subject: [PATCH 174/451] Readme links (#466) * added links to numbered names * brands A-E linked * brands F-L linked * brands M-Z linked --- README.md | 142 +++++++++++++++++++++++++++--------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index 48461f2a..9efde38b 100644 --- a/README.md +++ b/README.md @@ -106,77 +106,77 @@ But a couple of modules background's have their colors flipped, because damn we At the moment the following 3rd-party modules are provided: -- 21kHz -- 8Mode -- Aaron Static -- alef's bits -- AlgoritmArte -- Amalgamated Harmonics -- Animated Circuits -- Arable Instruments -- Aria Salvatrice -- AS -- Audible Instruments -- Autinn -- Axioma -- Bacon Music -- Befaco -- Bidoo -- Bogaudio -- Catro/Modulo -- cf -- ChowDSP -- dBiz -- DrumKit -- E-Series -- ExpertSleepers Encoders -- Extratone -- Fehler Fabrik -- forsitan modulare -- Fundamental -- Glue the Giant -- GoodSheperd -- Grande -- H4N4 Modules -- Hampton Harmonics -- HetrickCV -- ihtsyn -- Impromptu -- JW-Modules -- kocmoc -- LifeFormModular -- Lilac Loop -- Little Utils -- Lomas Modules -- Lyrae Modules -- Meander -- MindMeld -- ML Modules -- Mockba Modular -- Mog -- mscHack -- MSM -- Myth -- Nonlinear Circuits -- Orbits -- Parable Instruments -- Path Set -- PinkTrombone -- Prism -- rackwindows -- RebelTech -- repelzen -- Sapphire -- Sonus Modular -- stocaudio -- Stoermelder Pack-One -- Surge XT -- unless_modules -- Valley -- Voxglitch -- WhatTheRack -- ZetaCarinae -- ZZC +- [21kHz](https://github.com/netboy3/21kHz-rack-plugins) +- [8Mode](https://github.com/8Mode/8Mode-VCV_Modules) +- [Aaron Static](https://github.com/aaronstatic/AaronStatic_modules) +- [alef's bits](https://github.com/alefnull/alefsbits) +- [AlgoritmArte](https://github.com/algoritmarte/AlgoritmarteVCVPlugin) +- [Amalgamated Harmonics](https://github.com/jhoar/AmalgamatedHarmonics) +- [Animated Circuits](https://github.com/AnimatedCircuits/RackModules) +- [Arable Instruments](https://github.com/adbrant/ArableInstruments) +- [Aria Salvatrice](https://aria.dog/modules/) +- [AS](https://github.com/AScustomWorks/AS) +- [Audible Instruments](https://vcvrack.com/AudibleInstruments) +- [Autinn](https://github.com/NikolaiVChr/Autinn) +- [Axioma](https://github.com/kauewerner/Axioma) +- [Bacon Music](https://github.com/baconpaul/BaconPlugs) +- [Befaco](https://github.com/VCVRack/Befaco) +- [Bidoo](https://github.com/sebastien-bouffier/Bidoo) +- [Bogaudio](https://github.com/bogaudio/BogaudioModules) +- [Catro/Modulo](https://github.com/catronomix/catro-modulo) +- [cf](https://github.com/cfoulc/cf) +- [ChowDSP](https://github.com/jatinchowdhury18/ChowDSP-VCV) +- [dBiz](https://github.com/dBiz/dBiz) +- [DrumKit](https://svmodular.com/plugin/vcv/drumkit.html) +- [E-Series](https://github.com/VCVRack/ESeries) +- [ExpertSleepers Encoders](https://expert-sleepers.co.uk/vcvrack_encoders.html) +- [Extratone](http://extratone.xyz/modules) +- [Fehler Fabrik](https://github.com/RCameron93/FehlerFabrik) +- [forsitan modulare](tps://github.com/gosub/forsitan-modulare) +- [Fundamental](https://github.com/VCVRack/Fundamental) +- [Glue the Giant](https://github.com/gluethegiant/gtg-rack) +- [GoodSheperd](https://github.com/jensschulze/GoodSheperd) +- [Grande](https://github.com/dbgrande/GrandeModular) +- [H4N4 Modules](https://github.com/hannakoppelaar/h4n4-modules) +- [Hampton Harmonics](https://gitlab.com/hampton-harmonics/hampton-harmonics-modules) +- [HetrickCV](https://github.com/mhetrick/hetrickcv) +- [ihtsyn](https://github.com/nysthi/ihtsyn) +- [Impromptu](https://github.com/MarcBoule/ImpromptuModular) +- [JW-Modules](https://github.com/jeremywen/JW-Modules) +- [kocmoc](https://github.com/janne808/kocmoc-rack-modules) +- [LifeFormModular](https://github.com/TimeControlledOrganism/LifeFormModular) +- [Lilac Loop](https://grough.github.io/lilac-loop-vcv) +- [Little Utils](https://github.com/mgunyho/Little-Utils) +- [Lomas Modules](https://github.com/LomasModules/LomasModules) +- [Lyrae Modules](https://github.com/VegaDeftwing/LyraeModules) +- [Meander](https://github.com/knchaffin/Meander) +- [MindMeld](https://github.com/MarcBoule/MindMeldModular) +- [ML Modules](https://github.com/martin-lueders/ML_modules) +- [Mockba Modular](https://github.com/MockbaTheBorg/MockbaModular) +- [Mog](https://github.com/JustMog/Mog-VCV) +- [mscHack](https://github.com/mschack/VCV-Rack-Plugins) +- [MSM](https://github.com/netboy3/MSM-vcvrack-plugin) +- [Myth](https://github.com/Ahineya/vcv-myth-plugin) +- [Nonlinear Circuits](https://github.com/mhetrick/nonlinearcircuits) +- [Orbits](https://github.com/RareBreeds/Orbits) +- [Parable Instruments](https://github.com/adbrant/ArableInstruments) +- [Path Set](https://github.com/patheros/PathSetModules) +- [PinkTrombone](https://github.com/VegaDeftwing/PinkTromboneVCV) +- [Prism](https://github.com/SteveRussell33/Prism) +- [rackwindows](https://github.com/n0jo/rackwindows) +- [RebelTech](https://github.com/hemmer/rebel-tech-vcv) +- [repelzen](https://github.com/wiqid/repelzen) +- [Sapphire](https://github.com/cosinekitty/sapphire) +- [Sonus Modular](https://gitlab.com/sonusdept/sonusmodular) +- [stocaudio](https://github.com/aptrn/stocaudio-modules) +- [Stoermelder Pack-One](https://github.com/stoermelder/vcvrack-packone) +- [Surge XT](https://github.com/surge-synthesizer/surge-rack) +- [unless_modules](https://gitlab.com/unlessgames/unless_modules) +- [Valley](https://github.com/ValleyAudio/ValleyRackFree) +- [Voxglitch](https://github.com/clone45/voxglitch) +- [WhatTheRack](https://github.com/korfuri/WhatTheRack) +- [ZetaCarinae](https://github.com/mhampton/ZetaCarinaeModules) +- [ZZC](https://github.com/zezic/ZZC) Additionally Cardinal provides its own modules for DAW/Host automation, time position, audio to CV pitch conversion and internal plugin hosting. From a53f15af7785f56c00cecfe57c89a9f91ecee82a Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Dec 2022 14:05:57 +0000 Subject: [PATCH 175/451] A few more details for mini variant Signed-off-by: falkTX --- patches/init/mini.vcv | 119 +++++++++++++++++++++++++ plugins/Makefile | 16 +++- plugins/plugins-mini.cpp | 42 +++++++++ src/CardinalCommon.cpp | 76 ++++++++++------ src/CardinalCommon.hpp | 5 ++ src/CardinalMini/CardinalCommon-UI.cpp | 19 ++++ src/CardinalMini/CardinalCommon.cpp | 20 ++++- src/CardinalPlugin.cpp | 29 +++++- src/CardinalUI.cpp | 65 +++++++++++--- src/Makefile.cardinal.mk | 4 +- src/PluginContext.hpp | 4 - src/custom/RemoteNanoVG.cpp | 36 ++++---- 12 files changed, 361 insertions(+), 74 deletions(-) create mode 100644 patches/init/mini.vcv create mode 100644 src/CardinalMini/CardinalCommon-UI.cpp mode change 120000 => 100644 src/CardinalMini/CardinalCommon.cpp diff --git a/patches/init/mini.vcv b/patches/init/mini.vcv new file mode 100644 index 00000000..640ce768 --- /dev/null +++ b/patches/init/mini.vcv @@ -0,0 +1,119 @@ +{ + "version": "2.1", + "zoom": 1.0, + "modules": [ + { + "id": 2799203590388841, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "leftModuleId": 4, + "data": { + "filepath": "", + "lang": "None", + "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio ports, 5 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nHave fun!\n\n", + "width": 23 + }, + "pos": [ + 42, + 0 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "leftModuleId": 7249509538355161, + "rightModuleId": 3, + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + 16, + 0 + ] + }, + { + "id": 3, + "plugin": "Cardinal", + "model": "HostTime", + "version": "2.0", + "params": [], + "leftModuleId": 2, + "rightModuleId": 4, + "pos": [ + 25, + 0 + ] + }, + { + "id": 4, + "plugin": "Cardinal", + "model": "HostParameters", + "version": "2.0", + "params": [], + "leftModuleId": 3, + "rightModuleId": 2799203590388841, + "pos": [ + 33, + 0 + ] + }, + { + "id": 7249509538355161, + "plugin": "Cardinal", + "model": "HostCV", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "leftModuleId": 3606136179759592, + "rightModuleId": 2, + "pos": [ + 8, + 0 + ] + }, + { + "id": 3606136179759592, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [], + "rightModuleId": 7249509538355161, + "data": { + "dcFilter": false + }, + "pos": [ + 0, + 0 + ] + } + ], + "cables": [] +} diff --git a/plugins/Makefile b/plugins/Makefile index d8d7ac7c..616c6128 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -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) diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index afdd0961..e0fa9d2b 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -23,11 +23,15 @@ // Cardinal (built-in) #include "Cardinal/src/plugin.hpp" +// Fundamental +#include "Fundamental/src/plugin.hpp" + // known terminal modules std::vector 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() diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index ea61c0f4..d3177c83 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -62,12 +62,14 @@ # error wrong build #endif -#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -# define HEADLESS +#if defined(CARDINAL_COMMON_DSP_ONLY) || defined(HEADLESS) +# define HEADLESS_BEHAVIOUR #endif #if CARDINAL_VARIANT_FX # define CARDINAL_TEMPLATE_NAME "init/fx.vcv" +#elif CARDINAL_VARIANT_MINI +# define CARDINAL_TEMPLATE_NAME "init/mini.vcv" #elif CARDINAL_VARIANT_NATIVE # define CARDINAL_TEMPLATE_NAME "init/native.vcv" #elif CARDINAL_VARIANT_SYNTH @@ -93,10 +95,12 @@ START_NAMESPACE_DISTRHO // ----------------------------------------------------------------------------------------------------------- +#ifndef HEADLESS void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index, bool started) { DISTRHO_SAFE_ASSERT_RETURN(pcontext->ui != nullptr,); + #ifndef CARDINAL_COMMON_DSP_ONLY if (started) { pcontext->ui->editParameter(index, true); @@ -106,26 +110,40 @@ void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index, { pcontext->ui->editParameter(index, false); } + #endif } +#endif // -------------------------------------------------------------------------------------------------------------------- +#ifndef HEADLESS bool CardinalPluginContext::addIdleCallback(IdleCallback* const cb) const { - if (ui == nullptr) - return false; + #ifndef CARDINAL_COMMON_DSP_ONLY + if (ui != nullptr) + { + ui->addIdleCallback(cb); + return true; + } + #else + // unused + (void)cb; + #endif - ui->addIdleCallback(cb); - return true; + return false; } void CardinalPluginContext::removeIdleCallback(IdleCallback* const cb) const { - if (ui == nullptr) - return; - - ui->removeIdleCallback(cb); + #ifndef CARDINAL_COMMON_DSP_ONLY + if (ui != nullptr) + ui->removeIdleCallback(cb); + #else + // unused + (void)cb; + #endif } +#endif void CardinalPluginContext::writeMidiMessage(const rack::midi::Message& message, const uint8_t channel) { @@ -296,7 +314,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB settings::skipLoadOnLaunch = true; settings::showTipsOnLaunch = false; settings::windowPos = math::Vec(0, 0); -#ifdef HEADLESS +#ifdef HEADLESS_BEHAVIOUR settings::headless = true; #endif @@ -348,17 +366,17 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (!system::exists(system::join(asset::systemDir, "res"))) #endif { - #if defined(DISTRHO_OS_WASM) + #if defined(DISTRHO_OS_WASM) asset::systemDir = "/resources"; - #elif defined(ARCH_MAC) + #elif defined(ARCH_MAC) asset::systemDir = "/Library/Application Support/Cardinal"; - #elif defined(ARCH_WIN) + #elif defined(ARCH_WIN) const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles); if (! commonprogfiles.empty()) asset::systemDir = system::join(commonprogfiles, "Cardinal"); - #else + #else asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; - #endif + #endif asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); } @@ -542,7 +560,7 @@ namespace patchUtils using namespace rack; -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR static void promptClear(const char* const message, const std::function action) { if (APP->history->isSaved() || APP->scene->rack->hasModules()) @@ -554,7 +572,7 @@ static void promptClear(const char* const message, const std::function a void loadDialog() { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR promptClear("The current patch is unsaved. Clear it and open a new patch?", []() { std::string dir; if (! APP->patch->path.empty()) @@ -579,7 +597,7 @@ void loadDialog() void loadPathDialog(const std::string& path, const bool asTemplate) { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR promptClear("The current patch is unsaved. Clear it and open the new patch?", [path, asTemplate]() { APP->patch->loadAction(path); @@ -618,7 +636,7 @@ void loadSelectionDialog() void loadTemplateDialog() { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR promptClear("The current patch is unsaved. Clear it and start a new patch?", []() { APP->patch->loadTemplate(); }); @@ -627,7 +645,7 @@ void loadTemplateDialog() void revertDialog() { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR if (APP->patch->path.empty()) return; promptClear("Revert patch to the last saved state?", []{ @@ -638,7 +656,7 @@ void revertDialog() void saveDialog(const std::string& path) { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR if (path.empty()) { return; } @@ -656,7 +674,7 @@ void saveDialog(const std::string& path) #endif } -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR static void saveAsDialog(const bool uncompressed) { std::string dir; @@ -683,14 +701,14 @@ static void saveAsDialog(const bool uncompressed) void saveAsDialog() { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR saveAsDialog(false); #endif } void saveAsDialogUncompressed() { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR saveAsDialog(true); #endif } @@ -716,7 +734,7 @@ void async_dialog_filebrowser(const bool saving, const char* const title, const std::function action) { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR CardinalPluginContext* const pcontext = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(pcontext != nullptr,); @@ -739,14 +757,14 @@ void async_dialog_filebrowser(const bool saving, void async_dialog_message(const char* const message) { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR asyncDialog::create(message); #endif } void async_dialog_message(const char* const message, const std::function action) { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR asyncDialog::create(message, action); #endif } @@ -754,7 +772,7 @@ void async_dialog_message(const char* const message, const std::function void async_dialog_text_input(const char* const message, const char* const text, const std::function action) { -#ifndef HEADLESS +#ifndef HEADLESS_BEHAVIOUR asyncDialog::textInput(message, text, action); #endif } diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 601fad49..31a57d16 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -104,6 +104,7 @@ START_NAMESPACE_DISTRHO class CardinalBasePlugin; class CardinalBaseUI; +struct CardinalPluginContext; struct Initializer #ifdef CARDINAL_INIT_OSC_THREAD @@ -124,6 +125,10 @@ struct Initializer #endif }; +#ifndef HEADLESS +void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index, bool started); +#endif + END_NAMESPACE_DISTRHO // ----------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalMini/CardinalCommon-UI.cpp b/src/CardinalMini/CardinalCommon-UI.cpp new file mode 100644 index 00000000..f118c4eb --- /dev/null +++ b/src/CardinalMini/CardinalCommon-UI.cpp @@ -0,0 +1,19 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#define CARDINAL_COMMON_UI_ONLY +#include "CardinalCommon.cpp" diff --git a/src/CardinalMini/CardinalCommon.cpp b/src/CardinalMini/CardinalCommon.cpp deleted file mode 120000 index 76b4b5f3..00000000 --- a/src/CardinalMini/CardinalCommon.cpp +++ /dev/null @@ -1 +0,0 @@ -../CardinalCommon.cpp \ No newline at end of file diff --git a/src/CardinalMini/CardinalCommon.cpp b/src/CardinalMini/CardinalCommon.cpp new file mode 100644 index 00000000..24dffcde --- /dev/null +++ b/src/CardinalMini/CardinalCommon.cpp @@ -0,0 +1,19 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#define CARDINAL_COMMON_DSP_ONLY +#include "../CardinalCommon.cpp" diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 7ec6012c..cd011dc5 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -609,7 +609,27 @@ class CardinalPlugin : public CardinalBasePlugin switch (index) { case 0: - state.hints = kStateIsBase64Blob | kStateIsOnlyForDSP; + state.hints = kStateIsBase64Blob; + #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + state.hints |= kStateIsOnlyForDSP; + #endif + if (FILE* const f = std::fopen(context->patch->factoryTemplatePath.c_str(), "r")) + { + std::fseek(f, 0, SEEK_END); + if (const long fileSize = std::ftell(f)) + { + std::fseek(f, 0, SEEK_SET); + char* const fileContent = new char[fileSize]; + + if (std::fread(fileContent, fileSize, 1, f) == 1) + { + state.defaultValue = String::asBase64(fileContent, fileSize); + } + + delete[] fileContent; + } + std::fclose(f); + } state.key = "patch"; state.label = "Patch"; break; @@ -624,12 +644,17 @@ class CardinalPlugin : public CardinalBasePlugin state.label = "Comment"; break; case 3: - state.hints = kStateIsOnlyForUI; + state.hints = 0x0; + #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + state.hints |= kStateIsOnlyForDSP; + #endif + state.defaultValue = "{}"; state.key = "moduleInfos"; state.label = "moduleInfos"; break; case 4: state.hints = kStateIsOnlyForUI; + // state.defaultValue = String("%d:%d", DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT); state.key = "windowSize"; state.label = "Window size"; break; diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 451dd9bd..b3b7b236 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -51,6 +51,7 @@ #include "CardinalCommon.hpp" #include "PluginContext.hpp" #include "WindowParameters.hpp" +#include "extra/Base64.hpp" #ifndef DISTRHO_OS_WASM # include "extra/SharedResourcePointer.hpp" @@ -376,8 +377,7 @@ class CardinalUI : public CardinalBaseUI, context->history = new rack::history::State; context->patch = new rack::patch::Manager; context->patch->autosavePath = fAutosavePath; - context->patch->templatePath = fInitializer->templatePath; - context->patch->factoryTemplatePath = fInitializer->factoryTemplatePath; + context->patch->templatePath = context->patch->factoryTemplatePath = fInitializer->templatePath; context->event = new rack::widget::EventState; context->scene = new rack::app::Scene; @@ -385,10 +385,7 @@ class CardinalUI : public CardinalBaseUI, context->window = new rack::window::Window; - context->patch->loadTemplate(); context->scene->rackScroll->reset(); - // swap to factory template after first load - context->patch->templatePath = context->patch->factoryTemplatePath; #endif Window& window(getWindow()); @@ -806,17 +803,59 @@ class CardinalUI : public CardinalBaseUI, void stateChanged(const char* const key, const char* const value) override { - if (std::strcmp(key, "windowSize") != 0) - return; + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + if (std::strcmp(key, "patch") == 0) + { + if (fAutosavePath.empty()) + return; + + const std::vector data(d_getChunkFromBase64String(value)); + + DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); + + rack::system::removeRecursively(fAutosavePath); + rack::system::createDirectories(fAutosavePath); + + static constexpr const char zstdMagic[] = "\x28\xb5\x2f\xfd"; + + if (std::memcmp(data.data(), zstdMagic, sizeof(zstdMagic)) != 0) + { + FILE* const f = std::fopen(rack::system::join(fAutosavePath, "patch.json").c_str(), "w"); + DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); + + std::fwrite(data.data(), data.size(), 1, f); + std::fclose(f); + } + else + { + try { + rack::system::unarchiveToDirectory(data, fAutosavePath); + } DISTRHO_SAFE_EXCEPTION_RETURN("setState unarchiveToDirectory",); + } + + const ScopedContext sc(this); - int width = 0; - int height = 0; - std::sscanf(value, "%i:%i", &width, &height); + try { + context->patch->loadAutosave(); + } DISTRHO_SAFE_EXCEPTION_RETURN("setState loadAutosave",); + + return; + } + #endif - if (width > 0 && height > 0) + if (std::strcmp(key, "windowSize") == 0) { - const double scaleFactor = getScaleFactor(); - setSize(width * scaleFactor, height * scaleFactor); + int width = 0; + int height = 0; + std::sscanf(value, "%d:%d", &width, &height); + + if (width > 0 && height > 0) + { + const double scaleFactor = getScaleFactor(); + setSize(width * scaleFactor, height * scaleFactor); + } + + return; } } diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index baa9f9da..93ba5331 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -248,14 +248,12 @@ endif ifeq ($(CARDINAL_VARIANT),mini) ifneq ($(HEADLESS)$(MOD_BUILD),true) FILES_UI = CardinalUI.cpp -FILES_UI += CardinalCommon.cpp +FILES_UI += CardinalCommon-UI.cpp FILES_UI += common.cpp FILES_UI += glfw.cpp FILES_UI += Window.cpp EXTRA_UI_DEPENDENCIES = $(subst -headless,,$(EXTRA_DSP_DEPENDENCIES)) -EXTRA_UI_LIBS = -Wl,--start-group EXTRA_UI_LIBS += $(subst -headless,,$(EXTRA_DSP_LIBS)) -EXTRA_UI_LIBS += -Wl,--end-group endif endif diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 2e8a612e..629bda2c 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -124,10 +124,6 @@ struct CardinalPluginContext : rack::Context { #endif }; -#ifndef HEADLESS -void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index, bool started); -#endif - // ----------------------------------------------------------------------------------------------------------- CardinalPluginContext* getRackContextFromPlugin(void* ptr); diff --git a/src/custom/RemoteNanoVG.cpp b/src/custom/RemoteNanoVG.cpp index ef7c6535..73651db1 100644 --- a/src/custom/RemoteNanoVG.cpp +++ b/src/custom/RemoteNanoVG.cpp @@ -21,27 +21,27 @@ # error wrong build #endif -#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -# define HEADLESS -#endif - -#ifndef HEADLESS -# include "OpenGL.hpp" -#endif +// #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +// # define HEADLESS +// #endif +// +// #ifndef HEADLESS +// # include "OpenGL.hpp" +// #endif #include "nanovg.h" -#ifdef HEADLESS +// #ifdef HEADLESS struct NVGLUframebuffer; void nvgluBindFramebuffer(NVGLUframebuffer* fb) {} NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int w, int h, int imageFlags) { return nullptr; } void nvgluDeleteFramebuffer(NVGLUframebuffer* fb) {} -#else -# define NANOVG_GLES2_IMPLEMENTATION -# define NANOVG_FBO_VALID 1 -# include "nanovg_gl.h" -# include "nanovg_gl_utils.h" -#endif +// #else +// # define NANOVG_GLES2_IMPLEMENTATION +// # define NANOVG_FBO_VALID 1 +// # include "nanovg_gl.h" +// # include "nanovg_gl_utils.h" +// #endif #if defined(__GNUC__) && (__GNUC__ >= 6) # pragma GCC diagnostic push @@ -72,7 +72,7 @@ GLFWAPI double glfwGetTime(void) { return 0.0; } } -#ifndef HEADLESS -# define STB_IMAGE_WRITE_IMPLEMENTATION -# include "../src/Rack/dep/glfw/deps/stb_image_write.h" -#endif +// #ifndef HEADLESS +// # define STB_IMAGE_WRITE_IMPLEMENTATION +// # include "../src/Rack/dep/glfw/deps/stb_image_write.h" +// #endif From 0da7070886521cc046de1c72ba077fd8701d3585 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Dec 2022 14:32:54 +0000 Subject: [PATCH 176/451] More mini details Signed-off-by: falkTX --- plugins/Makefile | 6 +++++- src/CardinalCommon.cpp | 7 ++++++- src/CardinalMini/DistrhoPluginInfo.h | 4 ++++ src/CardinalPlugin.cpp | 2 +- src/Makefile.cardinal.mk | 4 +++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 616c6128..0197731e 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1308,7 +1308,7 @@ ifneq ($(HEADLESS),true) endif clean: - rm -f $(TARGETS) + rm -f *.a rm -rf $(BUILD_DIR) rm -rf surgext/build @@ -1465,6 +1465,10 @@ resources: $(JACK_RESOURCES) $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES $(SILENT)ln -sf $(abspath $<) $@ ifeq ($(MOD_BUILD),true) +../bin/Cardinal.lv2/resources/%.svg: %.svg ../deps/svg2stub.py + -@mkdir -p "$(shell dirname $@)" + $(SILENT)python3 ../deps/svg2stub.py $< $@ + ../bin/CardinalFX.lv2/resources/%.svg: %.svg ../deps/svg2stub.py -@mkdir -p "$(shell dirname $@)" $(SILENT)python3 ../deps/svg2stub.py $< $@ diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index d3177c83..2e1ea737 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -346,7 +346,10 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (asset::systemDir.empty()) { if (const char* const bundlePath = (plugin != nullptr ? plugin->getBundlePath() : - ui != nullptr ? ui->getBundlePath() : nullptr)) + #if DISTRHO_PLUGIN_HAS_UI + ui != nullptr ? ui->getBundlePath() : + #endif + nullptr)) { if (const char* const resourcePath = getResourcePath(bundlePath)) { @@ -399,8 +402,10 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB INFO("Binary filename: %s", getBinaryFilename()); if (plugin != nullptr) { INFO("Bundle path: %s", plugin->getBundlePath()); + #if DISTRHO_PLUGIN_HAS_UI } else if (ui != nullptr) { INFO("Bundle path: %s", ui->getBundlePath()); + #endif } INFO("System directory: %s", asset::systemDir.c_str()); INFO("User directory: %s", asset::userDir.c_str()); diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index ac6a9429..ac935368 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -52,4 +52,8 @@ #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" +// #ifdef __MOD_DEVICES__ +// # define DISTRHO_PLUGIN_USES_MODGUI 1 +// #endif + #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index cd011dc5..77917a44 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -78,7 +78,7 @@ bool d_isDiffHigherThanLimit(const T& v1, const T& v2, const T& limit) return v1 != v2 ? (v1 > v2 ? v1 - v2 : v2 - v1) > limit : false; } -#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS const char* UI::getBundlePath() const noexcept { return nullptr; } #endif diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 93ba5331..525dcc92 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -217,11 +217,13 @@ endif # Install modgui resources if MOD build ifeq ($(MOD_BUILD),true) +ifneq ($(CARDINAL_VARIANT),mini) LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/Plateau_Reverb.ttl LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui.ttl LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui/documentation.pdf LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui endif +endif # Cardinal main variant is not available as VST2 due to lack of CV ports ifneq ($(CARDINAL_VARIANT),main) @@ -246,7 +248,7 @@ endif # mini variant UI ifeq ($(CARDINAL_VARIANT),mini) -ifneq ($(HEADLESS)$(MOD_BUILD),true) +ifneq ($(HEADLESS),true) FILES_UI = CardinalUI.cpp FILES_UI += CardinalCommon-UI.cpp FILES_UI += common.cpp From dd29816464d077d4d1724a65f53fcef286d43047 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Dec 2022 15:10:53 +0000 Subject: [PATCH 177/451] Adjust for wasm mini builds, WIP Signed-off-by: falkTX --- plugins/Makefile | 2 ++ src/CardinalMini/Makefile | 2 ++ src/Makefile | 1 + src/Makefile.cardinal.mk | 14 +++++++++++--- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 0197731e..19aaf797 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1402,7 +1402,9 @@ LV2_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) else ifeq ($(WASM),true) LV2_RESOURCES = $(PLUGIN_LIST:%=../bin/CardinalNative.lv2/resources/PluginManifests/%.json) +LV2_RESOURCES += $(MINIPLUGIN_LIST:%=../bin/CardinalMini.lv2/resources/PluginManifests/%.json) LV2_RESOURCES += $(RESOURCE_FILES:%=../bin/CardinalNative.lv2/resources/%) +LV2_RESOURCES += $(MINIRESOURCE_FILES:%=../bin/CardinalMini.lv2/resources/%) else diff --git a/src/CardinalMini/Makefile b/src/CardinalMini/Makefile index 24e50436..fa53a8e1 100644 --- a/src/CardinalMini/Makefile +++ b/src/CardinalMini/Makefile @@ -5,4 +5,6 @@ # NAME = CardinalMini +PLUGIN_CLASS = distrho_cardinal_mini +PLUGIN_URI = https://distrho.kx.studio/plugins/cardinal\#mini include ../Makefile.cardinal.mk diff --git a/src/Makefile b/src/Makefile index ecdbd966..c5b45bc0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -234,6 +234,7 @@ ifeq ($(MOD_BUILD),true) $(MAKE) -C CardinalFX lv2 else ifeq ($(WASM),true) $(MAKE) -C CardinalNative +# $(MAKE) -C CardinalMini modgui else $(MAKE) -C Cardinal $(MAKE) -C CardinalMini diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 525dcc92..650a7881 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -177,7 +177,7 @@ endif # -------------------------------------------------------------- # FIXME -ifeq ($(CIBUILD)$(WASM),truetrue) +ifeq ($(CARDINAL_VARIANT)$(CIBUILD)$(WASM),nativetruetrue) ifneq ($(STATIC_BUILD),true) STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm endif @@ -350,21 +350,26 @@ BASE_FLAGS += -Wno-unused-variable ifeq ($(WASM),true) ifneq ($(STATIC_BUILD),true) +ifeq ($(CARDINAL_VARIANT),mini) +LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources +else LINK_FLAGS += --use-preload-plugins LINK_FLAGS += --preload-file=./jsfx LINK_FLAGS += --preload-file=./lv2 -endif LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources +endif LINK_FLAGS += --use-preload-cache +endif ifneq ($(NOPLUGINS),true) SYMLINKED_DIRS_RESOURCES = # find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort +SYMLINKED_DIRS_RESOURCES += Fundamental/presets +ifneq ($(CARDINAL_VARIANT),mini) SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/chopin SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/debussy SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/goldberg SYMLINKED_DIRS_RESOURCES += cf/playeroscs SYMLINKED_DIRS_RESOURCES += DrumKit/res/samples -SYMLINKED_DIRS_RESOURCES += Fundamental/presets SYMLINKED_DIRS_RESOURCES += GrandeModular/presets SYMLINKED_DIRS_RESOURCES += LyraeModules/presets SYMLINKED_DIRS_RESOURCES += Meander/res @@ -381,12 +386,15 @@ SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/fx_presets SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/wavetables SYMLINKED_DIRS_RESOURCES += surgext/patches SYMLINKED_DIRS_RESOURCES += surgext/presets +endif LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) endif LINK_FLAGS += -sALLOW_MEMORY_GROWTH LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 +ifneq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --shell-file=../emscripten/shell.html +endif LINK_FLAGS += -O3 else ifeq ($(HAIKU),true) LINK_FLAGS += -lpthread From 2ad135551e89d6b53a2349a3d7163fc289a35a58 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 28 Dec 2022 14:31:27 +0000 Subject: [PATCH 178/451] Allow to build without SSE optimizations, letting simde fake it Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- dpf | 2 +- include/simd-compat/emmintrin.h | 2 +- include/simd-compat/immintrin.h | 2 +- include/simd-compat/mmintrin.h | 4 ++-- include/simd-compat/pmmintrin.h | 4 ++-- include/simd-compat/xmmintrin.h | 2 +- plugins/Makefile | 13 +++---------- src/Makefile | 8 ++++---- src/Makefile.cardinal.mk | 4 ++++ 10 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a951bee..c9fdf6c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -877,7 +877,7 @@ jobs: run: | source ~/emsdk/emsdk_env.sh make features - make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) + make CIBUILD=true NOPLUGINS=true NOOPT=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) - name: Make wasm versioned and compress run: | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') diff --git a/dpf b/dpf index 79948069..c9e9fe3d 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 79948069d581c64bd19bc454234550de88b459a2 +Subproject commit c9e9fe3d5959cce389014b84f0c1e365f6112507 diff --git a/include/simd-compat/emmintrin.h b/include/simd-compat/emmintrin.h index f8448608..b349fb8e 100644 --- a/include/simd-compat/emmintrin.h +++ b/include/simd-compat/emmintrin.h @@ -17,7 +17,7 @@ #pragma once -#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) # include_next #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/include/simd-compat/immintrin.h b/include/simd-compat/immintrin.h index 5400c923..17293102 100644 --- a/include/simd-compat/immintrin.h +++ b/include/simd-compat/immintrin.h @@ -17,7 +17,7 @@ #pragma once -#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) # include_next #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/include/simd-compat/mmintrin.h b/include/simd-compat/mmintrin.h index 1efa66a2..eab8d3be 100644 --- a/include/simd-compat/mmintrin.h +++ b/include/simd-compat/mmintrin.h @@ -17,9 +17,9 @@ #pragma once -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOOPT) # include_next -#elif defined(__EMSCRIPTEN__) +#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOOPT) # include #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 33ec1c4f..2db8f173 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -17,7 +17,7 @@ #pragma once -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOOPT) # include_next // bring in extra SSE3 support via simde @@ -40,7 +40,7 @@ # undef _WIN32_WAS_DEFINED # endif -#elif defined(__EMSCRIPTEN__) +#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOOPT) # include_next static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) diff --git a/include/simd-compat/xmmintrin.h b/include/simd-compat/xmmintrin.h index 5ee268ff..80536afa 100644 --- a/include/simd-compat/xmmintrin.h +++ b/include/simd-compat/xmmintrin.h @@ -17,7 +17,7 @@ #pragma once -#if defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__) +#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) # include_next #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/plugins/Makefile b/plugins/Makefile index 19aaf797..077f556d 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1179,23 +1179,16 @@ BASE_FLAGS += -I../src/Rack/dep/nanosvg/src BASE_FLAGS += -I../src/Rack/dep/oui-blendish BASE_FLAGS += -I../src/Rack/dep/pffft -# SSE must always be enabled, even in debug builds -ifeq ($(CPU_I386_OR_X86_64),true) -BASE_FLAGS += -msse -msse2 -ifeq ($(WASM),true) -BASE_FLAGS += -msse3 -msimd128 -endif -endif - ifeq ($(DEBUG),true) BASE_FLAGS += -UDEBUG endif ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS -ifeq ($(WITH_LTO),true) -BASE_FLAGS += -ffat-lto-objects endif + +ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) +BASE_FLAGS += -DCARDINAL_NOOPT endif ifeq ($(BSD)$(WASM),true) diff --git a/src/Makefile b/src/Makefile index c5b45bc0..809e8cb9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -73,10 +73,6 @@ endif ifeq ($(DEBUG),true) BASE_FLAGS += -UDEBUG -ifeq ($(WASM),true) -# SSE must always be enabled on wasm, even in debug builds -BASE_FLAGS += -msse -msse2 -msse3 -msimd128 -endif endif ifeq ($(HAVE_LIBLO),true) @@ -87,6 +83,10 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif +ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) +BASE_FLAGS += -DCARDINAL_NOOPT +endif + ifeq ($(BSD),true) BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC_PRECISE endif diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 650a7881..acfce244 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -298,6 +298,10 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif +ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) +BASE_FLAGS += -DCARDINAL_NOOPT +endif + ifeq ($(MOD_BUILD),true) BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff endif From 108c462115098aed005d9ad9aaa7d8f80e0330bb Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 28 Dec 2022 14:50:01 +0000 Subject: [PATCH 179/451] Rename flag to NOSIMD=true, NOOPT already in use by DPF Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- deps/Makefile | 8 ++++---- docs/BUILDING.md | 1 + include/simd-compat/emmintrin.h | 2 +- include/simd-compat/immintrin.h | 2 +- include/simd-compat/mmintrin.h | 4 ++-- include/simd-compat/pmmintrin.h | 4 ++-- include/simd-compat/xmmintrin.h | 2 +- plugins/Makefile | 4 ++-- src/Makefile | 4 ++-- src/Makefile.cardinal.mk | 4 ++-- src/emscripten/shell.html | 2 +- 12 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9fdf6c0..0565f5d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -877,7 +877,7 @@ jobs: run: | source ~/emsdk/emsdk_env.sh make features - make CIBUILD=true NOPLUGINS=true NOOPT=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) + make CIBUILD=true NOPLUGINS=true NOOPT=true NOSIMD=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) - name: Make wasm versioned and compress run: | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') diff --git a/deps/Makefile b/deps/Makefile index 8b4ec3fa..b21e402f 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -34,12 +34,12 @@ endif BASE_FLAGS += -I$(abspath ../include) BASE_FLAGS += -I$(abspath ../include/simd-compat) -ifeq ($(HAIKU)$(WASM),true) -BASE_FLAGS += -I$(abspath ../include/linux-compat) +ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +BASE_FLAGS += -DCARDINAL_NOSIMD endif -ifeq ($(MOD_BUILD)$(WITH_LTO),true) -BASE_FLAGS += -ffat-lto-objects +ifeq ($(HAIKU)$(WASM),true) +BASE_FLAGS += -I$(abspath ../include/linux-compat) endif ifneq ($(SYSDEPS),true) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index f059bab9..13de9ccd 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -23,6 +23,7 @@ Developer related options: * `DEBUG=true` build non-stripped debug binaries (terrible performance, only useful for developers) * `NOPLUGINS=true` build only the Cardinal Core plugins (not recommended, only useful for developers) +* `NOSIMD=true` build without SIMD (not recommended, only useful for developers) Packaging related options: diff --git a/include/simd-compat/emmintrin.h b/include/simd-compat/emmintrin.h index b349fb8e..1ac10271 100644 --- a/include/simd-compat/emmintrin.h +++ b/include/simd-compat/emmintrin.h @@ -17,7 +17,7 @@ #pragma once -#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) +#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/include/simd-compat/immintrin.h b/include/simd-compat/immintrin.h index 17293102..3d186244 100644 --- a/include/simd-compat/immintrin.h +++ b/include/simd-compat/immintrin.h @@ -17,7 +17,7 @@ #pragma once -#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) +#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/include/simd-compat/mmintrin.h b/include/simd-compat/mmintrin.h index eab8d3be..7ee7529f 100644 --- a/include/simd-compat/mmintrin.h +++ b/include/simd-compat/mmintrin.h @@ -17,9 +17,9 @@ #pragma once -#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOOPT) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOSIMD) # include_next -#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOOPT) +#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) # include #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 2db8f173..3c35e0bc 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -17,7 +17,7 @@ #pragma once -#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOOPT) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(CARDINAL_NOSIMD) # include_next // bring in extra SSE3 support via simde @@ -40,7 +40,7 @@ # undef _WIN32_WAS_DEFINED # endif -#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOOPT) +#elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) # include_next static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) diff --git a/include/simd-compat/xmmintrin.h b/include/simd-compat/xmmintrin.h index 80536afa..362a9da1 100644 --- a/include/simd-compat/xmmintrin.h +++ b/include/simd-compat/xmmintrin.h @@ -17,7 +17,7 @@ #pragma once -#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOOPT) +#if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else # define SIMDE_ENABLE_NATIVE_ALIASES diff --git a/plugins/Makefile b/plugins/Makefile index 077f556d..09bd940c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1187,8 +1187,8 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif -ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) -BASE_FLAGS += -DCARDINAL_NOOPT +ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +BASE_FLAGS += -DCARDINAL_NOSIMD endif ifeq ($(BSD)$(WASM),true) diff --git a/src/Makefile b/src/Makefile index 809e8cb9..c0b8b3be 100644 --- a/src/Makefile +++ b/src/Makefile @@ -83,8 +83,8 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif -ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) -BASE_FLAGS += -DCARDINAL_NOOPT +ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +BASE_FLAGS += -DCARDINAL_NOSIMD endif ifeq ($(BSD),true) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index acfce244..9d857bfe 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -298,8 +298,8 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif -ifneq (,$(findstring true,$(DEBUG)$(NOOPT))) -BASE_FLAGS += -DCARDINAL_NOOPT +ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +BASE_FLAGS += -DCARDINAL_NOSIMD endif ifeq ($(MOD_BUILD),true) diff --git a/src/emscripten/shell.html b/src/emscripten/shell.html index 8a372f87..d941f50c 100644 --- a/src/emscripten/shell.html +++ b/src/emscripten/shell.html @@ -124,7 +124,7 @@ if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { wasmErrors.push('Importable/Exportable mutable globals unsupported'); } - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { + if (window.location.host !== "minicardinal.kx.studio" && !WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { wasmErrors.push('Fixed-Width SIMD unsupported'); } } From dc92378e330a2aefeea8b9a9723789c8c82a66f3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 28 Dec 2022 17:32:52 +0000 Subject: [PATCH 180/451] Fix wasm-mini and MOD builds Signed-off-by: falkTX --- src/CardinalFX/DistrhoPluginInfo.h | 1 + src/Makefile.cardinal.mk | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index fef86fce..3a94d843 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -41,6 +41,7 @@ #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 #else #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 9d857bfe..0259c855 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -353,22 +353,29 @@ BASE_FLAGS += -Wno-unused-variable # extra linker flags ifeq ($(WASM),true) -ifneq ($(STATIC_BUILD),true) + +LINK_FLAGS += -O3 +LINK_FLAGS += -sALLOW_MEMORY_GROWTH +LINK_FLAGS += -sINITIAL_MEMORY=64Mb +LINK_FLAGS += -sLZ4=1 + ifeq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources else +LINK_FLAGS += --shell-file=../emscripten/shell.html +ifneq ($(STATIC_BUILD),true) +LINK_FLAGS += --use-preload-cache LINK_FLAGS += --use-preload-plugins LINK_FLAGS += --preload-file=./jsfx LINK_FLAGS += --preload-file=./lv2 -LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources endif -LINK_FLAGS += --use-preload-cache +LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources endif -ifneq ($(NOPLUGINS),true) -SYMLINKED_DIRS_RESOURCES = + # find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort -SYMLINKED_DIRS_RESOURCES += Fundamental/presets +SYMLINKED_DIRS_RESOURCES = Fundamental/presets ifneq ($(CARDINAL_VARIANT),mini) +ifneq ($(NOPLUGINS),true) SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/chopin SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/debussy SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/goldberg @@ -391,15 +398,9 @@ SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/wavetables SYMLINKED_DIRS_RESOURCES += surgext/patches SYMLINKED_DIRS_RESOURCES += surgext/presets endif -LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) endif -LINK_FLAGS += -sALLOW_MEMORY_GROWTH -LINK_FLAGS += -sINITIAL_MEMORY=64Mb -LINK_FLAGS += -sLZ4=1 -ifneq ($(CARDINAL_VARIANT),mini) -LINK_FLAGS += --shell-file=../emscripten/shell.html -endif -LINK_FLAGS += -O3 +LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) + else ifeq ($(HAIKU),true) LINK_FLAGS += -lpthread else From 22b129403e5938d5592a52590451b890cc2b564d Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 28 Dec 2022 20:51:50 +0000 Subject: [PATCH 181/451] A few build fixes Signed-off-by: falkTX --- deps/Makefile | 9 +++++++++ src/Cardinal/DistrhoPluginInfo.h | 1 + src/CardinalNative/DistrhoPluginInfo.h | 1 + src/CardinalSynth/DistrhoPluginInfo.h | 1 + src/CardinalUI.cpp | 1 + src/custom/RemoteNanoVG.cpp | 5 ++++- 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index b21e402f..8037a9b2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -324,6 +324,15 @@ endif # unwanted in this build SURGE_CXX_FLAGS += -DJUCE_DSP_ENABLE_SNAP_TO_ZERO=0 +# required by JUCE +ifeq ($(WASM),true) +SURGE_CXX_FLAGS += -msse -msse2 -msse3 -msimd128 +else ifeq ($(CPU_ARM32),true) +SURGE_CXX_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard +else ifeq ($(CPU_I386_OR_X86_64),true) +SURGE_CXX_FLAGS += -msse -msse2 +endif + # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) # SURGE_CXX_FLAGS += -DJUCE_DSP_USE_STATIC_FFTW=1 diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index 408f43b4..42465693 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -35,6 +35,7 @@ #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 #else #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1 diff --git a/src/CardinalNative/DistrhoPluginInfo.h b/src/CardinalNative/DistrhoPluginInfo.h index 5cdfbd64..3b8081d7 100644 --- a/src/CardinalNative/DistrhoPluginInfo.h +++ b/src/CardinalNative/DistrhoPluginInfo.h @@ -40,6 +40,7 @@ #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 #else #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1 diff --git a/src/CardinalSynth/DistrhoPluginInfo.h b/src/CardinalSynth/DistrhoPluginInfo.h index 42dfba83..5147667c 100644 --- a/src/CardinalSynth/DistrhoPluginInfo.h +++ b/src/CardinalSynth/DistrhoPluginInfo.h @@ -34,6 +34,7 @@ #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 #else #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1 diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index b3b7b236..b664736e 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -81,6 +81,7 @@ START_NAMESPACE_DISTRHO #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS const char* Plugin::getBundlePath() const noexcept { return nullptr; } +bool Plugin::isSelfTestInstance() const noexcept { return false; } bool Plugin::writeMidiEvent(const MidiEvent&) noexcept { return false; } #endif diff --git a/src/custom/RemoteNanoVG.cpp b/src/custom/RemoteNanoVG.cpp index 73651db1..d96e6c7b 100644 --- a/src/custom/RemoteNanoVG.cpp +++ b/src/custom/RemoteNanoVG.cpp @@ -18,7 +18,10 @@ #include "DistrhoPluginInfo.h" #ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -# error wrong build +# error wrong build 1 +#endif +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# error wrong build 2 #endif // #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS From 2a117b1931119ee69e4ec5e3d2b0fd36e0259096 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 01:35:03 +0000 Subject: [PATCH 182/451] Update dpf Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index c9e9fe3d..48c4ebf2 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit c9e9fe3d5959cce389014b84f0c1e365f6112507 +Subproject commit 48c4ebf27baaf9c039209df1443013dc977e0819 From 4429060454931cabf94125cd93785b1441bf5bfa Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 01:35:10 +0000 Subject: [PATCH 183/451] Fix debug build Signed-off-by: falkTX --- deps/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index 8037a9b2..764e00d4 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -34,7 +34,7 @@ endif BASE_FLAGS += -I$(abspath ../include) BASE_FLAGS += -I$(abspath ../include/simd-compat) -ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +ifeq ($(NOSIMD),true) BASE_FLAGS += -DCARDINAL_NOSIMD endif @@ -325,6 +325,7 @@ endif SURGE_CXX_FLAGS += -DJUCE_DSP_ENABLE_SNAP_TO_ZERO=0 # required by JUCE +ifneq ($(NOSIMD),true) ifeq ($(WASM),true) SURGE_CXX_FLAGS += -msse -msse2 -msse3 -msimd128 else ifeq ($(CPU_ARM32),true) @@ -332,6 +333,7 @@ SURGE_CXX_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard else ifeq ($(CPU_I386_OR_X86_64),true) SURGE_CXX_FLAGS += -msse -msse2 endif +endif # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) From cfa66b4d501db78b8d1ae4a066d2d885247e66a5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 01:39:26 +0000 Subject: [PATCH 184/451] Ensure no LTO used in pluginval builds, CI runs out of space Signed-off-by: falkTX --- .github/workflows/build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0565f5d6..1cf78850 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,13 +4,13 @@ on: push: env: - CACHE_VERSION: 39 + CACHE_VERSION: 1 CARDINAL_UNDER_WINE: 1 EMSCRIPTEN_VERSION: 3.1.27 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 - LIBGL_ALWAYS_SOFTWARE: 'true' - WITH_LTO: 'false' + LIBGL_ALWAYS_SOFTWARE: true + WITH_LTO: false jobs: linux-arm64: @@ -584,7 +584,7 @@ jobs: - name: Build macOS universal (base) if: steps.cache.outputs.cache-hit == 'true' env: - WITH_LTO: 'false' + WITH_LTO: false run: | export PAWPAW_SKIP_LTO=1 export PATH="/usr/local/opt/ccache/libexec:${PATH}" @@ -794,7 +794,7 @@ jobs: - name: Build wasm cross-compiled if: steps.cache.outputs.cache-hit == 'true' env: - WITH_LTO: 'false' + WITH_LTO: false run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd @@ -873,7 +873,7 @@ jobs: NM: emnm RANLIB: emranlib STRIP: emstrip - WITH_LTO: 'false' + WITH_LTO: false run: | source ~/emsdk/emsdk_env.sh make features @@ -1183,8 +1183,9 @@ jobs: - name: Build Cardinal env: CFLAGS: -g - CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING + CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions LDFLAGS: -static-libgcc -static-libstdc++ + WITH_LTO: false run: | export PATH="/usr/lib/ccache:${PATH}" make features From c23230297c8ab59c6b5c8e79184c928b691bf187 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 02:06:09 +0000 Subject: [PATCH 185/451] Build mini variant for MOD Signed-off-by: falkTX --- .github/workflows/build.yml | 6 +++--- dpf | 2 +- src/CardinalFX/DistrhoPluginInfo.h | 9 ++------- src/CardinalMini/Makefile | 3 +-- src/Makefile | 1 + src/Makefile.cardinal.mk | 8 +++++++- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cf78850..efda2632 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -660,7 +660,7 @@ jobs: - name: Build for modduo if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make modduo HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} MODDUO=true -j $(nproc) + make modduo CIBUILD=true HEADLESS=true MODDUO=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -702,7 +702,7 @@ jobs: - name: Build for modduox if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make modduox HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make modduox CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -744,7 +744,7 @@ jobs: - name: Build for moddwarf if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make moddwarf HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make moddwarf CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV diff --git a/dpf b/dpf index 48c4ebf2..55ab560e 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 48c4ebf27baaf9c039209df1443013dc977e0819 +Subproject commit 55ab560e3cf8c408cd7e36d847cf2c1a34cf59e5 diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index 3a94d843..48d6c840 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -31,13 +31,8 @@ #define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#fx" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#fx" -#if defined(__MOD_DEVICES__) -# define DISTRHO_PLUGIN_NAME "Cardinal Mini" -# define DISTRHO_PLUGIN_LABEL "CardinalMini" -#else -# define DISTRHO_PLUGIN_NAME "Cardinal FX" -# define DISTRHO_PLUGIN_LABEL "CardinalFX" -#endif +#define DISTRHO_PLUGIN_NAME "Cardinal FX" +#define DISTRHO_PLUGIN_LABEL "CardinalFX" #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 diff --git a/src/CardinalMini/Makefile b/src/CardinalMini/Makefile index fa53a8e1..a616d22f 100644 --- a/src/CardinalMini/Makefile +++ b/src/CardinalMini/Makefile @@ -5,6 +5,5 @@ # NAME = CardinalMini -PLUGIN_CLASS = distrho_cardinal_mini -PLUGIN_URI = https://distrho.kx.studio/plugins/cardinal\#mini +MODGUI_CLASS_NAME = distrho_cardinal_mini include ../Makefile.cardinal.mk diff --git a/src/Makefile b/src/Makefile index c0b8b3be..f8b4a34f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -232,6 +232,7 @@ all: $(TARGETS) ifeq ($(MOD_BUILD),true) $(MAKE) -C Cardinal lv2 $(MAKE) -C CardinalFX lv2 + $(MAKE) -C CardinalMini lv2 else ifeq ($(WASM),true) $(MAKE) -C CardinalNative # $(MAKE) -C CardinalMini modgui diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 0259c855..eaf683e4 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -303,7 +303,13 @@ BASE_FLAGS += -DCARDINAL_NOSIMD endif ifeq ($(MOD_BUILD),true) -BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff +BASE_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff +BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 +ifeq ($(CARDINAL_VARIANT),mini) +BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=0 +else +BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=1 +endif endif ifneq ($(WASM),true) From 6372e2396312c32f57927dbb27074977227ffbdd Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 02:33:57 +0000 Subject: [PATCH 186/451] Generate mini variant modgui during wasm builds Signed-off-by: falkTX --- .github/workflows/build.yml | 8 ++++---- dpf | 2 +- src/Makefile | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efda2632..6e189b86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -800,17 +800,17 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C CardinalMini modgui - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') cd bin - rm -r *.lv2 sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js mv CardinalNative.data CardinalNative-v${VERSION}.data mv CardinalNative.js CardinalNative-v${VERSION}.js mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm - brotli -k -q 11 *.* + brotli -k -q 11 *.data *.html *.js *.wasm - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -820,7 +820,7 @@ jobs: - name: Pack binaries if: steps.cache.outputs.cache-hit == 'true' run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) CardinalMini.lv2/modgui - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }} @@ -887,7 +887,7 @@ jobs: mv CardinalNative.data CardinalNative-v${VERSION}.data mv CardinalNative.js CardinalNative-v${VERSION}.js mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm - brotli -k -q 11 *.* + brotli -k -q 11 brotli -k -q 11 *.data *.html *.js *.wasm - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV diff --git a/dpf b/dpf index 55ab560e..8eb504d3 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 55ab560e3cf8c408cd7e36d847cf2c1a34cf59e5 +Subproject commit 8eb504d3eb6b4f9984503bedfbd3c02b7cb63d2b diff --git a/src/Makefile b/src/Makefile index f8b4a34f..d610fefb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -235,10 +235,11 @@ ifeq ($(MOD_BUILD),true) $(MAKE) -C CardinalMini lv2 else ifeq ($(WASM),true) $(MAKE) -C CardinalNative -# $(MAKE) -C CardinalMini modgui else $(MAKE) -C Cardinal +ifneq ($(NOPLUGINS),true) $(MAKE) -C CardinalMini +endif $(MAKE) -C CardinalNative $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) From 70745cd62dc094f56dccc7568ecfc60a535411c9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 10:53:05 +0000 Subject: [PATCH 187/451] Fix typo Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e189b86..8fa7777b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -887,7 +887,7 @@ jobs: mv CardinalNative.data CardinalNative-v${VERSION}.data mv CardinalNative.js CardinalNative-v${VERSION}.js mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm - brotli -k -q 11 brotli -k -q 11 *.data *.html *.js *.wasm + brotli -k -q 11 *.data *.html *.js *.wasm - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV From cebb66f290c483f3e2037838e8161d43d39df0b8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 10:53:26 +0000 Subject: [PATCH 188/451] SIMD must always be enabled, even in debug builds Signed-off-by: falkTX --- deps/Makefile | 8 +++++--- plugins/Makefile | 11 ++++++++++- src/Makefile | 11 ++++++++++- src/Makefile.cardinal.mk | 11 ++++++++++- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 764e00d4..4540c8e9 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -324,14 +324,16 @@ endif # unwanted in this build SURGE_CXX_FLAGS += -DJUCE_DSP_ENABLE_SNAP_TO_ZERO=0 -# required by JUCE -ifneq ($(NOSIMD),true) +# SIMD must always be enabled, even in debug builds +ifeq ($(NOSIMD),true) +SURGE_CXX_FLAGS += -DCARDINAL_NOSIMD +else ifeq ($(DEBUG),true) ifeq ($(WASM),true) SURGE_CXX_FLAGS += -msse -msse2 -msse3 -msimd128 else ifeq ($(CPU_ARM32),true) SURGE_CXX_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard else ifeq ($(CPU_I386_OR_X86_64),true) -SURGE_CXX_FLAGS += -msse -msse2 +SURGE_CXX_FLAGS += -msse -msse2 -mfpmath=sse endif endif diff --git a/plugins/Makefile b/plugins/Makefile index 09bd940c..3f595083 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1187,8 +1187,17 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif -ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +# SIMD must always be enabled, even in debug builds +ifeq ($(NOSIMD),true) BASE_FLAGS += -DCARDINAL_NOSIMD +else ifeq ($(DEBUG),true) +ifeq ($(WASM),true) +BASE_FLAGS += -msse -msse2 -msse3 -msimd128 +else ifeq ($(CPU_ARM32),true) +BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard +else ifeq ($(CPU_I386_OR_X86_64),true) +BASE_FLAGS += -msse -msse2 -mfpmath=sse +endif endif ifeq ($(BSD)$(WASM),true) diff --git a/src/Makefile b/src/Makefile index d610fefb..ea787fe8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -83,8 +83,17 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif -ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +# SIMD must always be enabled, even in debug builds +ifeq ($(NOSIMD),true) BASE_FLAGS += -DCARDINAL_NOSIMD +else ifeq ($(DEBUG),true) +ifeq ($(WASM),true) +BASE_FLAGS += -msse -msse2 -msse3 -msimd128 +else ifeq ($(CPU_ARM32),true) +BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard +else ifeq ($(CPU_I386_OR_X86_64),true) +BASE_FLAGS += -msse -msse2 -mfpmath=sse +endif endif ifeq ($(BSD),true) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index eaf683e4..0dbf35dd 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -298,8 +298,17 @@ ifeq ($(HEADLESS),true) BASE_FLAGS += -DHEADLESS endif -ifneq (,$(findstring true,$(DEBUG)$(NOSIMD))) +# SIMD must always be enabled, even in debug builds +ifeq ($(NOSIMD),true) BASE_FLAGS += -DCARDINAL_NOSIMD +else ifeq ($(DEBUG),true) +ifeq ($(WASM),true) +BASE_FLAGS += -msse -msse2 -msse3 -msimd128 +else ifeq ($(CPU_ARM32),true) +BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard +else ifeq ($(CPU_I386_OR_X86_64),true) +BASE_FLAGS += -msse -msse2 -mfpmath=sse +endif endif ifeq ($(MOD_BUILD),true) From b71acc9f22d70617739af6283bad589970d4e75d Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 12:16:43 +0000 Subject: [PATCH 189/451] Move code related to push-to-remote into a central file Signed-off-by: falkTX --- src/Cardinal/CardinalRemote.cpp | 1 + src/CardinalCommon.cpp | 69 +++++------ src/CardinalCommon.hpp | 29 +---- src/CardinalFX/CardinalRemote.cpp | 1 + src/CardinalMini/CardinalRemote.cpp | 1 + src/CardinalNative/CardinalRemote.cpp | 1 + src/CardinalPlugin.cpp | 8 +- src/CardinalRemote.cpp | 162 ++++++++++++++++++++++++++ src/CardinalRemote.hpp | 45 +++++++ src/CardinalSynth/CardinalRemote.cpp | 1 + src/Makefile.cardinal.mk | 2 + src/PluginContext.hpp | 6 +- src/override/MenuBar.cpp | 16 +-- src/override/Scene.cpp | 140 +--------------------- src/override/Window.cpp | 7 +- 15 files changed, 278 insertions(+), 211 deletions(-) create mode 120000 src/Cardinal/CardinalRemote.cpp create mode 120000 src/CardinalFX/CardinalRemote.cpp create mode 120000 src/CardinalMini/CardinalRemote.cpp create mode 120000 src/CardinalNative/CardinalRemote.cpp create mode 100644 src/CardinalRemote.cpp create mode 100644 src/CardinalRemote.hpp create mode 120000 src/CardinalSynth/CardinalRemote.cpp diff --git a/src/Cardinal/CardinalRemote.cpp b/src/Cardinal/CardinalRemote.cpp new file mode 120000 index 00000000..23838232 --- /dev/null +++ b/src/Cardinal/CardinalRemote.cpp @@ -0,0 +1 @@ +../CardinalRemote.cpp \ No newline at end of file diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 2e1ea737..c6efe8b4 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -42,6 +42,14 @@ #include #include +#ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +# error wrong build +#endif + +#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI +# undef CARDINAL_INIT_OSC_THREAD +#endif + #ifdef NDEBUG # undef DEBUG #endif @@ -54,12 +62,12 @@ # include #endif -#ifdef DISTRHO_OS_WASM -# include +#ifdef CARDINAL_INIT_OSC_THREAD +# include #endif -#ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -# error wrong build +#ifdef DISTRHO_OS_WASM +# include #endif #if defined(CARDINAL_COMMON_DSP_ONLY) || defined(HEADLESS) @@ -230,7 +238,8 @@ static int osc_hello_handler(const char*, const char*, lo_arg**, int, const lo_m { d_stdout("osc_hello_handler()"); const lo_address source = lo_message_get_source(m); - lo_send_from(source, static_cast(self)->oscServer, LO_TT_IMMEDIATE, "/resp", "ss", "hello", "ok"); + const lo_server server = lo_server_thread_get_server(static_cast(self)->oscServerThread); + lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "hello", "ok"); return 0; } @@ -248,7 +257,7 @@ static int osc_load_handler(const char*, const char* types, lo_arg** argv, int a bool ok = false; - if (CardinalBasePlugin* const plugin = static_cast(self)->oscPlugin) + if (CardinalBasePlugin* const plugin = static_cast(self)->remotePluginInstance) { CardinalPluginContext* const context = plugin->context; std::vector data(size); @@ -269,8 +278,8 @@ static int osc_load_handler(const char*, const char* types, lo_arg** argv, int a } const lo_address source = lo_message_get_source(m); - lo_send_from(source, static_cast(self)->oscServer, - LO_TT_IMMEDIATE, "/resp", "ss", "load", ok ? "ok" : "fail"); + const lo_server server = lo_server_thread_get_server(static_cast(self)->oscServerThread); + lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "load", ok ? "ok" : "fail"); return 0; } @@ -288,12 +297,12 @@ static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, bool ok = false; - if (CardinalBasePlugin* const plugin = static_cast(self)->oscPlugin) + if (CardinalBasePlugin* const plugin = static_cast(self)->remotePluginInstance) ok = plugin->updateStateValue("screenshot", String::asBase64(blob, size).buffer()); const lo_address source = lo_message_get_source(m); - lo_send_from(source, static_cast(self)->oscServer, - LO_TT_IMMEDIATE, "/resp", "ss", "screenshot", ok ? "ok" : "fail"); + const lo_server server = lo_server_thread_get_server(static_cast(self)->oscServerThread); + lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "screenshot", ok ? "ok" : "fail"); return 0; } #endif @@ -432,15 +441,13 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB #ifdef CARDINAL_INIT_OSC_THREAD INFO("Initializing OSC Remote control"); - oscServer = lo_server_new_with_proto(REMOTE_HOST_PORT, LO_UDP, osc_error_handler); - DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr,); - - lo_server_add_method(oscServer, "/hello", "", osc_hello_handler, this); - lo_server_add_method(oscServer, "/load", "b", osc_load_handler, this); - lo_server_add_method(oscServer, "/screenshot", "b", osc_screenshot_handler, this); - lo_server_add_method(oscServer, nullptr, nullptr, osc_fallback_handler, nullptr); + oscServerThread = lo_server_thread_new_with_proto(REMOTE_HOST_PORT, LO_UDP, osc_error_handler); + DISTRHO_SAFE_ASSERT_RETURN(oscServerThread != nullptr,); - startThread(); + lo_server_thread_add_method(oscServerThread, "/hello", "", osc_hello_handler, this); + lo_server_thread_add_method(oscServerThread, "/load", "b", osc_load_handler, this); + lo_server_thread_add_method(oscServerThread, "/screenshot", "b", osc_screenshot_handler, this); + lo_server_thread_add_method(oscServerThread, nullptr, nullptr, osc_fallback_handler, nullptr); #else INFO("OSC Remote control is not enabled in this build"); #endif @@ -451,12 +458,11 @@ Initializer::~Initializer() using namespace rack; #ifdef CARDINAL_INIT_OSC_THREAD - if (oscServer != nullptr) + if (oscServerThread != nullptr) { - stopThread(5000); - lo_server_del_method(oscServer, nullptr, nullptr); - lo_server_free(oscServer); - oscServer = nullptr; + lo_server_thread_del_method(oscServerThread, nullptr, nullptr); + lo_server_thread_free(oscServerThread); + oscServerThread = nullptr; } #endif @@ -478,21 +484,6 @@ Initializer::~Initializer() logger::destroy(); } -#ifdef CARDINAL_INIT_OSC_THREAD -void Initializer::run() -{ - INFO("OSC Thread Listening for remote commands"); - - while (! shouldThreadExit()) - { - d_msleep(200); - while (lo_server_recv_noblock(oscServer, 0) != 0) {} - } - - INFO("OSC Thread Closed"); -} -#endif - // -------------------------------------------------------------------------------------------------------------------- END_NAMESPACE_DISTRHO diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 31a57d16..b411b815 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -21,13 +21,6 @@ #include -#ifdef HAVE_LIBLO -// # define REMOTE_HOST "localhost" -# define REMOTE_HOST "192.168.51.1" -# define REMOTE_HOST_PORT "2228" -# include "extra/Thread.hpp" -#endif - #ifdef DISTRHO_OS_WASM # ifdef STATIC_BUILD # define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm-mini.vcv" @@ -85,21 +78,17 @@ void saveAsDialogUncompressed(); void appendSelectionContextMenu(rack::ui::Menu* menu); void openBrowser(const std::string& url); -bool connectToRemote(); -bool isRemoteConnected(); -bool isRemoteAutoDeployed(); -void setRemoteAutoDeploy(bool autoDeploy); -void deployToRemote(); -void sendScreenshotToRemote(const char* screenshot); - } // namespace patchUtils // ----------------------------------------------------------------------------------------------------------- -#if defined(HAVE_LIBLO) && defined(HEADLESS) && DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +// && defined(HEADLESS) +#if defined(HAVE_LIBLO) # define CARDINAL_INIT_OSC_THREAD #endif +typedef void* lo_server_thread; + START_NAMESPACE_DISTRHO class CardinalBasePlugin; @@ -107,22 +96,16 @@ class CardinalBaseUI; struct CardinalPluginContext; struct Initializer -#ifdef CARDINAL_INIT_OSC_THREAD - : public Thread -#endif { #ifdef CARDINAL_INIT_OSC_THREAD - lo_server oscServer = nullptr; - CardinalBasePlugin* oscPlugin = nullptr; + lo_server_thread oscServerThread = nullptr; + CardinalBasePlugin* remotePluginInstance = nullptr; #endif std::string templatePath; std::string factoryTemplatePath; Initializer(const CardinalBasePlugin* plugin, const CardinalBaseUI* ui); ~Initializer(); -#ifdef CARDINAL_INIT_OSC_THREAD - void run() override; -#endif }; #ifndef HEADLESS diff --git a/src/CardinalFX/CardinalRemote.cpp b/src/CardinalFX/CardinalRemote.cpp new file mode 120000 index 00000000..23838232 --- /dev/null +++ b/src/CardinalFX/CardinalRemote.cpp @@ -0,0 +1 @@ +../CardinalRemote.cpp \ No newline at end of file diff --git a/src/CardinalMini/CardinalRemote.cpp b/src/CardinalMini/CardinalRemote.cpp new file mode 120000 index 00000000..23838232 --- /dev/null +++ b/src/CardinalMini/CardinalRemote.cpp @@ -0,0 +1 @@ +../CardinalRemote.cpp \ No newline at end of file diff --git a/src/CardinalNative/CardinalRemote.cpp b/src/CardinalNative/CardinalRemote.cpp new file mode 120000 index 00000000..23838232 --- /dev/null +++ b/src/CardinalNative/CardinalRemote.cpp @@ -0,0 +1 @@ +../CardinalRemote.cpp \ No newline at end of file diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 77917a44..7d26c11b 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -274,14 +274,15 @@ class CardinalPlugin : public CardinalBasePlugin } #ifdef CARDINAL_INIT_OSC_THREAD - fInitializer->oscPlugin = this; + fInitializer->remotePluginInstance = this; #endif } ~CardinalPlugin() override { #ifdef CARDINAL_INIT_OSC_THREAD - fInitializer->oscPlugin = nullptr; + if (fInitializer->remotePluginInstance == this) + fInitializer->remotePluginInstance = nullptr; #endif { @@ -844,9 +845,6 @@ class CardinalPlugin : public CardinalBasePlugin if (std::strcmp(key, "screenshot") == 0) { fState.screenshot = value; - #if defined(HAVE_LIBLO) && !defined(HEADLESS) - patchUtils::sendScreenshotToRemote(value); - #endif return; } diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp new file mode 100644 index 00000000..5aabed0f --- /dev/null +++ b/src/CardinalRemote.cpp @@ -0,0 +1,162 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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 +#include +#include + +#ifdef NDEBUG +# undef DEBUG +#endif + +#include "CardinalRemote.hpp" +#include "PluginContext.hpp" +#include "extra/Base64.hpp" + +#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI +# undef HAVE_LIBLO +#endif + +#ifdef HAVE_LIBLO +# include +#endif + +// ----------------------------------------------------------------------------------------------------------- + +namespace remoteUtils { + +#ifdef HAVE_LIBLO +static int osc_handler(const char* const path, const char* const types, lo_arg** argv, const int argc, lo_message, void* const self) +{ + d_stdout("osc_handler(\"%s\", \"%s\", %p, %i)", path, types, argv, argc); + + if (std::strcmp(path, "/resp") == 0 && argc == 2 && types[0] == 's' && types[1] == 's') + { + d_stdout("osc_handler(\"%s\", ...) - got resp | '%s' '%s'", path, &argv[0]->s, &argv[1]->s); + + if (std::strcmp(&argv[0]->s, "hello") == 0 && std::strcmp(&argv[1]->s, "ok") == 0) + static_cast(self)->connected = true; + } + return 0; +} +#endif + +RemoteDetails* getRemote() +{ + CardinalPluginContext* const context = static_cast(APP); + DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, nullptr); + + CardinalBaseUI* const ui = static_cast(context->ui); + DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr, nullptr); + + return ui->remoteDetails; +} + +bool connectToRemote() +{ + CardinalPluginContext* const context = static_cast(APP); + DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, false); + + CardinalBaseUI* const ui = static_cast(context->ui); + DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr, false); + + RemoteDetails* remoteDetails = ui->remoteDetails; + +#ifdef HAVE_LIBLO + if (remoteDetails == nullptr) + { + const lo_server oscServer = lo_server_new_with_proto(nullptr, LO_UDP, nullptr); + DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr, false); + + remoteDetails = new RemoteDetails; + remoteDetails->handle = oscServer; + remoteDetails->connected = false; + remoteDetails->autoDeploy = false; + + lo_server_add_method(oscServer, "/resp", nullptr, osc_handler, remoteDetails); + } + + if (const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT)) + { + lo_send(addr, "/hello", ""); + lo_address_free(addr); + } +#endif + + return remoteDetails != nullptr; +} + +void disconnectFromRemote(RemoteDetails* const remote) +{ + if (remote != nullptr) + { + #ifdef HAVE_LIBLO + lo_server_free(static_cast(remote->handle)); + delete remote; + #endif + } +} + +void idleRemote(RemoteDetails* const remote) +{ +#ifdef HAVE_LIBLO + while (lo_server_recv_noblock(static_cast(remote->handle), 0) != 0) {} +#endif +} + +void deployToRemote(RemoteDetails* const remote) +{ +#ifdef HAVE_LIBLO + const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); + DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); + + APP->engine->prepareSave(); + APP->patch->saveAutosave(); + APP->patch->cleanAutosave(); + std::vector data(rack::system::archiveDirectory(APP->patch->autosavePath, 1)); + + if (const lo_blob blob = lo_blob_new(data.size(), data.data())) + { + lo_send(addr, "/load", "b", blob); + lo_blob_free(blob); + } + + lo_address_free(addr); +#endif +} + +void sendScreenshotToRemote(RemoteDetails* const remote, const char* const screenshot) +{ +#ifdef HAVE_LIBLO + const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); + DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); + + std::vector data(d_getChunkFromBase64String(screenshot)); + + if (const lo_blob blob = lo_blob_new(data.size(), data.data())) + { + lo_send(addr, "/screenshot", "b", blob); + lo_blob_free(blob); + } + + lo_address_free(addr); +#endif +} + +} + +// ----------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalRemote.hpp b/src/CardinalRemote.hpp new file mode 100644 index 00000000..64676419 --- /dev/null +++ b/src/CardinalRemote.hpp @@ -0,0 +1,45 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#pragma once + +#ifdef HAVE_LIBLO +// # define REMOTE_HOST "localhost" +# define REMOTE_HOST "192.168.51.1" +# define REMOTE_HOST_PORT "2228" +#endif + +// ----------------------------------------------------------------------------------------------------------- + +namespace remoteUtils { + +struct RemoteDetails { + void* handle; + bool connected; + bool autoDeploy; +}; + +RemoteDetails* getRemote(); +bool connectToRemote(); +void disconnectFromRemote(RemoteDetails* remote); +void idleRemote(RemoteDetails* remote); +void deployToRemote(RemoteDetails* remote); +void sendScreenshotToRemote(RemoteDetails* remote, const char* screenshot); + +} + +// ----------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalSynth/CardinalRemote.cpp b/src/CardinalSynth/CardinalRemote.cpp new file mode 120000 index 00000000..23838232 --- /dev/null +++ b/src/CardinalSynth/CardinalRemote.cpp @@ -0,0 +1 @@ +../CardinalRemote.cpp \ No newline at end of file diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 0dbf35dd..2226e34a 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -96,6 +96,7 @@ endif FILES_DSP = CardinalPlugin.cpp FILES_DSP += CardinalCommon.cpp +FILES_DSP += CardinalRemote.cpp FILES_DSP += common.cpp ifeq ($(CARDINAL_VARIANT),mini) @@ -251,6 +252,7 @@ ifeq ($(CARDINAL_VARIANT),mini) ifneq ($(HEADLESS),true) FILES_UI = CardinalUI.cpp FILES_UI += CardinalCommon-UI.cpp +FILES_UI += CardinalRemote.cpp FILES_UI += common.cpp FILES_UI += glfw.cpp FILES_UI += Window.cpp diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 629bda2c..94d696fe 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -25,8 +25,8 @@ # undef DEBUG #endif +#include "CardinalRemote.hpp" #include "DistrhoPlugin.hpp" -#include "extra/Mutex.hpp" #ifndef HEADLESS # include "DistrhoUI.hpp" @@ -148,6 +148,7 @@ struct WasmRemotePatchLoadingDialog; class CardinalBaseUI : public UI { public: CardinalPluginContext* const context; + remoteUtils::RemoteDetails* remoteDetails; bool saving; bool savingUncompressed; @@ -166,6 +167,7 @@ class CardinalBaseUI : public UI { #else context(new CardinalPluginContext(nullptr)), #endif + remoteDetails(nullptr), saving(false), savingUncompressed(false), #ifdef DISTRHO_OS_WASM @@ -180,6 +182,8 @@ class CardinalBaseUI : public UI { ~CardinalBaseUI() override { + disconnectFromRemote(remoteDetails); + if (filebrowserhandle != nullptr) fileBrowserClose(filebrowserhandle); diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index c848e05c..d75d8cc3 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -52,6 +52,7 @@ #include #include "../CardinalCommon.hpp" +#include "../CardinalRemote.hpp" #include "DistrhoStandaloneUtils.hpp" #ifdef HAVE_LIBLO @@ -169,19 +170,20 @@ struct FileButton : MenuButton { #ifdef HAVE_LIBLO menu->addChild(new ui::MenuSeparator); - if (patchUtils::isRemoteConnected()) { - menu->addChild(createMenuItem("Deploy to MOD", "F7", []() { - patchUtils::deployToRemote(); + remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); + + if (remoteDetails != nullptr && remoteDetails->connected) { + menu->addChild(createMenuItem("Deploy to MOD", "F7", [remoteDetails]() { + remoteUtils::deployToRemote(remoteDetails); })); - const bool autoDeploy = patchUtils::isRemoteAutoDeployed(); menu->addChild(createCheckMenuItem("Auto deploy to MOD", "", - [=]() {return autoDeploy;}, - [=]() {patchUtils::setRemoteAutoDeploy(!autoDeploy);} + [remoteDetails]() {return remoteDetails->autoDeploy;}, + [remoteDetails]() {remoteDetails->autoDeploy = !remoteDetails->autoDeploy;} )); } else { menu->addChild(createMenuItem("Connect to MOD", "", []() { - patchUtils::connectToRemote(); + remoteUtils::connectToRemote(); })); } #endif diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 8f4a9e8c..032d4c20 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -25,10 +25,6 @@ * the License, or (at your option) any later version. */ -#include - -#include - #include #include #include @@ -46,17 +42,8 @@ # undef DEBUG #endif -#ifdef STATIC_BUILD -# undef HAVE_LIBLO -#endif - -#ifdef HAVE_LIBLO -# include -#endif - #include "../CardinalCommon.hpp" -#include "extra/Base64.hpp" -#include "DistrhoUtils.hpp" +#include "../CardinalRemote.hpp" namespace rack { @@ -131,30 +118,8 @@ struct Scene::Internal { bool heldArrowKeys[4] = {}; -#ifdef HAVE_LIBLO double lastSceneChangeTime = 0.0; int historyActionIndex = -1; - - bool oscAutoDeploy = false; - bool oscConnected = false; - lo_server oscServer = nullptr; - - static int osc_handler(const char* const path, const char* const types, lo_arg** argv, const int argc, lo_message, void* const self) - { - d_stdout("osc_handler(\"%s\", \"%s\", %p, %i)", path, types, argv, argc); - - if (std::strcmp(path, "/resp") == 0 && argc == 2 && types[0] == 's' && types[1] == 's') { - d_stdout("osc_handler(\"%s\", ...) - got resp | '%s' '%s'", path, &argv[0]->s, &argv[1]->s); - if (std::strcmp(&argv[0]->s, "hello") == 0 && std::strcmp(&argv[1]->s, "ok") == 0) - static_cast(self)->oscConnected = true; - } - return 0; - } - - ~Internal() { - lo_server_free(oscServer); - } -#endif }; @@ -238,22 +203,20 @@ void Scene::step() { rackScroll->offset += arrowDelta * arrowSpeed; } -#ifdef HAVE_LIBLO - if (internal->oscServer != nullptr) { - while (lo_server_recv_noblock(internal->oscServer, 0) != 0) {} + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) { + idleRemote(remoteDetails); - if (internal->oscAutoDeploy) { + if (remoteDetails->autoDeploy) { const int actionIndex = APP->history->actionIndex; const double time = system::getTime(); if (internal->historyActionIndex != actionIndex && time - internal->lastSceneChangeTime >= 5.0) { internal->historyActionIndex = actionIndex; internal->lastSceneChangeTime = time; - patchUtils::deployToRemote(); + remoteUtils::deployToRemote(remoteDetails); window::generateScreenshot(); } } } -#endif Widget::step(); } @@ -352,7 +315,7 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { e.consume(this); } if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) { - patchUtils::deployToRemote(); + remoteUtils::deployToRemote(remoteUtils::getRemote()); window::generateScreenshot(); e.consume(this); } @@ -489,94 +452,3 @@ void Scene::onPathDrop(const PathDropEvent& e) { } // namespace app } // namespace rack - - -namespace patchUtils { - - -bool connectToRemote() { -#ifdef HAVE_LIBLO - rack::app::Scene::Internal* const internal = APP->scene->internal; - - if (internal->oscServer == nullptr) { - const lo_server oscServer = lo_server_new_with_proto(nullptr, LO_UDP, nullptr); - DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr, false); - lo_server_add_method(oscServer, "/resp", nullptr, rack::app::Scene::Internal::osc_handler, internal); - internal->oscServer = oscServer; - } - - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); - DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr, false); - lo_send(addr, "/hello", ""); - lo_address_free(addr); - - return true; -#else - return false; -#endif -} - - -bool isRemoteConnected() { -#ifdef HAVE_LIBLO - return APP->scene->internal->oscConnected; -#else - return false; -#endif -} - - -bool isRemoteAutoDeployed() { -#ifdef HAVE_LIBLO - return APP->scene->internal->oscAutoDeploy; -#else - return false; -#endif -} - - -void setRemoteAutoDeploy(bool autoDeploy) { -#ifdef HAVE_LIBLO - APP->scene->internal->oscAutoDeploy = autoDeploy; -#endif -} - - -void deployToRemote() { -#ifdef HAVE_LIBLO - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); - DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); - - APP->engine->prepareSave(); - APP->patch->saveAutosave(); - APP->patch->cleanAutosave(); - std::vector data(rack::system::archiveDirectory(APP->patch->autosavePath, 1)); - - if (const lo_blob blob = lo_blob_new(data.size(), data.data())) { - lo_send(addr, "/load", "b", blob); - lo_blob_free(blob); - } - - lo_address_free(addr); -#endif -} - - -void sendScreenshotToRemote(const char* const screenshot) { -#ifdef HAVE_LIBLO - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); - DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); - - std::vector data(d_getChunkFromBase64String(screenshot)); - - if (const lo_blob blob = lo_blob_new(data.size(), data.data())) { - lo_send(addr, "/screenshot", "b", blob); - lo_blob_free(blob); - } - - lo_address_free(addr); -#endif -} - - -} // namespace patchUtils diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 12c52d99..7c32b0cc 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -584,8 +584,11 @@ static void Window__downscaleBitmap(uint8_t* pixels, int& width, int& height) { static void Window__writeImagePNG(void* context, void* data, int size) { USE_NAMESPACE_DISTRHO - UI* const ui = static_cast(context); - ui->setState("screenshot", String::asBase64(data, size).buffer()); + CardinalBaseUI* const ui = static_cast(context); + if (const char* const screenshot = String::asBase64(data, size).buffer()) { + ui->setState("screenshot", screenshot); + remoteUtils::sendScreenshotToRemote(ui->remoteDetails, screenshot); + } } #endif #endif From 91cac905cc6be763ce1946237250f3959a3781f9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 15:33:16 +0000 Subject: [PATCH 190/451] More details for mini version, make menubar variant specific Signed-off-by: falkTX --- plugins/Makefile | 43 ++++++- plugins/plugins-mini.cpp | 226 ++++++++++++++++++++++++++++++--- plugins/plugins.cpp | 2 +- src/Cardinal/MenuBar.cpp | 1 + src/CardinalFX/MenuBar.cpp | 1 + src/CardinalMini/MenuBar.cpp | 1 + src/CardinalNative/MenuBar.cpp | 1 + src/CardinalRemote.cpp | 40 ++++-- src/CardinalRemote/MenuBar.cpp | 1 + src/CardinalSynth/MenuBar.cpp | 1 + src/CardinalUI.cpp | 49 +++---- src/Makefile | 1 - src/Makefile.cardinal.mk | 2 + src/PluginContext.hpp | 5 +- src/override/Engine.cpp | 13 +- src/override/MenuBar.cpp | 11 +- src/override/Scene.cpp | 10 +- 17 files changed, 330 insertions(+), 78 deletions(-) create mode 120000 src/Cardinal/MenuBar.cpp create mode 120000 src/CardinalFX/MenuBar.cpp create mode 120000 src/CardinalMini/MenuBar.cpp create mode 120000 src/CardinalNative/MenuBar.cpp create mode 120000 src/CardinalRemote/MenuBar.cpp create mode 120000 src/CardinalSynth/MenuBar.cpp diff --git a/plugins/Makefile b/plugins/Makefile index 3f595083..5d95dfa8 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -311,9 +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/Noise.cpp +MINIPLUGIN_FILES += Fundamental/src/Random.cpp MINIPLUGIN_FILES += Fundamental/src/VCF.cpp +MINIPLUGIN_FILES += Fundamental/src/VCMixer.cpp MINIPLUGIN_FILES += Fundamental/src/VCO.cpp # modules/types which are present in other plugins @@ -524,6 +526,16 @@ PLUGIN_FILES += AudibleInstruments/eurorack/streams/svf.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/vactrol.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/compressor.cc +MINIPLUGIN_FILES += AudibleInstruments/src/Plaits.cpp +MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/*.cc) +MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/engine/*.cc) +MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/speech/*.cc) +MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/physical_modelling/*.cc) +MINIPLUGIN_FILES += AudibleInstruments/eurorack/plaits/resources.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/stmlib/dsp/atan.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/stmlib/dsp/units.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/stmlib/utils/random.cc + # -------------------------------------------------------------- # Autinn @@ -575,6 +587,29 @@ PLUGIN_FILES += $(filter-out BogaudioModules/src/bogaudio.cpp,$(wildcard Bogaudi PLUGIN_FILES += $(wildcard BogaudioModules/src/dsp/*.cpp) PLUGIN_FILES += $(wildcard BogaudioModules/src/dsp/filters/*.cpp) +MINIPLUGIN_FILES += BogaudioModules/src/LFO.cpp +MINIPLUGIN_FILES += BogaudioModules/src/Noise.cpp +MINIPLUGIN_FILES += BogaudioModules/src/VCA.cpp +MINIPLUGIN_FILES += BogaudioModules/src/VCF.cpp +MINIPLUGIN_FILES += BogaudioModules/src/VCO.cpp +MINIPLUGIN_FILES += BogaudioModules/src/lfo_base.cpp +MINIPLUGIN_FILES += BogaudioModules/src/menu.cpp +MINIPLUGIN_FILES += BogaudioModules/src/module.cpp +MINIPLUGIN_FILES += BogaudioModules/src/param_quantities.cpp +MINIPLUGIN_FILES += BogaudioModules/src/poly_channels.cpp +MINIPLUGIN_FILES += BogaudioModules/src/skins.cpp +MINIPLUGIN_FILES += BogaudioModules/src/utils.cpp +MINIPLUGIN_FILES += BogaudioModules/src/vco_base.cpp +MINIPLUGIN_FILES += BogaudioModules/src/widgets.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/analyzer.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/math.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/noise.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/oscillator.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/signal.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/table.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/filters/multimode.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/filters/resample.cpp + # modules/types which are present in other plugins BOGAUDIO_CUSTOM = ADSR BlueNoiseGenerator LFO Noise VCA VCO VCF BOGAUDIO_CUSTOM_PER_FILE = ARQuantity AttackMenuItem ReleaseMenuItem @@ -1384,8 +1419,10 @@ endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png -MINIPLUGIN_LIST = Cardinal Fundamental -MINIRESOURCE_FILES = $(wildcard Cardinal/res/*.svg) +MINIPLUGIN_LIST = AudibleInstruments BogaudioModules Cardinal Fundamental +MINIRESOURCE_FILES = $(wildcard AudibleInstruments/res/*.svg) +MINIRESOURCE_FILES += $(wildcard BogaudioModules/res/*.svg) +MINIRESOURCE_FILES += $(wildcard Cardinal/res/*.svg) MINIRESOURCE_FILES += $(wildcard Fundamental/res/*.svg) MINIRESOURCE_FILES += $(wildcard Fundamental/res/components/*.svg) MINIRESOURCE_FILES += Fundamental/presets diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index e0fa9d2b..97707049 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -26,12 +26,34 @@ // Fundamental #include "Fundamental/src/plugin.hpp" +// AudibleInstruments +#include "AudibleInstruments/src/plugin.hpp" + +// BogaudioModules - integrate theme/skin support +#include +#include +#include +#include +#include +#define private public +#include "BogaudioModules/src/skins.hpp" +#undef private + +// BogaudioModules +extern Model* modelBogaudioLFO; +extern Model* modelBogaudioNoise; +extern Model* modelBogaudioVCA; +extern Model* modelBogaudioVCF; +extern Model* modelBogaudioVCO; + // known terminal modules std::vector hostTerminalModels; // plugin instances Plugin* pluginInstance__Cardinal; Plugin* pluginInstance__Fundamental; +Plugin* pluginInstance__AudibleInstruments; +Plugin* pluginInstance__BogaudioModules; namespace rack { @@ -187,32 +209,192 @@ static void initStatic__Fundamental() const StaticPluginLoader spl(p, "Fundamental"); if (spl.ok()) { - p->addModel(modelADSR); p->addModel(modelLFO); + p->addModel(modelNoise); + p->addModel(modelRandom); p->addModel(modelVCF); - p->addModel(modelVCO); - spl.removeModule("VCO2"); - spl.removeModule("VCA-1"); - spl.removeModule("VCA"); - spl.removeModule("LFO2"); + p->addModel(modelVCMixer); + spl.removeModule("8vert"); + spl.removeModule("ADSR"); spl.removeModule("Delay"); + spl.removeModule("LFO2"); + spl.removeModule("Merge"); + spl.removeModule("MidSide"); spl.removeModule("Mixer"); - spl.removeModule("VCMixer"); - spl.removeModule("8vert"); spl.removeModule("Mutes"); + spl.removeModule("Octave"); spl.removeModule("Pulses"); - spl.removeModule("Scope"); + spl.removeModule("Quantizer"); spl.removeModule("SEQ3"); + spl.removeModule("Scope"); 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"); + spl.removeModule("VCA"); + spl.removeModule("VCA-1"); + spl.removeModule("VCO"); + spl.removeModule("VCO2"); + } +} + +static void initStatic__AudibleInstruments() +{ + Plugin* const p = new Plugin; + pluginInstance__AudibleInstruments = p; + + const StaticPluginLoader spl(p, "AudibleInstruments"); + if (spl.ok()) + { + p->addModel(modelPlaits); + + spl.removeModule("Blinds"); + spl.removeModule("Braids"); + spl.removeModule("Branches"); + spl.removeModule("Clouds"); + spl.removeModule("Elements"); + spl.removeModule("Frames"); + spl.removeModule("Kinks"); + spl.removeModule("Links"); + spl.removeModule("Marbles"); + spl.removeModule("Rings"); + spl.removeModule("Ripples"); + spl.removeModule("Shades"); + spl.removeModule("Shelves"); + spl.removeModule("Stages"); + spl.removeModule("Streams"); + spl.removeModule("Tides"); + spl.removeModule("Tides2"); + spl.removeModule("Veils"); + spl.removeModule("Warps"); + } +} + +static void initStatic__BogaudioModules() +{ + Plugin* const p = new Plugin; + pluginInstance__BogaudioModules = p; + + const StaticPluginLoader spl(p, "BogaudioModules"); + if (spl.ok()) + { + // Make sure to use match Cardinal theme + Skins& skins(Skins::skins()); + skins._default = settings::darkMode ? "dark" : "light"; + + p->addModel(modelBogaudioLFO); + p->addModel(modelBogaudioNoise); + p->addModel(modelBogaudioVCA); + p->addModel(modelBogaudioVCF); + p->addModel(modelBogaudioVCO); + + // cat plugins/BogaudioModules/plugin.json | jq -r .modules[].slug - | sort + spl.removeModule("Bogaudio-AD"); + spl.removeModule("Bogaudio-Additator"); + spl.removeModule("Bogaudio-AddrSeq"); + spl.removeModule("Bogaudio-AddrSeqX"); + spl.removeModule("Bogaudio-ADSR"); + spl.removeModule("Bogaudio-AMRM"); + spl.removeModule("Bogaudio-Analyzer"); + spl.removeModule("Bogaudio-AnalyzerXL"); + spl.removeModule("Bogaudio-Arp"); + spl.removeModule("Bogaudio-ASR"); + spl.removeModule("Bogaudio-Assign"); + spl.removeModule("Bogaudio-Blank3"); + spl.removeModule("Bogaudio-Blank6"); + spl.removeModule("Bogaudio-Bool"); + spl.removeModule("Bogaudio-Chirp"); + spl.removeModule("Bogaudio-Clpr"); + spl.removeModule("Bogaudio-Cmp"); + spl.removeModule("Bogaudio-CmpDist"); + spl.removeModule("Bogaudio-CVD"); + spl.removeModule("Bogaudio-DADSRH"); + spl.removeModule("Bogaudio-DADSRHPlus"); + spl.removeModule("Bogaudio-Detune"); + spl.removeModule("Bogaudio-DGate"); + spl.removeModule("Bogaudio-Edge"); + spl.removeModule("Bogaudio-EightFO"); + spl.removeModule("Bogaudio-EightOne"); + spl.removeModule("Bogaudio-EQ"); + spl.removeModule("Bogaudio-EQS"); + spl.removeModule("Bogaudio-FFB"); + spl.removeModule("Bogaudio-FlipFlop"); + spl.removeModule("Bogaudio-FMOp"); + spl.removeModule("Bogaudio-Follow"); + spl.removeModule("Bogaudio-FourFO"); + spl.removeModule("Bogaudio-FourMan"); + spl.removeModule("Bogaudio-Inv"); + spl.removeModule("Bogaudio-Lgsw"); + spl.removeModule("Bogaudio-LLFO"); + spl.removeModule("Bogaudio-LLPG"); + spl.removeModule("Bogaudio-Lmtr"); + spl.removeModule("Bogaudio-LPG"); + spl.removeModule("Bogaudio-LVCF"); + spl.removeModule("Bogaudio-LVCO"); + spl.removeModule("Bogaudio-Manual"); + spl.removeModule("Bogaudio-Matrix18"); + spl.removeModule("Bogaudio-Matrix44"); + spl.removeModule("Bogaudio-Matrix44Cvm"); + spl.removeModule("Bogaudio-Matrix81"); + spl.removeModule("Bogaudio-Matrix88"); + spl.removeModule("Bogaudio-Matrix88Cv"); + spl.removeModule("Bogaudio-Matrix88M"); + spl.removeModule("Bogaudio-MegaGate"); + spl.removeModule("Bogaudio-Mix1"); + spl.removeModule("Bogaudio-Mix2"); + spl.removeModule("Bogaudio-Mix4"); + spl.removeModule("Bogaudio-Mix4x"); + spl.removeModule("Bogaudio-Mix8"); + spl.removeModule("Bogaudio-Mix8x"); + spl.removeModule("Bogaudio-Mono"); + spl.removeModule("Bogaudio-Mult"); + spl.removeModule("Bogaudio-Mumix"); + spl.removeModule("Bogaudio-Mute8"); + spl.removeModule("Bogaudio-Nsgt"); + spl.removeModule("Bogaudio-Offset"); + spl.removeModule("Bogaudio-OneEight"); + spl.removeModule("Bogaudio-Pan"); + spl.removeModule("Bogaudio-PEQ"); + spl.removeModule("Bogaudio-PEQ14"); + spl.removeModule("Bogaudio-PEQ14XF"); + spl.removeModule("Bogaudio-PEQ6"); + spl.removeModule("Bogaudio-PEQ6XF"); + spl.removeModule("Bogaudio-Pgmr"); + spl.removeModule("Bogaudio-PgmrX"); + spl.removeModule("Bogaudio-PolyCon"); + spl.removeModule("Bogaudio-PolyCon8"); + spl.removeModule("Bogaudio-PolyMult"); + spl.removeModule("Bogaudio-PolyOff16"); + spl.removeModule("Bogaudio-PolyOff8"); + spl.removeModule("Bogaudio-Pressor"); + spl.removeModule("Bogaudio-Pulse"); + spl.removeModule("Bogaudio-Ranalyzer"); + spl.removeModule("Bogaudio-Reftone"); + spl.removeModule("Bogaudio-RGate"); + spl.removeModule("Bogaudio-SampleHold"); + spl.removeModule("Bogaudio-Shaper"); + spl.removeModule("Bogaudio-ShaperPlus"); + spl.removeModule("Bogaudio-Sine"); + spl.removeModule("Bogaudio-Slew"); + spl.removeModule("Bogaudio-Stack"); + spl.removeModule("Bogaudio-Sums"); + spl.removeModule("Bogaudio-Switch"); + spl.removeModule("Bogaudio-Switch1616"); + spl.removeModule("Bogaudio-Switch18"); + spl.removeModule("Bogaudio-Switch44"); + spl.removeModule("Bogaudio-Switch81"); + spl.removeModule("Bogaudio-Switch88"); + spl.removeModule("Bogaudio-UMix"); + spl.removeModule("Bogaudio-Unison"); + spl.removeModule("Bogaudio-VCAmp"); + spl.removeModule("Bogaudio-VCM"); + spl.removeModule("Bogaudio-Velo"); + spl.removeModule("Bogaudio-Vish"); + spl.removeModule("Bogaudio-VU"); + spl.removeModule("Bogaudio-Walk"); + spl.removeModule("Bogaudio-Walk2"); + spl.removeModule("Bogaudio-XCO"); + spl.removeModule("Bogaudio-XFade"); } } @@ -220,6 +402,8 @@ void initStaticPlugins() { initStatic__Cardinal(); initStatic__Fundamental(); + initStatic__AudibleInstruments(); + initStatic__BogaudioModules(); } void destroyStaticPlugins() @@ -231,7 +415,17 @@ void destroyStaticPlugins() void updateStaticPluginsDarkMode() { - d_stdout("TODO"); + const bool darkMode = settings::darkMode; + // bogaudio + { + Skins& skins(Skins::skins()); + skins._default = darkMode ? "dark" : "light"; + + std::lock_guard lock(skins._defaultSkinListenersLock); + for (auto listener : skins._defaultSkinListeners) { + listener->defaultSkinChanged(skins._default); + } + } } } diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index b19046a7..e6e5db23 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -156,7 +156,7 @@ extern Model* modelChord; // Bidoo #include "Bidoo/src/plugin.hpp" -// BogaudioModules - force dark skin as default +// BogaudioModules - integrate theme/skin support #include #include #include diff --git a/src/Cardinal/MenuBar.cpp b/src/Cardinal/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/Cardinal/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalFX/MenuBar.cpp b/src/CardinalFX/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/CardinalFX/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalMini/MenuBar.cpp b/src/CardinalMini/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/CardinalMini/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalNative/MenuBar.cpp b/src/CardinalNative/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/CardinalNative/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index 5aabed0f..6f451cf4 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -76,13 +76,21 @@ bool connectToRemote() RemoteDetails* remoteDetails = ui->remoteDetails; -#ifdef HAVE_LIBLO +#if CARDINAL_VARIANT_MINI + if (remoteDetails == nullptr) + { + ui->remoteDetails = remoteDetails = new RemoteDetails; + remoteDetails->handle = ui; + remoteDetails->connected = true; + remoteDetails->autoDeploy = true; + } +#elif defined(HAVE_LIBLO) if (remoteDetails == nullptr) { const lo_server oscServer = lo_server_new_with_proto(nullptr, LO_UDP, nullptr); DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr, false); - remoteDetails = new RemoteDetails; + ui->remoteDetails = remoteDetails = new RemoteDetails; remoteDetails->handle = oscServer; remoteDetails->connected = false; remoteDetails->autoDeploy = false; @@ -106,13 +114,14 @@ void disconnectFromRemote(RemoteDetails* const remote) { #ifdef HAVE_LIBLO lo_server_free(static_cast(remote->handle)); - delete remote; #endif + delete remote; } } void idleRemote(RemoteDetails* const remote) { + DISTRHO_SAFE_ASSERT_RETURN(remote != nullptr,); #ifdef HAVE_LIBLO while (lo_server_recv_noblock(static_cast(remote->handle), 0) != 0) {} #endif @@ -120,15 +129,26 @@ void idleRemote(RemoteDetails* const remote) void deployToRemote(RemoteDetails* const remote) { -#ifdef HAVE_LIBLO + CardinalPluginContext* const context = static_cast(APP); + DISTRHO_SAFE_ASSERT_RETURN(context != nullptr,); + + context->engine->prepareSave(); + context->patch->saveAutosave(); + context->patch->cleanAutosave(); + std::vector data(rack::system::archiveDirectory(context->patch->autosavePath, 1)); + + DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); + +#if CARDINAL_VARIANT_MINI + if (char* const patch = String::asBase64(data.data(), data.size()).getAndReleaseBuffer()) + { + static_cast(remote->handle)->setState("patch", patch); + std::free(patch); + } +#elif defined(HAVE_LIBLO) const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); - APP->engine->prepareSave(); - APP->patch->saveAutosave(); - APP->patch->cleanAutosave(); - std::vector data(rack::system::archiveDirectory(APP->patch->autosavePath, 1)); - if (const lo_blob blob = lo_blob_new(data.size(), data.data())) { lo_send(addr, "/load", "b", blob); @@ -139,7 +159,7 @@ void deployToRemote(RemoteDetails* const remote) #endif } -void sendScreenshotToRemote(RemoteDetails* const remote, const char* const screenshot) +void sendScreenshotToRemote(RemoteDetails*, const char* const screenshot) { #ifdef HAVE_LIBLO const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); diff --git a/src/CardinalRemote/MenuBar.cpp b/src/CardinalRemote/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/CardinalRemote/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalSynth/MenuBar.cpp b/src/CardinalSynth/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/CardinalSynth/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index b664736e..0664a760 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -62,9 +62,6 @@ #endif namespace rack { -namespace app { - widget::Widget* createMenuBar(bool isStandalone); -} namespace engine { void Engine_setAboutToClose(Engine*); } @@ -87,7 +84,7 @@ bool Plugin::writeMidiEvent(const MidiEvent&) noexcept { return false; } // -------------------------------------------------------------------------------------------------------------------- -#ifdef DISTRHO_OS_WASM +#if defined(DISTRHO_OS_WASM) && ! CARDINAL_VARIANT_MINI struct WasmWelcomeDialog : rack::widget::OpaqueWidget { static const constexpr float margin = 10; @@ -346,7 +343,10 @@ class CardinalUI : public CardinalBaseUI, { rack::contextSet(context); - #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + #if CARDINAL_VARIANT_MINI + DISTRHO_SAFE_ASSERT_RETURN(remoteUtils::connectToRemote(),); + DISTRHO_SAFE_ASSERT_RETURN(remoteDetails != nullptr,); + // create unique temporary path for this instance try { char uidBuf[24]; @@ -369,7 +369,7 @@ class CardinalUI : public CardinalBaseUI, const float sampleRate = getSampleRate(); rack::settings::sampleRate = sampleRate; - context->bufferSize = 128; + context->bufferSize = 1; context->sampleRate = sampleRate; context->engine = new rack::engine::Engine; @@ -403,15 +403,6 @@ class CardinalUI : public CardinalBaseUI, rack::window::WindowSetPluginUI(context->window, this); - if (rack::widget::Widget* const menuBar = context->scene->menuBar) - { - context->scene->removeChild(menuBar); - delete menuBar; - } - - context->scene->menuBar = rack::app::createMenuBar(getApp().isStandalone()); - context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll); - // hide "Browse VCV Library" button rack::widget::Widget* const browser = context->scene->browser->children.back(); rack::widget::Widget* const headerLayout = browser->children.front(); @@ -444,7 +435,7 @@ class CardinalUI : public CardinalBaseUI, } } - #ifdef DISTRHO_OS_WASM + #if defined(DISTRHO_OS_WASM) && ! CARDINAL_VARIANT_MINI if (rack::patchStorageSlug != nullptr) { psDialog = new WasmRemotePatchLoadingDialog(true); @@ -477,26 +468,18 @@ class CardinalUI : public CardinalBaseUI, context->nativeWindowId = 0; - if (rack::widget::Widget* const menuBar = context->scene->menuBar) - { - context->scene->removeChild(menuBar); - delete menuBar; - } - - context->scene->menuBar = rack::app::createMenuBar(); - context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll); - rack::window::WindowSetPluginUI(context->window, nullptr); - #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + context->tlw = nullptr; + context->ui = nullptr; + + #if CARDINAL_VARIANT_MINI { const ScopedContext sc(this); context->patch->clear(); // do a little dance to prevent context scene deletion from saving to temp dir - #ifndef HEADLESS const ScopedValueSetter svs(rack::settings::headless, true); - #endif Engine_setAboutToClose(context->engine); delete context; } @@ -620,6 +603,10 @@ class CardinalUI : public CardinalBaseUI, filebrowserhandle = nullptr; } + #if CARDINAL_VARIANT_MINI + context->engine->stepBlock(1); + #endif + if (windowParameters.rateLimit != 0 && ++rateLimitStep % (windowParameters.rateLimit * 2)) return; @@ -804,7 +791,7 @@ class CardinalUI : public CardinalBaseUI, void stateChanged(const char* const key, const char* const value) override { - #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + #if CARDINAL_VARIANT_MINI if (std::strcmp(key, "patch") == 0) { if (fAutosavePath.empty()) @@ -952,9 +939,9 @@ class CardinalUI : public CardinalBaseUI, #endif rack::math::Vec scrollDelta = rack::math::Vec(ev.delta.getX(), ev.delta.getY()); -#ifndef DISTRHO_OS_MAC + #ifndef DISTRHO_OS_MAC scrollDelta = scrollDelta.mult(50.0); -#endif + #endif const int mods = glfwMods(ev.mod); const ScopedContext sc(this, mods); diff --git a/src/Makefile b/src/Makefile index ea787fe8..7d73a0f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -165,7 +165,6 @@ RACK_FILES += override/context.cpp RACK_FILES += override/minblep.cpp RACK_FILES += override/plugin.cpp RACK_FILES += override/Engine.cpp -RACK_FILES += override/MenuBar.cpp RACK_FILES += override/Model.cpp RACK_FILES += override/ModuleWidget.cpp RACK_FILES += override/OpenGlWidget.cpp diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 2226e34a..3336da04 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -108,6 +108,7 @@ FILES_DSP += RemoteWindow.cpp else FILES_UI = CardinalUI.cpp FILES_UI += glfw.cpp +FILES_UI += MenuBar.cpp FILES_UI += Window.cpp endif @@ -255,6 +256,7 @@ FILES_UI += CardinalCommon-UI.cpp FILES_UI += CardinalRemote.cpp FILES_UI += common.cpp FILES_UI += glfw.cpp +FILES_UI += MenuBar.cpp FILES_UI += Window.cpp EXTRA_UI_DEPENDENCIES = $(subst -headless,,$(EXTRA_DSP_DEPENDENCIES)) EXTRA_UI_LIBS += $(subst -headless,,$(EXTRA_DSP_LIBS)) diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 94d696fe..264934fe 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -182,13 +182,10 @@ class CardinalBaseUI : public UI { ~CardinalBaseUI() override { - disconnectFromRemote(remoteDetails); + remoteUtils::disconnectFromRemote(remoteDetails); if (filebrowserhandle != nullptr) fileBrowserClose(filebrowserhandle); - - context->tlw = nullptr; - context->ui = nullptr; } }; #endif diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index 927f561b..2eed5e00 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -209,10 +209,15 @@ static void Engine_stepFrame(Engine* that) { float smoothValue = internal->smoothValue; Param* smoothParam = &smoothModule->params[smoothParamId]; float value = smoothParam->value; - // Use decay rate of roughly 1 graphics frame - const float smoothLambda = 60.f; - float newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime; - if (value == newValue) { + float newValue; + if (internal->blockFrames != 1) { + // Use decay rate of roughly 1 graphics frame + const float smoothLambda = 60.f; + newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime; + } else { + newValue = value; + } + if (d_isEqual(value, newValue)) { // Snap to actual smooth value if the value doesn't change enough (due to the granularity of floats) smoothParam->setValue(smoothValue); internal->smoothModule = NULL; diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index d75d8cc3..ffb5fb48 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -53,6 +53,7 @@ #include "../CardinalCommon.hpp" #include "../CardinalRemote.hpp" +#include "DistrhoPlugin.hpp" #include "DistrhoStandaloneUtils.hpp" #ifdef HAVE_LIBLO @@ -98,14 +99,14 @@ struct MenuButton : ui::Button { struct FileButton : MenuButton { const bool isStandalone; -#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) +#if ! CARDINAL_VARIANT_MINI std::vector demoPatches; #endif FileButton(const bool standalone) : MenuButton(), isStandalone(standalone) { -#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) +#if ! CARDINAL_VARIANT_MINI const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples"; if (system::isDirectory(patchesDir)) @@ -167,7 +168,7 @@ struct FileButton : MenuButton { patchUtils::revertDialog(); }, APP->patch->path.empty())); -#ifdef HAVE_LIBLO +// #if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI menu->addChild(new ui::MenuSeparator); remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); @@ -186,7 +187,7 @@ struct FileButton : MenuButton { remoteUtils::connectToRemote(); })); } -#endif +// #endif #ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); @@ -201,7 +202,7 @@ struct FileButton : MenuButton { })); #endif -#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) +#if ! CARDINAL_VARIANT_MINI if (!demoPatches.empty()) { menu->addChild(new ui::MenuSeparator); diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 032d4c20..e3af71fa 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -50,6 +50,9 @@ namespace rack { namespace app { +widget::Widget* createMenuBar(bool isStandalone); + + struct ResizeHandle : widget::OpaqueWidget { math::Vec size; @@ -131,7 +134,7 @@ Scene::Scene() { rack = rackScroll->rackWidget; - menuBar = createMenuBar(); + menuBar = createMenuBar(isStandalone()); addChild(menuBar); browser = browserCreate(); @@ -209,7 +212,7 @@ void Scene::step() { if (remoteDetails->autoDeploy) { const int actionIndex = APP->history->actionIndex; const double time = system::getTime(); - if (internal->historyActionIndex != actionIndex && time - internal->lastSceneChangeTime >= 5.0) { + if (internal->historyActionIndex != actionIndex && time - internal->lastSceneChangeTime >= 1.0) { internal->historyActionIndex = actionIndex; internal->lastSceneChangeTime = time; remoteUtils::deployToRemote(remoteDetails); @@ -315,7 +318,8 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { e.consume(this); } if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) { - remoteUtils::deployToRemote(remoteUtils::getRemote()); + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + remoteUtils::deployToRemote(remoteDetails); window::generateScreenshot(); e.consume(this); } From d0eba9e1aeaf8593f31c34d120a18a79b5f2fb82 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 17:20:35 +0000 Subject: [PATCH 191/451] Add direct parameter changes to remote control, for LV2 and OSC Signed-off-by: falkTX --- plugins/plugins.cpp | 2 +- src/CardinalCommon.cpp | 51 +++++++++++++++++++++++++--- src/CardinalMini/DistrhoPluginInfo.h | 2 +- src/CardinalPlugin.cpp | 16 +++++++++ src/CardinalRemote.cpp | 32 ++++++++++++++--- src/CardinalRemote.hpp | 9 ++--- src/CardinalUI.cpp | 6 ++-- src/override/Engine.cpp | 19 +++++++++-- src/override/MenuBar.cpp | 17 ++++++---- src/override/Scene.cpp | 12 ++++--- src/override/Window.cpp | 3 +- 11 files changed, 136 insertions(+), 33 deletions(-) diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index e6e5db23..318c9f73 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1550,7 +1550,7 @@ static void initStatic__BogaudioModules() { // Make sure to use dark theme as default Skins& skins(Skins::skins()); - skins._default = "dark"; + skins._default = settings::darkMode ? "dark" : "light"; #define modelADSR modelBogaudioADSR #define modelLFO modelBogaudioLFO #define modelNoise modelBogaudioNoise diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index c6efe8b4..fb8e6645 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS @@ -236,7 +237,7 @@ static int osc_fallback_handler(const char* const path, const char* const types, static int osc_hello_handler(const char*, const char*, lo_arg**, int, const lo_message m, void* const self) { - d_stdout("osc_hello_handler()"); + d_debug("osc_hello_handler()"); const lo_address source = lo_message_get_source(m); const lo_server server = lo_server_thread_get_server(static_cast(self)->oscServerThread); lo_send_from(source, server, LO_TT_IMMEDIATE, "/resp", "ss", "hello", "ok"); @@ -245,7 +246,7 @@ static int osc_hello_handler(const char*, const char*, lo_arg**, int, const lo_m static int osc_load_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) { - d_stdout("osc_load_handler()"); + d_debug("osc_load_handler()"); DISTRHO_SAFE_ASSERT_RETURN(argc == 1, 0); DISTRHO_SAFE_ASSERT_RETURN(types != nullptr && types[0] == 'b', 0); @@ -283,9 +284,35 @@ static int osc_load_handler(const char*, const char* types, lo_arg** argv, int a return 0; } +static int osc_param_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) +{ + d_debug("osc_param_handler()"); + DISTRHO_SAFE_ASSERT_RETURN(argc == 3, 0); + DISTRHO_SAFE_ASSERT_RETURN(types != nullptr, 0); + DISTRHO_SAFE_ASSERT_RETURN(types[0] == 'h', 0); + DISTRHO_SAFE_ASSERT_RETURN(types[1] == 'i', 0); + DISTRHO_SAFE_ASSERT_RETURN(types[2] == 'f', 0); + + if (CardinalBasePlugin* const plugin = static_cast(self)->remotePluginInstance) + { + CardinalPluginContext* const context = plugin->context; + + const int64_t moduleId = argv[0]->h; + const int paramId = argv[1]->i; + const float paramValue = argv[2]->f; + + rack::engine::Module* const module = context->engine->getModule(moduleId); + DISTRHO_SAFE_ASSERT_RETURN(module != nullptr, 0); + + context->engine->setParamValue(module, paramId, paramValue); + } + + return 0; +} + static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) { - d_stdout("osc_screenshot_handler()"); + d_debug("osc_screenshot_handler()"); DISTRHO_SAFE_ASSERT_RETURN(argc == 1, 0); DISTRHO_SAFE_ASSERT_RETURN(types != nullptr && types[0] == 'b', 0); @@ -298,7 +325,13 @@ static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, bool ok = false; if (CardinalBasePlugin* const plugin = static_cast(self)->remotePluginInstance) - ok = plugin->updateStateValue("screenshot", String::asBase64(blob, size).buffer()); + { + if (char* const screenshot = String::asBase64(blob, size).getAndReleaseBuffer()) + { + ok = plugin->updateStateValue("screenshot", screenshot); + std::free(screenshot); + } + } const lo_address source = lo_message_get_source(m); const lo_server server = lo_server_thread_get_server(static_cast(self)->oscServerThread); @@ -441,13 +474,20 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB #ifdef CARDINAL_INIT_OSC_THREAD INFO("Initializing OSC Remote control"); - oscServerThread = lo_server_thread_new_with_proto(REMOTE_HOST_PORT, LO_UDP, osc_error_handler); + const char* port; + if (const char* const portEnv = std::getenv("CARDINAL_REMOTE_HOST_PORT")) + port = portEnv; + else + port = CARDINAL_DEFAULT_REMOTE_HOST_PORT; + oscServerThread = lo_server_thread_new_with_proto(port, LO_UDP, osc_error_handler); DISTRHO_SAFE_ASSERT_RETURN(oscServerThread != nullptr,); lo_server_thread_add_method(oscServerThread, "/hello", "", osc_hello_handler, this); lo_server_thread_add_method(oscServerThread, "/load", "b", osc_load_handler, this); + lo_server_thread_add_method(oscServerThread, "/param", "hif", osc_param_handler, this); lo_server_thread_add_method(oscServerThread, "/screenshot", "b", osc_screenshot_handler, this); lo_server_thread_add_method(oscServerThread, nullptr, nullptr, osc_fallback_handler, nullptr); + lo_server_thread_start(oscServerThread); #else INFO("OSC Remote control is not enabled in this build"); #endif @@ -460,6 +500,7 @@ Initializer::~Initializer() #ifdef CARDINAL_INIT_OSC_THREAD if (oscServerThread != nullptr) { + lo_server_thread_stop(oscServerThread); lo_server_thread_del_method(oscServerThread, nullptr, nullptr); lo_server_thread_free(oscServerThread); oscServerThread = nullptr; diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index ac935368..f4faaa2e 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -53,7 +53,7 @@ #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" // #ifdef __MOD_DEVICES__ -// # define DISTRHO_PLUGIN_USES_MODGUI 1 +# define DISTRHO_PLUGIN_USES_MODGUI 1 // #endif #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 7d26c11b..ed2f555e 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -794,6 +794,22 @@ class CardinalPlugin : public CardinalBasePlugin void setState(const char* const key, const char* const value) override { + #if CARDINAL_VARIANT_MINI + if (std::strcmp(key, "param") == 0) + { + int64_t moduleId = 0; + int paramId = 0; + float paramValue = 0.f; + std::sscanf(value, "%lu:%d:%f", &moduleId, ¶mId, ¶mValue); + + rack::engine::Module* const module = context->engine->getModule(moduleId); + DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,); + + context->engine->setParamValue(module, paramId, paramValue); + return; + } + #endif + #ifndef HEADLESS if (std::strcmp(key, "moduleInfos") == 0) { diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index 6f451cf4..f0596901 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -35,6 +35,11 @@ # include #endif +#ifdef HAVE_LIBLO +// # define REMOTE_HOST "localhost" +# define REMOTE_HOST "192.168.51.1" +#endif + // ----------------------------------------------------------------------------------------------------------- namespace remoteUtils { @@ -98,7 +103,10 @@ bool connectToRemote() lo_server_add_method(oscServer, "/resp", nullptr, osc_handler, remoteDetails); } - if (const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT)) + const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); + DISTRHO_SAFE_ASSERT(addr != nullptr); + + if (addr != nullptr) { lo_send(addr, "/hello", ""); lo_address_free(addr); @@ -127,7 +135,23 @@ void idleRemote(RemoteDetails* const remote) #endif } -void deployToRemote(RemoteDetails* const remote) +void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int paramId, float value) +{ +#if CARDINAL_VARIANT_MINI + char paramBuf[512] = {}; + std::snprintf(paramBuf, sizeof(paramBuf), "%lu:%d:%f", moduleId, paramId, value); + static_cast(remote->handle)->setState("param", paramBuf); +#elif defined(HAVE_LIBLO) + const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); + DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); + + lo_send(addr, "/param", "hif", moduleId, paramId, value); + + lo_address_free(addr); +#endif +} + +void sendFullPatchToRemote(RemoteDetails* const remote) { CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr,); @@ -146,7 +170,7 @@ void deployToRemote(RemoteDetails* const remote) std::free(patch); } #elif defined(HAVE_LIBLO) - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); + const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); if (const lo_blob blob = lo_blob_new(data.size(), data.data())) @@ -162,7 +186,7 @@ void deployToRemote(RemoteDetails* const remote) void sendScreenshotToRemote(RemoteDetails*, const char* const screenshot) { #ifdef HAVE_LIBLO - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); + const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); std::vector data(d_getChunkFromBase64String(screenshot)); diff --git a/src/CardinalRemote.hpp b/src/CardinalRemote.hpp index 64676419..e45c569f 100644 --- a/src/CardinalRemote.hpp +++ b/src/CardinalRemote.hpp @@ -17,11 +17,7 @@ #pragma once -#ifdef HAVE_LIBLO -// # define REMOTE_HOST "localhost" -# define REMOTE_HOST "192.168.51.1" -# define REMOTE_HOST_PORT "2228" -#endif +#define CARDINAL_DEFAULT_REMOTE_HOST_PORT "2228" // ----------------------------------------------------------------------------------------------------------- @@ -37,7 +33,8 @@ RemoteDetails* getRemote(); bool connectToRemote(); void disconnectFromRemote(RemoteDetails* remote); void idleRemote(RemoteDetails* remote); -void deployToRemote(RemoteDetails* remote); +void sendParamChangeToRemote(RemoteDetails* remote, int64_t moduleId, int paramId, float value); +void sendFullPatchToRemote(RemoteDetails* remote); void sendScreenshotToRemote(RemoteDetails* remote, const char* screenshot); } diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 0664a760..4485d396 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -64,6 +64,7 @@ namespace rack { namespace engine { void Engine_setAboutToClose(Engine*); +void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); } namespace window { void WindowSetPluginUI(Window* window, DISTRHO_NAMESPACE::UI* ui); @@ -344,8 +345,7 @@ class CardinalUI : public CardinalBaseUI, rack::contextSet(context); #if CARDINAL_VARIANT_MINI - DISTRHO_SAFE_ASSERT_RETURN(remoteUtils::connectToRemote(),); - DISTRHO_SAFE_ASSERT_RETURN(remoteDetails != nullptr,); + remoteUtils::connectToRemote(); // create unique temporary path for this instance try { @@ -387,6 +387,8 @@ class CardinalUI : public CardinalBaseUI, context->window = new rack::window::Window; context->scene->rackScroll->reset(); + + Engine_setRemoteDetails(context->engine, remoteDetails); #endif Window& window(getWindow()); diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index 2eed5e00..c0b03a1a 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -49,6 +49,7 @@ # undef DEBUG #endif +#include "../CardinalRemote.hpp" #include "DistrhoUtils.hpp" @@ -97,6 +98,9 @@ struct Engine::Internal { int smoothParamId = 0; float smoothValue = 0.f; + // Remote control + remoteUtils::RemoteDetails* remoteDetails = nullptr; + /** Mutex that guards the Engine state, such as settings, Modules, and Cables. Writers lock when mutating the engine's state or stepping the block. Readers lock when using the engine's state. @@ -210,12 +214,13 @@ static void Engine_stepFrame(Engine* that) { Param* smoothParam = &smoothModule->params[smoothParamId]; float value = smoothParam->value; float newValue; - if (internal->blockFrames != 1) { + if (internal->remoteDetails != nullptr) { + newValue = value; + sendParamChangeToRemote(internal->remoteDetails, smoothModule->id, smoothParamId, value); + } else { // Use decay rate of roughly 1 graphics frame const float smoothLambda = 60.f; newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime; - } else { - newValue = value; } if (d_isEqual(value, newValue)) { // Snap to actual smooth value if the value doesn't change enough (due to the granularity of floats) @@ -1013,6 +1018,9 @@ void Engine::setParamValue(Module* module, int paramId, float value) { internal->smoothModule = NULL; internal->smoothParamId = 0; } + if (internal->remoteDetails != nullptr) { + sendParamChangeToRemote(internal->remoteDetails, module->id, paramId, value); + } module->params[paramId].value = value; } @@ -1263,5 +1271,10 @@ void Engine_setAboutToClose(Engine* const engine) { } +void Engine_setRemoteDetails(Engine* const engine, remoteUtils::RemoteDetails* const remoteDetails) { + engine->internal->remoteDetails = remoteDetails; +} + + } // namespace engine } // namespace rack diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index ffb5fb48..d1ff0d0f 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -66,7 +66,9 @@ namespace rack { namespace asset { std::string patchesPath(); } - +namespace engine { +void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); +} namespace plugin { void updateStaticPluginsDarkMode(); } @@ -168,26 +170,29 @@ struct FileButton : MenuButton { patchUtils::revertDialog(); }, APP->patch->path.empty())); -// #if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI +#if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI menu->addChild(new ui::MenuSeparator); remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); if (remoteDetails != nullptr && remoteDetails->connected) { menu->addChild(createMenuItem("Deploy to MOD", "F7", [remoteDetails]() { - remoteUtils::deployToRemote(remoteDetails); + remoteUtils::sendFullPatchToRemote(remoteDetails); })); menu->addChild(createCheckMenuItem("Auto deploy to MOD", "", [remoteDetails]() {return remoteDetails->autoDeploy;}, - [remoteDetails]() {remoteDetails->autoDeploy = !remoteDetails->autoDeploy;} + [remoteDetails]() { + remoteDetails->autoDeploy = !remoteDetails->autoDeploy; + Engine_setRemoteDetails(APP->engine, remoteDetails->autoDeploy ? remoteDetails : nullptr); + } )); } else { menu->addChild(createMenuItem("Connect to MOD", "", []() { - remoteUtils::connectToRemote(); + DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); })); } -// #endif +#endif #ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index e3af71fa..c2e34faf 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -212,11 +212,15 @@ void Scene::step() { if (remoteDetails->autoDeploy) { const int actionIndex = APP->history->actionIndex; const double time = system::getTime(); - if (internal->historyActionIndex != actionIndex && time - internal->lastSceneChangeTime >= 1.0) { + if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) { + const std::string& name(APP->history->actions[actionIndex - 1]->name); + if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") { + printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str()); + remoteUtils::sendFullPatchToRemote(remoteDetails); + window::generateScreenshot(); + } internal->historyActionIndex = actionIndex; internal->lastSceneChangeTime = time; - remoteUtils::deployToRemote(remoteDetails); - window::generateScreenshot(); } } } @@ -319,7 +323,7 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { } if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) { if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) - remoteUtils::deployToRemote(remoteDetails); + remoteUtils::sendFullPatchToRemote(remoteDetails); window::generateScreenshot(); e.consume(this); } diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 7c32b0cc..2591bd71 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -585,9 +585,10 @@ static void Window__downscaleBitmap(uint8_t* pixels, int& width, int& height) { static void Window__writeImagePNG(void* context, void* data, int size) { USE_NAMESPACE_DISTRHO CardinalBaseUI* const ui = static_cast(context); - if (const char* const screenshot = String::asBase64(data, size).buffer()) { + if (char* const screenshot = String::asBase64(data, size).getAndReleaseBuffer()) { ui->setState("screenshot", screenshot); remoteUtils::sendScreenshotToRemote(ui->remoteDetails, screenshot); + std::free(screenshot); } } #endif From 5e73b8c22701b9418cf60ee467b40515f54d03cf Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Dec 2022 23:58:16 +0000 Subject: [PATCH 192/451] More mini details, fake audio runs, set host param values Signed-off-by: falkTX --- dpf | 2 +- patches/init/mini.vcv | 272 ++++++++++++++++++++----- plugins/Cardinal/src/HostAudio.cpp | 52 +++-- plugins/Cardinal/src/plugin.hpp | 37 +++- plugins/Makefile | 3 + plugins/plugins-mini.cpp | 8 +- src/CardinalMini/CardinalCommon-UI.cpp | 2 +- src/CardinalMini/DistrhoPluginInfo.h | 4 +- src/CardinalPlugin.cpp | 53 +++-- src/CardinalRemote.cpp | 26 ++- src/CardinalUI.cpp | 43 +++- src/Makefile.cardinal.mk | 3 +- src/override/MenuBar.cpp | 11 + src/override/Scene.cpp | 6 +- 14 files changed, 411 insertions(+), 111 deletions(-) diff --git a/dpf b/dpf index 8eb504d3..207e0ae8 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 8eb504d3eb6b4f9984503bedfbd3c02b7cb63d2b +Subproject commit 207e0ae8720faa4db6f34192d83a0ee3b85b832a diff --git a/patches/init/mini.vcv b/patches/init/mini.vcv index 640ce768..0c6454a2 100644 --- a/patches/init/mini.vcv +++ b/patches/init/mini.vcv @@ -1,78 +1,101 @@ { - "version": "2.1", + "version": "2.1.1", "zoom": 1.0, "modules": [ { - "id": 2799203590388841, + "id": 8712245256622475, "plugin": "Cardinal", "model": "TextEditor", "version": "2.0", "params": [], - "leftModuleId": 4, + "leftModuleId": 1202678850202654, "data": { "filepath": "", "lang": "None", - "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio ports, 5 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nHave fun!\n\n", - "width": 23 - }, - "pos": [ - 42, - 0 - ] - }, - { - "id": 2, - "plugin": "Cardinal", - "model": "HostMIDI", - "version": "2.0", - "params": [], - "leftModuleId": 7249509538355161, - "rightModuleId": 3, - "data": { - "pwRange": 0.0, - "smooth": false, - "channels": 1, - "polyMode": 0, - "lastPitch": 8192, - "lastMod": 0, - "inputChannel": 0, - "outputChannel": 0 + "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio ports, 5 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nA basic VCO + ADSR + VCA is\nthe default patch\n\nHave fun!\n\n", + "width": 19 }, "pos": [ - 16, + 58, 0 ] }, { - "id": 3, - "plugin": "Cardinal", - "model": "HostTime", + "id": 5726895899473528, + "plugin": "Fundamental", + "model": "ADSR", "version": "2.0", - "params": [], - "leftModuleId": 2, - "rightModuleId": 4, + "params": [ + { + "value": 0.5, + "id": 0 + }, + { + "value": 0.5, + "id": 1 + }, + { + "value": 0.5, + "id": 2 + }, + { + "value": 0.5, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + } + ], + "leftModuleId": 8601159184541723, + "rightModuleId": 4828178296911509, "pos": [ - 25, + 18, 0 ] }, { - "id": 4, - "plugin": "Cardinal", - "model": "HostParameters", + "id": 4828178296911509, + "plugin": "Fundamental", + "model": "VCA-1", "version": "2.0", - "params": [], - "leftModuleId": 3, - "rightModuleId": 2799203590388841, + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + } + ], + "leftModuleId": 5726895899473528, + "rightModuleId": 1, "pos": [ - 33, + 27, 0 ] }, { - "id": 7249509538355161, - "plugin": "Cardinal", - "model": "HostCV", + "id": 8601159184541723, + "plugin": "Fundamental", + "model": "VCO", "version": "2.0", "params": [ { @@ -80,7 +103,7 @@ "id": 0 }, { - "value": 0.0, + "value": 1.0, "id": 1 }, { @@ -90,30 +113,171 @@ { "value": 0.0, "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 } ], - "leftModuleId": 3606136179759592, - "rightModuleId": 2, + "leftModuleId": 2, + "rightModuleId": 5726895899473528, "pos": [ - 8, + 9, 0 ] }, { - "id": 3606136179759592, + "id": 1, "plugin": "Cardinal", "model": "HostAudio2", "version": "2.0", + "params": [ + { + "value": 0.79432821273803711, + "id": 0 + } + ], + "leftModuleId": 4828178296911509, + "rightModuleId": 4, + "data": { + "dcFilter": true + }, + "pos": [ + 30, + 0 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", "params": [], - "rightModuleId": 7249509538355161, + "rightModuleId": 8601159184541723, "data": { - "dcFilter": false + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 }, "pos": [ 0, 0 ] + }, + { + "id": 4, + "plugin": "Cardinal", + "model": "HostParameters", + "version": "2.0", + "params": [], + "leftModuleId": 1, + "rightModuleId": 1202678850202654, + "data": { + "smooth": true + }, + "pos": [ + 38, + 0 + ] + }, + { + "id": 1202678850202654, + "plugin": "Cardinal", + "model": "HostParametersMap", + "version": "2.0", + "params": [], + "leftModuleId": 4, + "rightModuleId": 8712245256622475, + "data": { + "maps": [ + { + "hostParamId": 255, + "inverted": false, + "smooth": true, + "moduleId": -1, + "paramId": 0 + } + ] + }, + "pos": [ + 47, + 0 + ] } ], - "cables": [] + "cables": [ + { + "id": 5155876120487880, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 5726895899473528, + "inputId": 4, + "color": "#ff9352" + }, + { + "id": 781753834216137, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 5726895899473528, + "inputId": 5, + "color": "#ffd452" + }, + { + "id": 3464471860196875, + "outputModuleId": 5726895899473528, + "outputId": 0, + "inputModuleId": 4828178296911509, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 739552540616113, + "outputModuleId": 4828178296911509, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 6701970185765111, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 8601159184541723, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 6959800657121782, + "outputModuleId": 2, + "outputId": 2, + "inputModuleId": 8601159184541723, + "inputId": 1, + "color": "#52ff7d" + }, + { + "id": 1598271319373837, + "outputModuleId": 8601159184541723, + "outputId": 0, + "inputModuleId": 4828178296911509, + "inputId": 1, + "color": "#a8ff52" + } + ] } diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index dd3e584a..7bc15b1e 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -222,25 +222,51 @@ struct HostAudio2 : HostAudio<2> { valueR = 0.0f; } - const uint32_t j = internalDataFrame++; - internalDataBufferL[j] = valueL; - internalDataBufferR[j] = valueR; + if (pcontext->variant == kCardinalVariantMini) + { + const uint32_t j = internalDataFrame++; + internalDataBufferL[j] = valueL; + internalDataBufferR[j] = valueR; + + if (internalDataFrame == 4) + { + internalDataFrame = 0; + + if (resetMeters) + gainMeterL = gainMeterR = 0.0f; - if (internalDataFrame == 128) + gainMeterL = std::max(gainMeterL, d_findMaxNormalizedFloat<4>(internalDataBufferL)); + + if (in2connected) + gainMeterR = std::max(gainMeterR, d_findMaxNormalizedFloat<4>(internalDataBufferR)); + else + gainMeterR = gainMeterL; + + resetMeters = false; + } + } + else { - internalDataFrame = 0; + const uint32_t j = internalDataFrame++; + internalDataBufferL[j] = valueL; + internalDataBufferR[j] = valueR; - if (resetMeters) - gainMeterL = gainMeterR = 0.0f; + if (internalDataFrame == 128) + { + internalDataFrame = 0; + + if (resetMeters) + gainMeterL = gainMeterR = 0.0f; - gainMeterL = std::max(gainMeterL, d_findMaxNormalizedFloat128(internalDataBufferL)); + gainMeterL = std::max(gainMeterL, d_findMaxNormalizedFloat128(internalDataBufferL)); - if (in2connected) - gainMeterR = std::max(gainMeterR, d_findMaxNormalizedFloat128(internalDataBufferR)); - else - gainMeterR = gainMeterL; + if (in2connected) + gainMeterR = std::max(gainMeterR, d_findMaxNormalizedFloat128(internalDataBufferR)); + else + gainMeterR = gainMeterL; - resetMeters = false; + resetMeters = false; + } } #endif } diff --git a/plugins/Cardinal/src/plugin.hpp b/plugins/Cardinal/src/plugin.hpp index 1e922d19..55e48574 100644 --- a/plugins/Cardinal/src/plugin.hpp +++ b/plugins/Cardinal/src/plugin.hpp @@ -52,6 +52,37 @@ extern Model* modelTextEditor; extern std::vector hostTerminalModels; +/* + * Find the highest absolute and normalized value within a float array. + */ +template +static inline +float d_findMaxNormalizedFloat(const float floats[size]) +{ + static constexpr const float kEmptyFloats[size] = {}; + + if (std::memcmp(floats, kEmptyFloats, sizeof(float)*size) == 0) + return 0.f; + + float tmp, maxf2 = std::abs(floats[0]); + + for (std::size_t i=1; i maxf2) + maxf2 = tmp; + } + + if (maxf2 > 1.f) + maxf2 = 1.f; + + return maxf2; +} + /* * Find the highest absolute and normalized value within a float array. */ @@ -61,7 +92,7 @@ float d_findMaxNormalizedFloat128(const float floats[128]) static constexpr const float kEmptyFloats[128] = {}; if (std::memcmp(floats, kEmptyFloats, sizeof(float)*128) == 0) - return 0.0f; + return 0.f; float tmp, maxf2 = std::abs(floats[0]); @@ -76,8 +107,8 @@ float d_findMaxNormalizedFloat128(const float floats[128]) maxf2 = tmp; } - if (maxf2 > 1.0f) - maxf2 = 1.0f; + if (maxf2 > 1.f) + maxf2 = 1.f; return maxf2; } diff --git a/plugins/Makefile b/plugins/Makefile index 5d95dfa8..a3232e50 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -311,9 +311,12 @@ 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/Noise.cpp MINIPLUGIN_FILES += Fundamental/src/Random.cpp +MINIPLUGIN_FILES += Fundamental/src/Scope.cpp +MINIPLUGIN_FILES += Fundamental/src/VCA-1.cpp MINIPLUGIN_FILES += Fundamental/src/VCF.cpp MINIPLUGIN_FILES += Fundamental/src/VCMixer.cpp MINIPLUGIN_FILES += Fundamental/src/VCO.cpp diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 97707049..8e7306f3 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -209,13 +209,16 @@ static void initStatic__Fundamental() const StaticPluginLoader spl(p, "Fundamental"); if (spl.ok()) { + p->addModel(modelADSR); p->addModel(modelLFO); p->addModel(modelNoise); p->addModel(modelRandom); + p->addModel(modelScope); + p->addModel(modelVCA_1); p->addModel(modelVCF); p->addModel(modelVCMixer); + p->addModel(modelVCO); spl.removeModule("8vert"); - spl.removeModule("ADSR"); spl.removeModule("Delay"); spl.removeModule("LFO2"); spl.removeModule("Merge"); @@ -226,14 +229,11 @@ static void initStatic__Fundamental() spl.removeModule("Pulses"); spl.removeModule("Quantizer"); spl.removeModule("SEQ3"); - spl.removeModule("Scope"); spl.removeModule("SequentialSwitch1"); spl.removeModule("SequentialSwitch2"); spl.removeModule("Split"); spl.removeModule("Sum"); spl.removeModule("VCA"); - spl.removeModule("VCA-1"); - spl.removeModule("VCO"); spl.removeModule("VCO2"); } } diff --git a/src/CardinalMini/CardinalCommon-UI.cpp b/src/CardinalMini/CardinalCommon-UI.cpp index f118c4eb..6c3feffa 100644 --- a/src/CardinalMini/CardinalCommon-UI.cpp +++ b/src/CardinalMini/CardinalCommon-UI.cpp @@ -16,4 +16,4 @@ */ #define CARDINAL_COMMON_UI_ONLY -#include "CardinalCommon.cpp" +#include "../CardinalCommon.cpp" diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index f4faaa2e..7a6b2065 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -39,8 +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 +#define DISTRHO_UI_DEFAULT_WIDTH 1000 +#define DISTRHO_UI_DEFAULT_HEIGHT 600 #define DISTRHO_PLUGIN_IS_SYNTH 0 #define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS #define DISTRHO_PLUGIN_NUM_OUTPUTS CARDINAL_NUM_AUDIO_OUTPUTS diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index ed2f555e..00fe9edc 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -52,7 +52,7 @@ static const constexpr uint kCardinalStateBaseCount = 3; // patch, screenshot, comment -#ifndef HEADLESS +#if CARDINAL_VARIANT_MINI || !defined(HEADLESS) # include "extra/ScopedValueSetter.hpp" # include "WindowParameters.hpp" static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount + 2; // moduleInfos, windowSize @@ -163,7 +163,7 @@ class CardinalPlugin : public CardinalBasePlugin struct { String comment; String screenshot; - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) String windowSize; #endif } fState; @@ -172,7 +172,7 @@ class CardinalPlugin : public CardinalBasePlugin bool fWasBypassed; MidiEvent bypassMidiEvents[16]; - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) // real values, not VCV interpreted ones float fWindowParameters[kWindowParameterCount]; #endif @@ -191,7 +191,7 @@ class CardinalPlugin : public CardinalBasePlugin fNextExpectedFrame(0), fWasBypassed(false) { - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) fWindowParameters[kWindowParameterShowTooltips] = 1.0f; fWindowParameters[kWindowParameterCableOpacity] = 50.0f; fWindowParameters[kWindowParameterCableTension] = 75.0f; @@ -290,7 +290,7 @@ class CardinalPlugin : public CardinalBasePlugin context->patch->clear(); // do a little dance to prevent context scene deletion from saving to temp dir - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) const ScopedValueSetter svs(rack::settings::headless, true); #endif Engine_setAboutToClose(context->engine); @@ -419,6 +419,10 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol += String(index + 1); parameter.unit = "v"; parameter.hints = kParameterIsAutomatable; + #if CARDINAL_VARIANT_MINI + // TODO is hidden + // parameter.hints |= kParameterIsAutomatable; + #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 10.0f; @@ -431,7 +435,7 @@ class CardinalPlugin : public CardinalBasePlugin return; } - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) switch (index - kModuleParameters - 1) { case kWindowParameterShowTooltips: @@ -610,7 +614,11 @@ class CardinalPlugin : public CardinalBasePlugin switch (index) { case 0: + #if CARDINAL_VARIANT_MINI + state.hints = kStateIsHostWritable; + #else state.hints = kStateIsBase64Blob; + #endif #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS state.hints |= kStateIsOnlyForDSP; #endif @@ -620,11 +628,16 @@ class CardinalPlugin : public CardinalBasePlugin if (const long fileSize = std::ftell(f)) { std::fseek(f, 0, SEEK_SET); - char* const fileContent = new char[fileSize]; + char* const fileContent = new char[fileSize+1]; if (std::fread(fileContent, fileSize, 1, f) == 1) { + fileContent[fileSize] = '\0'; + #if CARDINAL_VARIANT_MINI + state.defaultValue = fileContent; + #else state.defaultValue = String::asBase64(fileContent, fileSize); + #endif } delete[] fileContent; @@ -675,7 +688,7 @@ class CardinalPlugin : public CardinalBasePlugin if (index == kModuleParameters) return context->bypassed ? 1.0f : 0.0f; - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) // window related parameters index -= kModuleParameters + 1; @@ -702,7 +715,7 @@ class CardinalPlugin : public CardinalBasePlugin return; } - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) // window related parameters index -= kModuleParameters + 1; @@ -716,7 +729,7 @@ class CardinalPlugin : public CardinalBasePlugin String getState(const char* const key) const override { - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) if (std::strcmp(key, "moduleInfos") == 0) { json_t* const rootJ = json_object(); @@ -784,9 +797,12 @@ class CardinalPlugin : public CardinalBasePlugin context->patch->cleanAutosave(); // context->history->setSaved(); + #if CARDINAL_VARIANT_MINI + #else try { data = rack::system::archiveDirectory(fAutosavePath, 1); } DISTRHO_SAFE_EXCEPTION_RETURN("getState archiveDirectory", String()); + #endif } return String::asBase64(data.data(), data.size()); @@ -797,10 +813,10 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI if (std::strcmp(key, "param") == 0) { - int64_t moduleId = 0; + longlong moduleId = 0; int paramId = 0; float paramValue = 0.f; - std::sscanf(value, "%lu:%d:%f", &moduleId, ¶mId, ¶mValue); + std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue); rack::engine::Module* const module = context->engine->getModule(moduleId); DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,); @@ -810,7 +826,7 @@ class CardinalPlugin : public CardinalBasePlugin } #endif - #ifndef HEADLESS + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) if (std::strcmp(key, "moduleInfos") == 0) { json_error_t error; @@ -869,6 +885,16 @@ class CardinalPlugin : public CardinalBasePlugin if (fAutosavePath.empty()) return; + #if CARDINAL_VARIANT_MINI + FILE* const f = std::fopen(rack::system::join(fAutosavePath, "patch.json").c_str(), "w"); + DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); + + rack::system::removeRecursively(fAutosavePath); + rack::system::createDirectories(fAutosavePath); + + std::fwrite(value, std::strlen(value)+1, 1, f); + std::fclose(f); + #else const std::vector data(d_getChunkFromBase64String(value)); DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); @@ -892,6 +918,7 @@ class CardinalPlugin : public CardinalBasePlugin rack::system::unarchiveToDirectory(data, fAutosavePath); } DISTRHO_SAFE_EXCEPTION_RETURN("setState unarchiveToDirectory",); } + #endif const ScopedContext sc(this); diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index f0596901..4f72a3ff 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -139,7 +139,7 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int { #if CARDINAL_VARIANT_MINI char paramBuf[512] = {}; - std::snprintf(paramBuf, sizeof(paramBuf), "%lu:%d:%f", moduleId, paramId, value); + std::snprintf(paramBuf, sizeof(paramBuf), "%llu:%d:%f", (ulonglong)moduleId, paramId, value); static_cast(remote->handle)->setState("param", paramBuf); #elif defined(HAVE_LIBLO) const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); @@ -159,17 +159,23 @@ void sendFullPatchToRemote(RemoteDetails* const remote) context->engine->prepareSave(); context->patch->saveAutosave(); context->patch->cleanAutosave(); - std::vector data(rack::system::archiveDirectory(context->patch->autosavePath, 1)); + + std::vector data; + using namespace rack::system; + + #if CARDINAL_VARIANT_MINI + try { + data = readFile(join(context->patch->autosavePath, "patch.json")); + } DISTRHO_SAFE_EXCEPTION_RETURN("sendFullPatchToRemote",); + + static_cast(remote->handle)->setState("patch", reinterpret_cast(data.data())); + #elif defined(HAVE_LIBLO) + try { + data = archiveDirectory(context->patch->autosavePath, 1); + } DISTRHO_SAFE_EXCEPTION_RETURN("sendFullPatchToRemote",); DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); -#if CARDINAL_VARIANT_MINI - if (char* const patch = String::asBase64(data.data(), data.size()).getAndReleaseBuffer()) - { - static_cast(remote->handle)->setState("patch", patch); - std::free(patch); - } -#elif defined(HAVE_LIBLO) const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); @@ -180,7 +186,7 @@ void sendFullPatchToRemote(RemoteDetails* const remote) } lo_address_free(addr); -#endif + #endif } void sendScreenshotToRemote(RemoteDetails*, const char* const screenshot) diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 4485d396..dbd0eb45 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -298,7 +298,7 @@ class CardinalUI : public CardinalBaseUI, rack::math::Vec lastMousePos; WindowParameters windowParameters; int rateLimitStep = 0; - #ifdef DISTRHO_OS_WASM + #if defined(DISTRHO_OS_WASM) && ! CARDINAL_VARIANT_MINI int8_t counterForFirstIdlePoint = 0; #endif #ifdef DPF_RUNTIME_TESTING @@ -345,7 +345,7 @@ class CardinalUI : public CardinalBaseUI, rack::contextSet(context); #if CARDINAL_VARIANT_MINI - remoteUtils::connectToRemote(); + DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); // create unique temporary path for this instance try { @@ -366,9 +366,17 @@ class CardinalUI : public CardinalBaseUI, } } DISTRHO_SAFE_EXCEPTION("create unique temporary path"); - const float sampleRate = getSampleRate(); + const float sampleRate = 60; // fake audio running at 60 fps rack::settings::sampleRate = sampleRate; + context->dataIns = new const float*[DISTRHO_PLUGIN_NUM_INPUTS]; + context->dataOuts = new float*[DISTRHO_PLUGIN_NUM_OUTPUTS]; + + for (uint32_t i=0; i(&context->dataIns[i]) = new float[1]; + for (uint32_t i=0; idataOuts[i] = new float[1]; + context->bufferSize = 1; context->sampleRate = sampleRate; @@ -378,7 +386,7 @@ class CardinalUI : public CardinalBaseUI, context->history = new rack::history::State; context->patch = new rack::patch::Manager; context->patch->autosavePath = fAutosavePath; - context->patch->templatePath = context->patch->factoryTemplatePath = fInitializer->templatePath; + context->patch->templatePath = context->patch->factoryTemplatePath = fInitializer->factoryTemplatePath; context->event = new rack::widget::EventState; context->scene = new rack::app::Scene; @@ -386,6 +394,7 @@ class CardinalUI : public CardinalBaseUI, context->window = new rack::window::Window; + context->patch->loadTemplate(); context->scene->rackScroll->reset(); Engine_setRemoteDetails(context->engine, remoteDetails); @@ -563,7 +572,7 @@ class CardinalUI : public CardinalBaseUI, } #endif - #ifdef DISTRHO_OS_WASM + #if defined(DISTRHO_OS_WASM) && ! CARDINAL_VARIANT_MINI if (counterForFirstIdlePoint >= 0 && ++counterForFirstIdlePoint == 30) { counterForFirstIdlePoint = -1; @@ -606,7 +615,11 @@ class CardinalUI : public CardinalBaseUI, } #if CARDINAL_VARIANT_MINI - context->engine->stepBlock(1); + { + const ScopedContext sc(this); + ++context->processCounter; + context->engine->stepBlock(1); + } #endif if (windowParameters.rateLimit != 0 && ++rateLimitStep % (windowParameters.rateLimit * 2)) @@ -702,9 +715,23 @@ class CardinalUI : public CardinalBaseUI, */ void parameterChanged(const uint32_t index, const float value) override { - // host mapped parameters + bypass - if (index <= kModuleParameters) + // host mapped parameters + if (index < kModuleParameters) + { + #if CARDINAL_VARIANT_MINI + context->parameters[index] = value; + #endif + return; + } + + // bypass + if (index == kModuleParameters) + { + #if CARDINAL_VARIANT_MINI + context->bypassed = value > 0.5f; + #endif return; + } switch (index - kModuleParameters - 1) { diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 3336da04..644ae31f 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -180,7 +180,7 @@ endif # FIXME ifeq ($(CARDINAL_VARIANT)$(CIBUILD)$(WASM),nativetruetrue) -ifneq ($(STATIC_BUILD),true) +ifneq ($(OLD_PATH),) STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm endif endif @@ -380,6 +380,7 @@ LINK_FLAGS += -sLZ4=1 ifeq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources +# LINK_FLAGS += -sEXPORTED_RUNTIME_METHODS=FS,cwrap else LINK_FLAGS += --shell-file=../emscripten/shell.html ifneq ($(STATIC_BUILD),true) diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index d1ff0d0f..c03c0eb4 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -135,6 +135,7 @@ struct FileButton : MenuButton { patchUtils::loadTemplateDialog(); })); +#if ! CARDINAL_VARIANT_MINI #ifndef DISTRHO_OS_WASM menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { patchUtils::loadDialog(); @@ -164,6 +165,7 @@ struct FileButton : MenuButton { menu->addChild(createMenuItem("Save and download uncompressed", "", []() { patchUtils::saveAsDialogUncompressed(); })); +#endif #endif menu->addChild(createMenuItem("Revert", RACK_MOD_CTRL_NAME "+" RACK_MOD_SHIFT_NAME "+O", []() { @@ -194,6 +196,7 @@ struct FileButton : MenuButton { } #endif +#if ! CARDINAL_VARIANT_MINI #ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); @@ -206,6 +209,7 @@ struct FileButton : MenuButton { patchUtils::saveAsDialogUncompressed(); })); #endif +#endif #if ! CARDINAL_VARIANT_MINI if (!demoPatches.empty()) @@ -761,9 +765,14 @@ struct MeterLabel : ui::Label { // uiLastTime = time; // } +#if CARDINAL_VARIANT_MINI + text = string::f("%.1f fps", 1.0 / frameDurationAvg); +#else double meterAverage = APP->engine->getMeterAverage(); double meterMax = APP->engine->getMeterMax(); text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100); +#endif + Label::step(); } }; @@ -795,9 +804,11 @@ struct MenuBar : widget::OpaqueWidget { viewButton->text = "View"; layout->addChild(viewButton); +#if ! CARDINAL_VARIANT_MINI EngineButton* engineButton = new EngineButton; engineButton->text = "Engine"; layout->addChild(engineButton); +#endif HelpButton* helpButton = new HelpButton; helpButton->text = "Help"; diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index c2e34faf..86b998af 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -212,7 +212,11 @@ void Scene::step() { if (remoteDetails->autoDeploy) { const int actionIndex = APP->history->actionIndex; const double time = system::getTime(); - if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) { + + if (internal->historyActionIndex == -1) { + internal->historyActionIndex = actionIndex; + internal->lastSceneChangeTime = time; + } else if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) { const std::string& name(APP->history->actions[actionIndex - 1]->name); if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") { printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str()); From db2ff3850a36bc4a6bf844f4b1fd4b976ff02e1d Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 00:36:33 +0000 Subject: [PATCH 193/451] Cleanup Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 30 +++++++++++++++++++++++++----- src/CardinalRemote.cpp | 23 ++++++++++++++++++----- src/CardinalUI.cpp | 25 ++++++------------------- src/Makefile.cardinal.mk | 4 ++++ 4 files changed, 53 insertions(+), 29 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 00fe9edc..8601767a 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -798,6 +798,24 @@ class CardinalPlugin : public CardinalBasePlugin // context->history->setSaved(); #if CARDINAL_VARIANT_MINI + FILE* const f = std::fopen(join(context->patch->autosavePath, "patch.json").c_str(), "r"); + DISTRHO_SAFE_ASSERT_RETURN(f != nullptr, String()); + + DEFER({ + std::fclose(f); + }); + + std::fseek(f, 0, SEEK_END); + const long fileSize = std::ftell(f); + DISTRHO_SAFE_ASSERT_RETURN(fileSize > 0, String()); + + std::fseek(f, 0, SEEK_SET); + char* const fileContent = static_cast(std::malloc(fileSize+1)); + + DISTRHO_SAFE_ASSERT_RETURN(std::fread(fileContent, fileSize, 1, f) == 1, String()); + fileContent[fileSize] = '\0'; + + return String(fileContent, false); #else try { data = rack::system::archiveDirectory(fAutosavePath, 1); @@ -813,7 +831,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI if (std::strcmp(key, "param") == 0) { - longlong moduleId = 0; + long long moduleId = 0; int paramId = 0; float paramValue = 0.f; std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue); @@ -886,13 +904,13 @@ class CardinalPlugin : public CardinalBasePlugin return; #if CARDINAL_VARIANT_MINI - FILE* const f = std::fopen(rack::system::join(fAutosavePath, "patch.json").c_str(), "w"); - DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); - rack::system::removeRecursively(fAutosavePath); rack::system::createDirectories(fAutosavePath); - std::fwrite(value, std::strlen(value)+1, 1, f); + FILE* const f = std::fopen(rack::system::join(fAutosavePath, "patch.json").c_str(), "w"); + DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); + + std::fwrite(value, std::strlen(value), 1, f); std::fclose(f); #else const std::vector data(d_getChunkFromBase64String(value)); @@ -924,6 +942,8 @@ class CardinalPlugin : public CardinalBasePlugin try { context->patch->loadAutosave(); + } catch(const rack::Exception& e) { + d_stderr(e.what()); } DISTRHO_SAFE_EXCEPTION_RETURN("setState loadAutosave",); // context->history->setSaved(); diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index 4f72a3ff..3c2173ca 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -139,7 +139,7 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int { #if CARDINAL_VARIANT_MINI char paramBuf[512] = {}; - std::snprintf(paramBuf, sizeof(paramBuf), "%llu:%d:%f", (ulonglong)moduleId, paramId, value); + std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value); static_cast(remote->handle)->setState("param", paramBuf); #elif defined(HAVE_LIBLO) const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); @@ -164,11 +164,24 @@ void sendFullPatchToRemote(RemoteDetails* const remote) using namespace rack::system; #if CARDINAL_VARIANT_MINI - try { - data = readFile(join(context->patch->autosavePath, "patch.json")); - } DISTRHO_SAFE_EXCEPTION_RETURN("sendFullPatchToRemote",); + FILE* const f = std::fopen(join(context->patch->autosavePath, "patch.json").c_str(), "r"); + DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); + + DEFER({ + std::fclose(f); + }); + + std::fseek(f, 0, SEEK_END); + const long fileSize = std::ftell(f); + DISTRHO_SAFE_ASSERT_RETURN(fileSize > 0,); + + std::fseek(f, 0, SEEK_SET); + char* const fileContent = new char[fileSize+1]; - static_cast(remote->handle)->setState("patch", reinterpret_cast(data.data())); + DISTRHO_SAFE_ASSERT_RETURN(std::fread(fileContent, fileSize, 1, f) == 1,); + fileContent[fileSize] = '\0'; + static_cast(remote->handle)->setState("patch", fileContent); + delete[] fileContent; #elif defined(HAVE_LIBLO) try { data = archiveDirectory(context->patch->autosavePath, 1); diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index dbd0eb45..b33ff766 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -826,34 +826,21 @@ class CardinalUI : public CardinalBaseUI, if (fAutosavePath.empty()) return; - const std::vector data(d_getChunkFromBase64String(value)); - - DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); - rack::system::removeRecursively(fAutosavePath); rack::system::createDirectories(fAutosavePath); - static constexpr const char zstdMagic[] = "\x28\xb5\x2f\xfd"; - - if (std::memcmp(data.data(), zstdMagic, sizeof(zstdMagic)) != 0) - { - FILE* const f = std::fopen(rack::system::join(fAutosavePath, "patch.json").c_str(), "w"); - DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); + FILE* const f = std::fopen(rack::system::join(fAutosavePath, "patch.json").c_str(), "w"); + DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); - std::fwrite(data.data(), data.size(), 1, f); - std::fclose(f); - } - else - { - try { - rack::system::unarchiveToDirectory(data, fAutosavePath); - } DISTRHO_SAFE_EXCEPTION_RETURN("setState unarchiveToDirectory",); - } + std::fwrite(value, std::strlen(value), 1, f); + std::fclose(f); const ScopedContext sc(this); try { context->patch->loadAutosave(); + } catch(const rack::Exception& e) { + d_stderr(e.what()); } DISTRHO_SAFE_EXCEPTION_RETURN("setState loadAutosave",); return; diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 644ae31f..42e94236 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -356,6 +356,10 @@ BUILD_CXX_FLAGS += -std=gnu++17 endif endif +ifeq ($(CARDINAL_VARIANT),mini) +BUILD_CXX_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff +endif + # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS From 12cc762790e6fc6bbac1fb899fbc6ad1524db1d6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 08:19:14 +0000 Subject: [PATCH 194/451] Fix typo Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 8601767a..71efdebd 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -798,7 +798,7 @@ class CardinalPlugin : public CardinalBasePlugin // context->history->setSaved(); #if CARDINAL_VARIANT_MINI - FILE* const f = std::fopen(join(context->patch->autosavePath, "patch.json").c_str(), "r"); + FILE* const f = std::fopen(rack::system::join(context->patch->autosavePath, "patch.json").c_str(), "r"); DISTRHO_SAFE_ASSERT_RETURN(f != nullptr, String()); DEFER({ From 0d68867aba1c061bd852a5f2252a903d6fa1d98e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 12:57:23 +0000 Subject: [PATCH 195/451] test build without CardinalMini Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- src/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fa7777b..088f85c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -800,7 +800,7 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C CardinalMini modgui + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMini modgui - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | diff --git a/src/Makefile b/src/Makefile index 7d73a0f7..ab2c0bba 100644 --- a/src/Makefile +++ b/src/Makefile @@ -240,13 +240,13 @@ all: $(TARGETS) ifeq ($(MOD_BUILD),true) $(MAKE) -C Cardinal lv2 $(MAKE) -C CardinalFX lv2 - $(MAKE) -C CardinalMini lv2 + #$(MAKE) -C CardinalMini lv2 else ifeq ($(WASM),true) $(MAKE) -C CardinalNative else $(MAKE) -C Cardinal ifneq ($(NOPLUGINS),true) - $(MAKE) -C CardinalMini + #$(MAKE) -C CardinalMini endif $(MAKE) -C CardinalNative $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) From 5b7e5336c6b6ad3782cec85b95aa2c615eeee14e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 14:03:36 +0000 Subject: [PATCH 196/451] Fix LTO Signed-off-by: falkTX --- plugins/Cardinal/src/plugincontext.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Cardinal/src/plugincontext.hpp b/plugins/Cardinal/src/plugincontext.hpp index 935a0072..c8c9208c 100644 --- a/plugins/Cardinal/src/plugincontext.hpp +++ b/plugins/Cardinal/src/plugincontext.hpp @@ -31,7 +31,9 @@ #ifndef HEADLESS START_NAMESPACE_DGL -class NanoTopLevelWidget; +class TopLevelWidget; +template class NanoBaseWidget; +typedef NanoBaseWidget NanoTopLevelWidget; END_NAMESPACE_DGL #endif From fec9aef9390b64fcce0914499194eb7cd803dbe1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 14:49:50 +0000 Subject: [PATCH 197/451] Build fixes Signed-off-by: falkTX --- plugins/Cardinal/src/plugincontext.hpp | 10 +--------- plugins/Makefile | 2 +- plugins/plugins-mini.cpp | 5 ++++- src/CardinalPlugin.cpp | 7 +++++++ src/CardinalRemote/Makefile | 2 ++ src/CardinalRemote/RemoteUI.cpp | 18 ------------------ src/CardinalRemote/RemoteUI.hpp | 9 +++------ src/Makefile | 4 ++-- src/PluginContext.hpp | 25 ++++++++++++++----------- src/override/MenuBar.cpp | 6 +----- src/override/Scene.cpp | 5 +---- 11 files changed, 36 insertions(+), 57 deletions(-) diff --git a/plugins/Cardinal/src/plugincontext.hpp b/plugins/Cardinal/src/plugincontext.hpp index c8c9208c..b88ce0d3 100644 --- a/plugins/Cardinal/src/plugincontext.hpp +++ b/plugins/Cardinal/src/plugincontext.hpp @@ -20,22 +20,16 @@ #include "plugin.hpp" #include "DistrhoUtils.hpp" -#ifndef HEADLESS -# include "../dgl/Base.hpp" -#else -# include "extra/LeakDetector.hpp" -#endif +#include "../dgl/Base.hpp" // ----------------------------------------------------------------------------------------------------------- // from PluginContext.hpp -#ifndef HEADLESS START_NAMESPACE_DGL class TopLevelWidget; template class NanoBaseWidget; typedef NanoBaseWidget NanoTopLevelWidget; END_NAMESPACE_DGL -#endif START_NAMESPACE_DISTRHO @@ -76,10 +70,8 @@ struct CardinalPluginContext : rack::Context { const MidiEvent* midiEvents; uint32_t midiEventCount; Plugin* const plugin; -#ifndef HEADLESS DGL_NAMESPACE::NanoTopLevelWidget* tlw; UI* ui; -#endif CardinalPluginContext(Plugin* const p); void writeMidiMessage(const rack::midi::Message& message, uint8_t channel); #ifndef HEADLESS diff --git a/plugins/Makefile b/plugins/Makefile index a3232e50..3f6cdcdc 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -301,7 +301,7 @@ endif ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) PLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp -MINIPLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp +# MINIPLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp BASE_FLAGS += -DHAVE_FFTW3F endif diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 8e7306f3..fbcc4c15 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -171,15 +171,18 @@ static void initStatic__Cardinal() p->addModel(modelHostParametersMap); p->addModel(modelHostTime); p->addModel(modelTextEditor); + /* TODO #ifdef HAVE_FFTW3F p->addModel(modelAudioToCVPitch); #else + */ spl.removeModule("AudioToCVPitch"); + /* #endif + */ spl.removeModule("AudioFile"); spl.removeModule("Blank"); spl.removeModule("Carla"); - spl.removeModule("ExpanderInputMIDI"); spl.removeModule("ExpanderOutputMIDI"); spl.removeModule("HostAudio8"); spl.removeModule("Ildaeil"); diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 71efdebd..37cf8470 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #ifdef NDEBUG @@ -64,6 +65,11 @@ static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount; extern const std::string CARDINAL_VERSION; namespace rack { +#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +namespace app { +rack::widget::Widget* createMenuBar() { return new rack::widget::Widget; } +} +#endif namespace engine { void Engine_setAboutToClose(Engine*); } @@ -80,6 +86,7 @@ bool d_isDiffHigherThanLimit(const T& v1, const T& v2, const T& limit) #if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS const char* UI::getBundlePath() const noexcept { return nullptr; } +void UI::setState(const char*, const char*) {} #endif // ----------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalRemote/Makefile b/src/CardinalRemote/Makefile index 61dadd04..3a4ee1f4 100644 --- a/src/CardinalRemote/Makefile +++ b/src/CardinalRemote/Makefile @@ -330,8 +330,10 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' FILES = main.cpp FILES += RemoteUI.cpp FILES += CardinalCommon.cpp +FILES += CardinalRemote.cpp FILES += common.cpp FILES += glfw.cpp +FILES += MenuBar.cpp FILES += Window.cpp ifeq ($(WINDOWS),true) diff --git a/src/CardinalRemote/RemoteUI.cpp b/src/CardinalRemote/RemoteUI.cpp index 95555657..41362307 100644 --- a/src/CardinalRemote/RemoteUI.cpp +++ b/src/CardinalRemote/RemoteUI.cpp @@ -41,15 +41,6 @@ CardinalRemoteUI::CardinalRemoteUI(Window& window, const std::string& templatePa rack::window::WindowSetPluginRemote(context->window, this); - if (rack::widget::Widget* const menuBar = context->scene->menuBar) - { - context->scene->removeChild(menuBar); - delete menuBar; - } - - context->scene->menuBar = rack::app::createMenuBar(true); - context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll); - // hide "Browse VCV Library" button rack::widget::Widget* const browser = context->scene->browser->children.back(); rack::widget::Widget* const headerLayout = browser->children.front(); @@ -93,15 +84,6 @@ CardinalRemoteUI::~CardinalRemoteUI() context->nativeWindowId = 0; - if (rack::widget::Widget* const menuBar = context->scene->menuBar) - { - context->scene->removeChild(menuBar); - delete menuBar; - } - - context->scene->menuBar = rack::app::createMenuBar(true); - context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll); - rack::window::WindowSetPluginRemote(context->window, nullptr); } diff --git a/src/CardinalRemote/RemoteUI.hpp b/src/CardinalRemote/RemoteUI.hpp index 402c48fd..15b1c902 100644 --- a/src/CardinalRemote/RemoteUI.hpp +++ b/src/CardinalRemote/RemoteUI.hpp @@ -26,13 +26,10 @@ // -------------------------------------------------------------------------------------------------------------------- namespace rack { -namespace app { - widget::Widget* createMenuBar(bool isStandalone); -} namespace window { - void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw); - void WindowSetMods(Window* window, int mods); - void WindowSetInternalSize(rack::window::Window* window, math::Vec size); +void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw); +void WindowSetMods(Window* window, int mods); +void WindowSetInternalSize(rack::window::Window* window, math::Vec size); } } diff --git a/src/Makefile b/src/Makefile index ab2c0bba..7d73a0f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -240,13 +240,13 @@ all: $(TARGETS) ifeq ($(MOD_BUILD),true) $(MAKE) -C Cardinal lv2 $(MAKE) -C CardinalFX lv2 - #$(MAKE) -C CardinalMini lv2 + $(MAKE) -C CardinalMini lv2 else ifeq ($(WASM),true) $(MAKE) -C CardinalNative else $(MAKE) -C Cardinal ifneq ($(NOPLUGINS),true) - #$(MAKE) -C CardinalMini + $(MAKE) -C CardinalMini endif $(MAKE) -C CardinalNative $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 264934fe..43c22d8c 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -30,6 +30,13 @@ #ifndef HEADLESS # include "DistrhoUI.hpp" +#else +# include "Base.hpp" +START_NAMESPACE_DGL +class TopLevelWidget; +template class NanoBaseWidget; +typedef NanoBaseWidget NanoTopLevelWidget; +END_NAMESPACE_DGL #endif START_NAMESPACE_DISTRHO @@ -64,10 +71,8 @@ struct CardinalPluginContext : rack::Context { const MidiEvent* midiEvents; uint32_t midiEventCount; Plugin* const plugin; -#ifndef HEADLESS NanoTopLevelWidget* tlw; UI* ui; -#endif CardinalPluginContext(Plugin* const p) : bufferSize(p != nullptr ? p->getBufferSize() : 0), @@ -107,21 +112,19 @@ struct CardinalPluginContext : rack::Context { 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)); } void writeMidiMessage(const rack::midi::Message& message, uint8_t channel); -#ifndef HEADLESS + #ifndef HEADLESS bool addIdleCallback(IdleCallback* cb) const; void removeIdleCallback(IdleCallback* cb) const; -#endif + #endif }; // ----------------------------------------------------------------------------------------------------------- @@ -137,9 +140,9 @@ class CardinalBasePlugin : public Plugin { context(new CardinalPluginContext(this)) {} ~CardinalBasePlugin() override {} -#ifndef HEADLESS + #ifndef HEADLESS friend class CardinalUI; -#endif + #endif }; #ifndef HEADLESS diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index c03c0eb4..82fd24ba 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -844,11 +844,7 @@ struct MenuBar : widget::OpaqueWidget { widget::Widget* createMenuBar() { - return new widget::Widget; -} - -widget::Widget* createMenuBar(const bool isStandalone) { - menuBar::MenuBar* menuBar = new menuBar::MenuBar(isStandalone); + menuBar::MenuBar* menuBar = new menuBar::MenuBar(isStandalone()); return menuBar; } diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 86b998af..561364bc 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -50,9 +50,6 @@ namespace rack { namespace app { -widget::Widget* createMenuBar(bool isStandalone); - - struct ResizeHandle : widget::OpaqueWidget { math::Vec size; @@ -134,7 +131,7 @@ Scene::Scene() { rack = rackScroll->rackWidget; - menuBar = createMenuBar(isStandalone()); + menuBar = createMenuBar(); addChild(menuBar); browser = browserCreate(); From c883a9db68ef2d862daec37ce6738b86b899564c Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 15:00:22 +0000 Subject: [PATCH 198/451] Forgot to comment out 1 mini module Signed-off-by: falkTX --- plugins/plugins-mini.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index fbcc4c15..a34dfa4d 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -183,6 +183,7 @@ static void initStatic__Cardinal() spl.removeModule("AudioFile"); spl.removeModule("Blank"); spl.removeModule("Carla"); + spl.removeModule("ExpanderInputMIDI"); spl.removeModule("ExpanderOutputMIDI"); spl.removeModule("HostAudio8"); spl.removeModule("Ildaeil"); From daf8d467f7e68db54439264660a42925b623d7ac Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 15:52:52 +0000 Subject: [PATCH 199/451] Fix mini variant param message for non-english locales Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 6 +++++- src/CardinalRemote.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 37cf8470..905cc612 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -44,6 +44,7 @@ #include "DistrhoPluginUtils.hpp" #include "PluginContext.hpp" #include "extra/Base64.hpp" +#include "extra/ScopedSafeLocale.hpp" #ifdef DISTRHO_OS_WASM # include @@ -841,7 +842,10 @@ class CardinalPlugin : public CardinalBasePlugin long long moduleId = 0; int paramId = 0; float paramValue = 0.f; - std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue); + { + const ScopedSafeLocale cssl; + std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue); + } rack::engine::Module* const module = context->engine->getModule(moduleId); DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,); diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index 3c2173ca..c1313c27 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -26,6 +26,7 @@ #include "CardinalRemote.hpp" #include "PluginContext.hpp" #include "extra/Base64.hpp" +#include "extra/ScopedSafeLocale.hpp" #if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI # undef HAVE_LIBLO @@ -139,7 +140,10 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int { #if CARDINAL_VARIANT_MINI char paramBuf[512] = {}; - std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value); + { + const ScopedSafeLocale cssl; + std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value); + } static_cast(remote->handle)->setState("param", paramBuf); #elif defined(HAVE_LIBLO) const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); From ebaa70b05a25e87c950c0cd49b4009970e7edee0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 16:02:28 +0000 Subject: [PATCH 200/451] A few more build fixes Signed-off-by: falkTX --- plugins/Makefile | 2 ++ src/PluginContext.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 3f6cdcdc..d61043f8 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -610,6 +610,8 @@ MINIPLUGIN_FILES += BogaudioModules/src/dsp/noise.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/oscillator.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/signal.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/table.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/filters/experiments.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/filters/filter.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/filters/multimode.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/filters/resample.cpp diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 43c22d8c..1217c690 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -53,6 +53,8 @@ enum CardinalVariant { kCardinalVariantSynth, }; +class UI; + // ----------------------------------------------------------------------------------------------------------- struct CardinalPluginContext : rack::Context { From 476bae222f28277e24cfb89f30129563beae6d52 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 16:02:53 +0000 Subject: [PATCH 201/451] Reduce custom code Signed-off-by: falkTX --- src/extra/ScopedLock.hpp | 238 ---------------------------- src/extra/SharedResourcePointer.hpp | 14 +- src/extra/SpinLock.hpp | 110 ------------- 3 files changed, 7 insertions(+), 355 deletions(-) delete mode 100644 src/extra/ScopedLock.hpp delete mode 100644 src/extra/SpinLock.hpp diff --git a/src/extra/ScopedLock.hpp b/src/extra/ScopedLock.hpp deleted file mode 100644 index 419e60a9..00000000 --- a/src/extra/ScopedLock.hpp +++ /dev/null @@ -1,238 +0,0 @@ -/* - ============================================================================== - - This file is part of the Water library. - Copyright (c) 2016 ROLI Ltd. - Copyright (C) 2017 Filipe Coelho - - Permission is granted to use this software under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license/ - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD - TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, - OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. - - ============================================================================== -*/ - -#ifndef WATER_SCOPEDLOCK_HPP_INCLUDED -#define WATER_SCOPEDLOCK_HPP_INCLUDED - -#include "DistrhoUtils.hpp" - -START_NAMESPACE_DISTRHO - -//============================================================================== -/** - Automatically locks and unlocks a mutex object. - - Use one of these as a local variable to provide RAII-based locking of a mutex. - - The templated class could be a CriticalSection, SpinLock, or anything else that - provides enter() and exit() methods. - - e.g. @code - CriticalSection myCriticalSection; - - for (;;) - { - const GenericScopedLock myScopedLock (myCriticalSection); - // myCriticalSection is now locked - - ...do some stuff... - - // myCriticalSection gets unlocked here. - } - @endcode - - @see GenericScopedUnlock, CriticalSection, SpinLock, ScopedLock, ScopedUnlock -*/ -template -class GenericScopedLock -{ -public: - //============================================================================== - /** Creates a GenericScopedLock. - - As soon as it is created, this will acquire the lock, and when the GenericScopedLock - object is deleted, the lock will be released. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline explicit GenericScopedLock (const LockType& lock) noexcept : lock_ (lock) { lock.enter(); } - - /** Destructor. - The lock will be released when the destructor is called. - Make sure this object is created and deleted by the same thread, otherwise there are - no guarantees what will happen! - */ - inline ~GenericScopedLock() noexcept { lock_.exit(); } - -private: - //============================================================================== - const LockType& lock_; - - DISTRHO_DECLARE_NON_COPYABLE (GenericScopedLock) -}; - - -//============================================================================== -/** - Automatically unlocks and re-locks a mutex object. - - This is the reverse of a GenericScopedLock object - instead of locking the mutex - for the lifetime of this object, it unlocks it. - - Make sure you don't try to unlock mutexes that aren't actually locked! - - e.g. @code - - CriticalSection myCriticalSection; - - for (;;) - { - const GenericScopedLock myScopedLock (myCriticalSection); - // myCriticalSection is now locked - - ... do some stuff with it locked .. - - while (xyz) - { - ... do some stuff with it locked .. - - const GenericScopedUnlock unlocker (myCriticalSection); - - // myCriticalSection is now unlocked for the remainder of this block, - // and re-locked at the end. - - ...do some stuff with it unlocked ... - } - - // myCriticalSection gets unlocked here. - } - @endcode - - @see GenericScopedLock, CriticalSection, ScopedLock, ScopedUnlock -*/ -template -class GenericScopedUnlock -{ -public: - //============================================================================== - /** Creates a GenericScopedUnlock. - - As soon as it is created, this will unlock the CriticalSection, and - when the ScopedLock object is deleted, the CriticalSection will - be re-locked. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline explicit GenericScopedUnlock (const LockType& lock) noexcept : lock_ (lock) { lock.exit(); } - - /** Destructor. - - The CriticalSection will be unlocked when the destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~GenericScopedUnlock() noexcept { lock_.enter(); } - - -private: - //============================================================================== - const LockType& lock_; - - DISTRHO_DECLARE_NON_COPYABLE (GenericScopedUnlock) -}; - - -//============================================================================== -/** - Automatically locks and unlocks a mutex object. - - Use one of these as a local variable to provide RAII-based locking of a mutex. - - The templated class could be a CriticalSection, SpinLock, or anything else that - provides enter() and exit() methods. - - e.g. @code - - CriticalSection myCriticalSection; - - for (;;) - { - const GenericScopedTryLock myScopedTryLock (myCriticalSection); - - // Unlike using a ScopedLock, this may fail to actually get the lock, so you - // should test this with the isLocked() method before doing your thread-unsafe - // action.. - if (myScopedTryLock.isLocked()) - { - ...do some stuff... - } - else - { - ..our attempt at locking failed because another thread had already locked it.. - } - - // myCriticalSection gets unlocked here (if it was locked) - } - @endcode - - @see CriticalSection::tryEnter, GenericScopedLock, GenericScopedUnlock -*/ -template -class GenericScopedTryLock -{ -public: - //============================================================================== - /** Creates a GenericScopedTryLock. - - As soon as it is created, this will attempt to acquire the lock, and when the - GenericScopedTryLock is deleted, the lock will be released (if the lock was - successfully acquired). - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline explicit GenericScopedTryLock (const LockType& lock) noexcept - : lock_ (lock), lockWasSuccessful (lock.tryEnter()) {} - - /** Destructor. - - The mutex will be unlocked (if it had been successfully locked) when the - destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~GenericScopedTryLock() noexcept { if (lockWasSuccessful) lock_.exit(); } - - /** Returns true if the mutex was successfully locked. */ - bool isLocked() const noexcept { return lockWasSuccessful; } - -private: - //============================================================================== - const LockType& lock_; - const bool lockWasSuccessful; - - DISTRHO_DECLARE_NON_COPYABLE (GenericScopedTryLock) -}; - -END_NAMESPACE_DISTRHO - -#endif // WATER_SCOPEDLOCK_HPP_INCLUDED diff --git a/src/extra/SharedResourcePointer.hpp b/src/extra/SharedResourcePointer.hpp index 4688ade3..fdfc4ca2 100644 --- a/src/extra/SharedResourcePointer.hpp +++ b/src/extra/SharedResourcePointer.hpp @@ -3,7 +3,7 @@ This file is part of the Water library. Copyright (c) 2016 ROLI Ltd. - Copyright (C) 2017-2019 Filipe Coelho + Copyright (C) 2017-2022 Filipe Coelho Permission is granted to use this software under the terms of the ISC license http://www.isc.org/downloads/software-support-policy/isc-license/ @@ -27,7 +27,7 @@ #define WATER_SHAREDRESOURCEPOINTER_HPP_INCLUDED #include "ReferenceCountedObject.hpp" -#include "SpinLock.hpp" +#include "extra/Mutex.hpp" #include "extra/ScopedPointer.hpp" START_NAMESPACE_DISTRHO @@ -127,7 +127,7 @@ class SharedResourcePointer ~SharedResourcePointer() { SharedObjectHolder& holder = getSharedObjectHolder(); - const SpinLock::ScopedLockType sl (holder.lock); + const MutexLocker cml (holder.lock); if (--(holder.refCount) == 0) holder.sharedInstance = nullptr; @@ -150,7 +150,7 @@ class SharedResourcePointer private: struct SharedObjectHolder : public ReferenceCountedObject { - SpinLock lock; + Mutex lock; ScopedPointer sharedInstance; int refCount; }; @@ -166,7 +166,7 @@ class SharedResourcePointer void initialise() { SharedObjectHolder& holder = getSharedObjectHolder(); - const SpinLock::ScopedLockType sl (holder.lock); + const MutexLocker cml (holder.lock); if (++(holder.refCount) == 1) holder.sharedInstance = new SharedObjectType(); @@ -178,7 +178,7 @@ class SharedResourcePointer void initialise_variant(const T* const variant) { SharedObjectHolder& holder = getSharedObjectHolder(); - const SpinLock::ScopedLockType sl (holder.lock); + const MutexLocker cml (holder.lock); if (++(holder.refCount) == 1) holder.sharedInstance = new SharedObjectType(variant); @@ -190,7 +190,7 @@ class SharedResourcePointer void initialise_variant2(const T1* const v1, const T2* const v2) { SharedObjectHolder& holder = getSharedObjectHolder(); - const SpinLock::ScopedLockType sl (holder.lock); + const MutexLocker cml (holder.lock); if (++(holder.refCount) == 1) holder.sharedInstance = new SharedObjectType(v1, v2); diff --git a/src/extra/SpinLock.hpp b/src/extra/SpinLock.hpp deleted file mode 100644 index 210f1dd1..00000000 --- a/src/extra/SpinLock.hpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - ============================================================================== - - This file is part of the Water library. - Copyright (c) 2016 ROLI Ltd. - Copyright (C) 2017 Filipe Coelho - - Permission is granted to use this software under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license/ - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD - TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, - OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. - - ============================================================================== -*/ - -#ifndef WATER_SPINLOCK_HPP_INCLUDED -#define WATER_SPINLOCK_HPP_INCLUDED - -#include "Atomic.hpp" -#include "ScopedLock.hpp" - -START_NAMESPACE_DISTRHO - -//============================================================================== -/** - A simple spin-lock class that can be used as a simple, low-overhead mutex for - uncontended situations. - - Note that unlike a CriticalSection, this type of lock is not re-entrant, and may - be less efficient when used it a highly contended situation, but it's very small and - requires almost no initialisation. - It's most appropriate for simple situations where you're only going to hold the - lock for a very brief time. - - @see CriticalSection -*/ -class SpinLock -{ -public: - inline SpinLock() noexcept : lock() {} - inline ~SpinLock() noexcept {} - - /** Acquires the lock. - This will block until the lock has been successfully acquired by this thread. - Note that a SpinLock is NOT re-entrant, and is not smart enough to know whether the - caller thread already has the lock - so if a thread tries to acquire a lock that it - already holds, this method will never return! - - It's strongly recommended that you never call this method directly - instead use the - ScopedLockType class to manage the locking using an RAII pattern instead. - */ - void enter() const noexcept - { - if (! tryEnter()) - { - for (int i = 20; --i >= 0;) - if (tryEnter()) - return; - - while (! tryEnter()) - { -#ifdef DISTRHO_OS_WINDOWS - Sleep (0); -#else - sched_yield(); -#endif - } - } - } - - /** Attempts to acquire the lock, returning true if this was successful. */ - inline bool tryEnter() const noexcept - { - return lock.compareAndSetBool (1, 0); - } - - /** Releases the lock. */ - inline void exit() const noexcept - { - DISTRHO_SAFE_ASSERT_RETURN (lock.get() == 1,); - lock = 0; - } - - //============================================================================== - /** Provides the type of scoped lock to use for locking a SpinLock. */ - typedef GenericScopedLock ScopedLockType; - - /** Provides the type of scoped unlocker to use with a SpinLock. */ - typedef GenericScopedUnlock ScopedUnlockType; - -private: - //============================================================================== - mutable Atomic lock; - - DISTRHO_DECLARE_NON_COPYABLE (SpinLock) -}; - -END_NAMESPACE_DISTRHO - -#endif // WATER_SPINLOCK_HPP_INCLUDED From 4ab933a0733785095654b6c212dc2d1add19a583 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 16:06:52 +0000 Subject: [PATCH 202/451] Regen patches Signed-off-by: falkTX --- src/override/diffs/Engine.cpp.diff | 133 +++-- src/override/diffs/MenuBar.cpp.diff | 122 +++-- src/override/diffs/Model.cpp.diff | 4 +- src/override/diffs/ModuleWidget.cpp.diff | 4 +- src/override/diffs/OpenGlWidget.cpp.diff | 4 +- src/override/diffs/Scene.cpp.diff | 188 ++----- src/override/diffs/Window.cpp.diff | 628 ++++++++++++++--------- src/override/diffs/blendish.c.diff | 4 +- src/override/diffs/common.cpp.diff | 23 +- src/override/diffs/context.cpp.diff | 4 +- src/override/diffs/minblep.cpp.diff | 4 +- src/override/diffs/plugin.cpp.diff | 4 +- 12 files changed, 604 insertions(+), 518 deletions(-) diff --git a/src/override/diffs/Engine.cpp.diff b/src/override/diffs/Engine.cpp.diff index 89c13e40..b3609d47 100644 --- a/src/override/diffs/Engine.cpp.diff +++ b/src/override/diffs/Engine.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/engine/Engine.cpp 2022-09-21 20:25:53.592040301 +0100 -+++ Engine.cpp 2022-11-29 19:49:19.196926572 +0000 +--- ../Rack/src/engine/Engine.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ Engine.cpp 2022-12-29 16:15:36.061769776 +0000 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin @@ -31,7 +31,7 @@ #include #include #include -@@ -6,183 +33,38 @@ +@@ -6,183 +33,39 @@ #include #include #include @@ -98,6 +98,7 @@ - }); - } -}; ++#include "../CardinalRemote.hpp" +#include "DistrhoUtils.hpp" @@ -227,7 +228,7 @@ // moduleId std::map modulesCache; -@@ -198,7 +80,9 @@ +@@ -198,7 +81,9 @@ int64_t blockFrame = 0; double blockTime = 0.0; int blockFrames = 0; @@ -237,7 +238,7 @@ // Meter int meterCount = 0; double meterTotal = 0.0; -@@ -206,6 +90,7 @@ +@@ -206,33 +91,21 @@ double meterLastTime = -INFINITY; double meterLastAverage = 0.0; double meterLastMax = 0.0; @@ -245,7 +246,14 @@ // Parameter smoothing Module* smoothModule = NULL; -@@ -217,22 +102,6 @@ + int smoothParamId = 0; + float smoothValue = 0.f; + ++ // Remote control ++ remoteUtils::RemoteDetails* remoteDetails = nullptr; ++ + /** Mutex that guards the Engine state, such as settings, Modules, and Cables. + Writers lock when mutating the engine's state or stepping the block. Readers lock when using the engine's state. */ SharedMutex mutex; @@ -268,7 +276,7 @@ }; -@@ -260,76 +129,11 @@ +@@ -260,76 +133,11 @@ } @@ -346,7 +354,7 @@ // Copy all voltages from output to input for (int c = 0; c < channels; c++) { float v = output->voltages[c]; -@@ -346,6 +150,53 @@ +@@ -346,6 +154,53 @@ } @@ -400,7 +408,28 @@ /** Steps a single frame */ static void Engine_stepFrame(Engine* that) { -@@ -372,13 +223,8 @@ +@@ -358,10 +213,16 @@ + float smoothValue = internal->smoothValue; + Param* smoothParam = &smoothModule->params[smoothParamId]; + float value = smoothParam->value; +- // Use decay rate of roughly 1 graphics frame +- const float smoothLambda = 60.f; +- float newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime; +- if (value == newValue) { ++ float newValue; ++ if (internal->remoteDetails != nullptr) { ++ newValue = value; ++ sendParamChangeToRemote(internal->remoteDetails, smoothModule->id, smoothParamId, value); ++ } else { ++ // Use decay rate of roughly 1 graphics frame ++ const float smoothLambda = 60.f; ++ newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime; ++ } ++ if (d_isEqual(value, newValue)) { + // Snap to actual smooth value if the value doesn't change enough (due to the granularity of floats) + smoothParam->setValue(smoothValue); + internal->smoothModule = NULL; +@@ -372,13 +233,8 @@ } } @@ -415,7 +444,7 @@ if (module->leftExpander.messageFlipRequested) { std::swap(module->leftExpander.producerMessage, module->leftExpander.consumerMessage); module->leftExpander.messageFlipRequested = false; -@@ -389,13 +235,32 @@ +@@ -389,13 +245,32 @@ } } @@ -454,7 +483,7 @@ } -@@ -414,35 +279,119 @@ +@@ -414,35 +289,119 @@ } @@ -585,7 +614,7 @@ } -@@ -460,37 +409,23 @@ +@@ -460,37 +419,23 @@ Engine::Engine() { internal = new Internal; @@ -631,7 +660,7 @@ delete internal; } -@@ -519,18 +454,22 @@ +@@ -519,18 +464,22 @@ removeModule_NoLock(module); delete module; } @@ -657,7 +686,7 @@ random::init(); internal->blockFrame = internal->frame; -@@ -543,18 +482,14 @@ +@@ -543,18 +492,14 @@ Engine_updateExpander_NoLock(this, module, true); } @@ -677,7 +706,7 @@ // Stop timer double endTime = system::getTime(); double meter = (endTime - startTime) / (frames * internal->sampleTime); -@@ -572,47 +507,20 @@ +@@ -572,47 +517,20 @@ internal->meterTotal = 0.0; internal->meterMax = 0.0; } @@ -727,7 +756,7 @@ } -@@ -635,20 +543,13 @@ +@@ -635,20 +553,13 @@ for (Module* module : internal->modules) { module->onSampleRateChange(e); } @@ -751,7 +780,7 @@ } -@@ -658,7 +559,6 @@ +@@ -658,7 +569,6 @@ void Engine::yieldWorkers() { @@ -759,7 +788,7 @@ } -@@ -698,17 +598,25 @@ +@@ -698,17 +608,25 @@ double Engine::getMeterAverage() { @@ -786,7 +815,7 @@ } -@@ -718,8 +626,12 @@ +@@ -718,8 +636,12 @@ for (Module* m : internal->modules) { if (i >= len) break; @@ -801,7 +830,7 @@ } return i; } -@@ -728,27 +640,43 @@ +@@ -728,27 +650,43 @@ std::vector Engine::getModuleIds() { SharedLock lock(internal->mutex); std::vector moduleIds; @@ -849,7 +878,7 @@ internal->modulesCache[module->id] = module; // Dispatch AddEvent Module::AddEvent eAdd; -@@ -763,6 +691,9 @@ +@@ -763,6 +701,9 @@ if (paramHandle->moduleId == module->id) paramHandle->module = module; } @@ -859,7 +888,7 @@ } -@@ -772,11 +703,11 @@ +@@ -772,11 +713,11 @@ } @@ -876,7 +905,7 @@ // Dispatch RemoveEvent Module::RemoveEvent eRemove; module->onRemove(eRemove); -@@ -785,18 +716,14 @@ +@@ -785,18 +726,14 @@ if (paramHandle->moduleId == module->id) paramHandle->module = NULL; } @@ -897,7 +926,7 @@ } // Update expanders of other modules for (Module* m : internal->modules) { -@@ -809,14 +736,31 @@ +@@ -809,14 +746,31 @@ m->rightExpander.module = NULL; } } @@ -932,7 +961,7 @@ } -@@ -824,7 +768,8 @@ +@@ -824,7 +778,8 @@ SharedLock lock(internal->mutex); // TODO Performance could be improved by searching modulesCache, but more testing would be needed to make sure it's always valid. auto it = std::find(internal->modules.begin(), internal->modules.end(), module); @@ -942,7 +971,7 @@ } -@@ -844,7 +789,7 @@ +@@ -844,7 +799,7 @@ void Engine::resetModule(Module* module) { std::lock_guard lock(internal->mutex); @@ -951,7 +980,7 @@ Module::ResetEvent eReset; module->onReset(eReset); -@@ -853,7 +798,7 @@ +@@ -853,7 +808,7 @@ void Engine::randomizeModule(Module* module) { std::lock_guard lock(internal->mutex); @@ -960,7 +989,7 @@ Module::RandomizeEvent eRandomize; module->onRandomize(eRandomize); -@@ -861,7 +806,7 @@ +@@ -861,7 +816,7 @@ void Engine::bypassModule(Module* module, bool bypassed) { @@ -969,7 +998,7 @@ if (module->isBypassed() == bypassed) return; -@@ -907,11 +852,17 @@ +@@ -907,11 +862,17 @@ void Engine::prepareSave() { @@ -987,7 +1016,7 @@ } -@@ -946,16 +897,16 @@ +@@ -946,16 +907,16 @@ void Engine::addCable(Cable* cable) { std::lock_guard lock(internal->mutex); @@ -1009,7 +1038,7 @@ // Get connected status of output, to decide whether we need to call a PortChangeEvent. // It's best to not trust `cable->outputModule->outputs[cable->outputId]->isConnected()` if (cable2->outputModule == cable->outputModule && cable2->outputId == cable->outputId) -@@ -969,6 +920,8 @@ +@@ -969,6 +930,8 @@ // Add the cable internal->cables.push_back(cable); internal->cablesCache[cable->id] = cable; @@ -1018,7 +1047,7 @@ Engine_updateConnected(this); // Dispatch input port event { -@@ -996,10 +949,12 @@ +@@ -996,10 +959,12 @@ void Engine::removeCable_NoLock(Cable* cable) { @@ -1033,7 +1062,17 @@ // Remove the cable internal->cablesCache.erase(cable->id); internal->cables.erase(it); -@@ -1085,11 +1040,11 @@ +@@ -1053,6 +1018,9 @@ + internal->smoothModule = NULL; + internal->smoothParamId = 0; + } ++ if (internal->remoteDetails != nullptr) { ++ sendParamChangeToRemote(internal->remoteDetails, module->id, paramId, value); ++ } + module->params[paramId].value = value; + } + +@@ -1085,11 +1053,11 @@ std::lock_guard lock(internal->mutex); // New ParamHandles must be blank. // This means we don't have to refresh the cache. @@ -1047,7 +1086,7 @@ // Add it internal->paramHandles.insert(paramHandle); -@@ -1106,7 +1061,7 @@ +@@ -1106,7 +1074,7 @@ void Engine::removeParamHandle_NoLock(ParamHandle* paramHandle) { // Check that the ParamHandle is already added auto it = internal->paramHandles.find(paramHandle); @@ -1056,7 +1095,7 @@ // Remove it paramHandle->module = NULL; -@@ -1143,7 +1098,7 @@ +@@ -1143,7 +1111,7 @@ void Engine::updateParamHandle_NoLock(ParamHandle* paramHandle, int64_t moduleId, int paramId, bool overwrite) { // Check that it exists auto it = internal->paramHandles.find(paramHandle); @@ -1065,7 +1104,7 @@ // Set IDs paramHandle->moduleId = moduleId; -@@ -1187,6 +1142,10 @@ +@@ -1187,6 +1155,10 @@ json_t* moduleJ = module->toJson(); json_array_append_new(modulesJ, moduleJ); } @@ -1076,7 +1115,7 @@ json_object_set_new(rootJ, "modules", modulesJ); // cables -@@ -1197,11 +1156,6 @@ +@@ -1197,11 +1169,6 @@ } json_object_set_new(rootJ, "cables", cablesJ); @@ -1088,7 +1127,7 @@ return rootJ; } -@@ -1225,14 +1179,20 @@ +@@ -1225,14 +1192,20 @@ } catch (Exception& e) { WARN("Cannot load model: %s", e.what()); @@ -1113,7 +1152,7 @@ try { // This doesn't need a lock because the Module is not added to the Engine yet. -@@ -1248,7 +1208,8 @@ +@@ -1248,7 +1221,8 @@ } catch (Exception& e) { WARN("Cannot load module: %s", e.what()); @@ -1123,7 +1162,7 @@ delete module; continue; } -@@ -1285,67 +1246,15 @@ +@@ -1285,67 +1259,20 @@ continue; } } @@ -1134,9 +1173,9 @@ - Module* masterModule = getModule(json_integer_value(masterModuleIdJ)); - setMasterModule(masterModule); - } --} -- -- + } + + -void EngineWorker::run() { - // Configure thread - contextSet(engine->internal->context); @@ -1151,6 +1190,7 @@ - Engine_stepWorker(engine, id); - engine->internal->workerBarrier.wait(); - } ++void Engine::startFallbackThread() { } @@ -1179,7 +1219,8 @@ - }); - } - } -+void Engine::startFallbackThread() { ++void Engine_setAboutToClose(Engine* const engine) { ++ engine->internal->aboutToClose = true; } @@ -1189,8 +1230,8 @@ - - internal->fallbackRunning = true; - internal->fallbackThread = std::thread(Engine_fallbackRun, this); -+void Engine_setAboutToClose(Engine* const engine) { -+ engine->internal->aboutToClose = true; ++void Engine_setRemoteDetails(Engine* const engine, remoteUtils::RemoteDetails* const remoteDetails) { ++ engine->internal->remoteDetails = remoteDetails; } diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index ece100e0..e34016e2 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/MenuBar.cpp 2022-09-21 20:25:53.590040258 +0100 -+++ MenuBar.cpp 2022-11-29 19:49:19.196926572 +0000 +--- ../Rack/src/app/MenuBar.cpp 2022-09-21 19:49:12.198540676 +0100 ++++ MenuBar.cpp 2022-12-30 14:50:06.801891005 +0000 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin @@ -44,11 +44,13 @@ #include #include #include -@@ -25,8 +51,24 @@ +@@ -25,8 +51,28 @@ #include #include +#include "../CardinalCommon.hpp" ++#include "../CardinalRemote.hpp" ++#include "DistrhoPlugin.hpp" +#include "DistrhoStandaloneUtils.hpp" + +#ifdef HAVE_LIBLO @@ -61,7 +63,9 @@ +namespace asset { +std::string patchesPath(); +} -+ ++namespace engine { ++void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); ++} +namespace plugin { +void updateStaticPluginsDarkMode(); +} @@ -69,7 +73,7 @@ namespace app { namespace menuBar { -@@ -48,79 +90,152 @@ +@@ -48,79 +94,160 @@ }; @@ -93,14 +97,14 @@ struct FileButton : MenuButton { + const bool isStandalone; -+#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) ++#if ! CARDINAL_VARIANT_MINI + std::vector demoPatches; +#endif + + FileButton(const bool standalone) + : MenuButton(), isStandalone(standalone) + { -+#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) ++#if ! CARDINAL_VARIANT_MINI + const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples"; + + if (system::isDirectory(patchesDir)) @@ -131,6 +135,7 @@ - menu->addChild(createMenuItem("Open", RACK_MOD_CTRL_NAME "+O", []() { - APP->patch->loadDialog(); ++#if ! CARDINAL_VARIANT_MINI +#ifndef DISTRHO_OS_WASM + menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { + patchUtils::loadDialog(); @@ -174,6 +179,7 @@ + menu->addChild(createMenuItem("Save and download uncompressed", "", []() { + patchUtils::saveAsDialogUncompressed(); })); ++#endif +#endif menu->addChild(createMenuItem("Revert", RACK_MOD_CTRL_NAME "+" RACK_MOD_SHIFT_NAME "+O", []() { @@ -185,26 +191,31 @@ - menu->addChild(createMenuItem("Overwrite template", "", []() { - APP->patch->saveTemplateDialog(); - })); -+#ifdef HAVE_LIBLO ++#if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI + menu->addChild(new ui::MenuSeparator); + -+ if (patchUtils::isRemoteConnected()) { -+ menu->addChild(createMenuItem("Deploy to MOD", "F7", []() { -+ patchUtils::deployToRemote(); ++ remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); ++ ++ if (remoteDetails != nullptr && remoteDetails->connected) { ++ menu->addChild(createMenuItem("Deploy to MOD", "F7", [remoteDetails]() { ++ remoteUtils::sendFullPatchToRemote(remoteDetails); + })); -+ const bool autoDeploy = patchUtils::isRemoteAutoDeployed(); + menu->addChild(createCheckMenuItem("Auto deploy to MOD", "", -+ [=]() {return autoDeploy;}, -+ [=]() {patchUtils::setRemoteAutoDeploy(!autoDeploy);} ++ [remoteDetails]() {return remoteDetails->autoDeploy;}, ++ [remoteDetails]() { ++ remoteDetails->autoDeploy = !remoteDetails->autoDeploy; ++ Engine_setRemoteDetails(APP->engine, remoteDetails->autoDeploy ? remoteDetails : nullptr); ++ } + )); + } else { + menu->addChild(createMenuItem("Connect to MOD", "", []() { -+ patchUtils::connectToRemote(); ++ DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); + })); + } +#endif + ++#if ! CARDINAL_VARIANT_MINI +#ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); @@ -223,8 +234,9 @@ + patchUtils::saveAsDialogUncompressed(); })); +#endif ++#endif + -+#if !(defined(DISTRHO_OS_WASM) && defined(STATIC_BUILD)) ++#if ! CARDINAL_VARIANT_MINI + if (!demoPatches.empty()) + { + menu->addChild(new ui::MenuSeparator); @@ -264,7 +276,7 @@ } }; -@@ -166,7 +281,7 @@ +@@ -166,7 +293,7 @@ menu->addChild(new ui::MenuSeparator); @@ -273,7 +285,7 @@ } }; -@@ -256,7 +371,7 @@ +@@ -256,7 +383,7 @@ return settings::cableTension; } float getDefaultValue() override { @@ -282,7 +294,7 @@ } float getDisplayValue() override { return getValue() * 100; -@@ -393,36 +508,37 @@ +@@ -393,36 +520,37 @@ }; @@ -341,7 +353,7 @@ menu->addChild(createBoolPtrMenuItem("Show tooltips", "", &settings::tooltips)); ZoomSlider* zoomSlider = new ZoomSlider; -@@ -446,9 +562,18 @@ +@@ -446,9 +574,18 @@ menu->addChild(haloBrightnessSlider); menu->addChild(new ui::MenuSeparator); @@ -360,14 +372,13 @@ static const std::vector knobModeLabels = { "Linear", -@@ -473,11 +598,34 @@ +@@ -473,11 +610,34 @@ menu->addChild(knobScrollSensitivitySlider); menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("Module dragging")); + menu->addChild(createMenuLabel("Window")); - -- menu->addChild(createBoolPtrMenuItem("Lock positions", "", &settings::lockModules)); ++ +#ifdef DISTRHO_OS_WASM + const bool fullscreen = APP->window->isFullScreen(); + std::string rightText = "F11"; @@ -377,7 +388,8 @@ + APP->window->setFullScreen(!fullscreen); + })); +#endif -+ + +- menu->addChild(createBoolPtrMenuItem("Lock positions", "", &settings::lockModules)); + menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); - menu->addChild(createBoolPtrMenuItem("Auto-squeeze algorithm (experimental)", "", &settings::squeezeModules)); @@ -398,7 +410,7 @@ } }; -@@ -487,47 +635,6 @@ +@@ -487,47 +647,6 @@ //////////////////// @@ -446,7 +458,7 @@ struct EngineButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); -@@ -541,268 +648,46 @@ +@@ -541,268 +660,46 @@ settings::cpuMeter ^= true; })); @@ -602,10 +614,10 @@ + })); } - } -- + - MenuItem::step(); - } - +- - void onAction(const ActionEvent& e) override { - std::thread t([=] { - library::syncUpdate(slug); @@ -714,11 +726,11 @@ - }); - t.detach(); - } - +- - void step() override { - notification->box.pos = math::Vec(0, 0); - notification->visible = library::hasUpdates(); -- + - // Popup when updates finish downloading - if (library::restartRequested) { - library::restartRequested = false; @@ -748,7 +760,7 @@ } }; -@@ -813,65 +698,23 @@ +@@ -813,65 +710,23 @@ struct HelpButton : MenuButton { @@ -770,14 +782,14 @@ - - menu->addChild(createMenuItem("User manual", "F1", [=]() { - system::openBrowser("https://vcvrack.com/manual"); +- })); +- +- menu->addChild(createMenuItem("Support", "", [=]() { +- system::openBrowser("https://vcvrack.com/support"); + menu->addChild(createMenuItem("Rack User manual", "F1", [=]() { + patchUtils::openBrowser("https://vcvrack.com/manual"); })); -- menu->addChild(createMenuItem("Support", "", [=]() { -- system::openBrowser("https://vcvrack.com/support"); -- })); -- - menu->addChild(createMenuItem("VCVRack.com", "", [=]() { - system::openBrowser("https://vcvrack.com/"); + menu->addChild(createMenuItem("Cardinal Project page", "", [=]() { @@ -820,7 +832,22 @@ } }; -@@ -921,7 +764,9 @@ +@@ -910,9 +765,14 @@ + // uiLastTime = time; + // } + ++#if CARDINAL_VARIANT_MINI ++ text = string::f("%.1f fps", 1.0 / frameDurationAvg); ++#else + double meterAverage = APP->engine->getMeterAverage(); + double meterMax = APP->engine->getMeterMax(); + text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100); ++#endif ++ + Label::step(); + } + }; +@@ -921,7 +781,9 @@ struct MenuBar : widget::OpaqueWidget { MeterLabel* meterLabel; @@ -831,7 +858,7 @@ const float margin = 5; box.size.y = BND_WIDGET_HEIGHT + 2 * margin; -@@ -930,7 +775,7 @@ +@@ -930,7 +792,7 @@ layout->spacing = math::Vec(0, 0); addChild(layout); @@ -840,27 +867,28 @@ fileButton->text = "File"; layout->addChild(fileButton); -@@ -946,10 +791,6 @@ +@@ -942,13 +804,11 @@ + viewButton->text = "View"; + layout->addChild(viewButton); + ++#if ! CARDINAL_VARIANT_MINI + EngineButton* engineButton = new EngineButton; engineButton->text = "Engine"; layout->addChild(engineButton); - +- - LibraryButton* libraryButton = new LibraryButton; - libraryButton->text = "Library"; - layout->addChild(libraryButton); -- ++#endif + HelpButton* helpButton = new HelpButton; helpButton->text = "Help"; - layout->addChild(helpButton); -@@ -984,7 +825,11 @@ +@@ -984,7 +844,7 @@ widget::Widget* createMenuBar() { - menuBar::MenuBar* menuBar = new menuBar::MenuBar; -+ return new widget::Widget; -+} -+ -+widget::Widget* createMenuBar(const bool isStandalone) { -+ menuBar::MenuBar* menuBar = new menuBar::MenuBar(isStandalone); ++ menuBar::MenuBar* menuBar = new menuBar::MenuBar(isStandalone()); return menuBar; } diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index f1ad26c0..1c251b2e 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin/Model.cpp 2022-09-21 20:25:53.592040301 +0100 -+++ Model.cpp 2022-09-21 20:18:50.294557597 +0100 +--- ../Rack/src/plugin/Model.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ Model.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/ModuleWidget.cpp.diff b/src/override/diffs/ModuleWidget.cpp.diff index c32ce74f..b1e635d8 100644 --- a/src/override/diffs/ModuleWidget.cpp.diff +++ b/src/override/diffs/ModuleWidget.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/app/ModuleWidget.cpp 2022-09-21 20:25:53.590040258 +0100 -+++ ModuleWidget.cpp 2022-12-01 20:41:02.583687336 +0000 +--- ../Rack/src/app/ModuleWidget.cpp 2022-09-21 19:49:12.198540676 +0100 ++++ ModuleWidget.cpp 2022-12-02 19:11:45.780215974 +0000 @@ -1,3 +1,32 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/OpenGlWidget.cpp.diff b/src/override/diffs/OpenGlWidget.cpp.diff index 261123fa..1fb7156e 100644 --- a/src/override/diffs/OpenGlWidget.cpp.diff +++ b/src/override/diffs/OpenGlWidget.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 20:25:53.593040323 +0100 -+++ OpenGlWidget.cpp 2022-09-21 20:18:50.294557597 +0100 +--- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 19:49:12.201540766 +0100 ++++ OpenGlWidget.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index 4d1da9f7..55209401 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,6 +1,9 @@ ---- ../Rack/src/app/Scene.cpp 2022-09-21 20:25:53.591040280 +0100 -+++ Scene.cpp 2022-09-21 20:18:50.294557597 +0100 -@@ -1,3 +1,30 @@ +--- ../Rack/src/app/Scene.cpp 2022-09-21 19:49:12.199540706 +0100 ++++ Scene.cpp 2022-12-30 14:50:06.801891005 +0000 +@@ -1,12 +1,36 @@ +-#include +- +-#include +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho @@ -27,11 +30,9 @@ + * published by the Free Software Foundation; either version 3 of + * the License, or (at your option) any later version. + */ -+ - #include - #include -@@ -7,6 +34,7 @@ + #include + #include #include #include #include @@ -39,7 +40,7 @@ #include #include #include -@@ -14,6 +42,22 @@ +@@ -14,6 +38,13 @@ #include #include @@ -47,22 +48,13 @@ +# undef DEBUG +#endif + -+#ifdef STATIC_BUILD -+# undef HAVE_LIBLO -+#endif -+ -+#ifdef HAVE_LIBLO -+# include -+#endif -+ +#include "../CardinalCommon.hpp" -+#include "extra/Base64.hpp" -+#include "DistrhoUtils.hpp" ++#include "../CardinalRemote.hpp" + namespace rack { namespace app { -@@ -23,32 +67,94 @@ +@@ -23,32 +54,72 @@ math::Vec size; void draw(const DrawArgs& args) override { @@ -140,34 +132,12 @@ bool heldArrowKeys[4] = {}; + -+#ifdef HAVE_LIBLO + double lastSceneChangeTime = 0.0; + int historyActionIndex = -1; -+ -+ bool oscAutoDeploy = false; -+ bool oscConnected = false; -+ lo_server oscServer = nullptr; -+ -+ static int osc_handler(const char* const path, const char* const types, lo_arg** argv, const int argc, lo_message, void* const self) -+ { -+ d_stdout("osc_handler(\"%s\", \"%s\", %p, %i)", path, types, argv, argc); -+ -+ if (std::strcmp(path, "/resp") == 0 && argc == 2 && types[0] == 's' && types[1] == 's') { -+ d_stdout("osc_handler(\"%s\", ...) - got resp | '%s' '%s'", path, &argv[0]->s, &argv[1]->s); -+ if (std::strcmp(&argv[0]->s, "hello") == 0 && std::strcmp(&argv[1]->s, "ok") == 0) -+ static_cast(self)->oscConnected = true; -+ } -+ return 0; -+ } -+ -+ ~Internal() { -+ lo_server_free(oscServer); -+ } -+#endif }; -@@ -67,13 +173,11 @@ +@@ -67,13 +138,11 @@ browser->hide(); addChild(browser); @@ -184,7 +154,7 @@ addChild(internal->resizeHandle); } -@@ -99,22 +203,13 @@ +@@ -99,22 +168,13 @@ rackScroll->box.pos.y = menuBar->box.size.y; } @@ -209,31 +179,37 @@ // Scroll RackScrollWidget with arrow keys math::Vec arrowDelta; if (internal->heldArrowKeys[0]) { -@@ -143,6 +238,23 @@ +@@ -143,6 +203,29 @@ rackScroll->offset += arrowDelta * arrowSpeed; } -+#ifdef HAVE_LIBLO -+ if (internal->oscServer != nullptr) { -+ while (lo_server_recv_noblock(internal->oscServer, 0) != 0) {} ++ if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) { ++ idleRemote(remoteDetails); + -+ if (internal->oscAutoDeploy) { ++ if (remoteDetails->autoDeploy) { + const int actionIndex = APP->history->actionIndex; + const double time = system::getTime(); -+ if (internal->historyActionIndex != actionIndex && time - internal->lastSceneChangeTime >= 5.0) { ++ ++ if (internal->historyActionIndex == -1) { ++ internal->historyActionIndex = actionIndex; ++ internal->lastSceneChangeTime = time; ++ } else if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) { ++ const std::string& name(APP->history->actions[actionIndex - 1]->name); ++ if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") { ++ printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str()); ++ remoteUtils::sendFullPatchToRemote(remoteDetails); ++ window::generateScreenshot(); ++ } + internal->historyActionIndex = actionIndex; + internal->lastSceneChangeTime = time; -+ patchUtils::deployToRemote(); -+ window::generateScreenshot(); + } + } + } -+#endif + Widget::step(); } -@@ -172,7 +284,7 @@ +@@ -172,7 +255,7 @@ if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { // DEBUG("key '%d '%c' scancode %d '%c' keyName '%s'", e.key, e.key, e.scancode, e.scancode, e.keyName.c_str()); if (e.keyName == "n" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { @@ -242,7 +218,7 @@ e.consume(this); } if (e.keyName == "q" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -180,19 +292,22 @@ +@@ -180,19 +263,22 @@ e.consume(this); } if (e.keyName == "o" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { @@ -269,7 +245,7 @@ e.consume(this); } if (e.keyName == "z" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -220,24 +335,37 @@ +@@ -220,24 +306,38 @@ APP->scene->rackScroll->setZoom(std::pow(2.f, zoom)); e.consume(this); } @@ -292,7 +268,8 @@ e.consume(this); } + if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) { -+ patchUtils::deployToRemote(); ++ if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) ++ remoteUtils::sendFullPatchToRemote(remoteDetails); + window::generateScreenshot(); + e.consume(this); + } @@ -311,7 +288,7 @@ // Module selections if (e.keyName == "a" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -326,13 +454,6 @@ +@@ -326,13 +426,6 @@ // Key commands that can be overridden by children if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { @@ -325,7 +302,7 @@ if (e.keyName == "v" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { rack->pasteClipboardAction(); e.consume(this); -@@ -351,7 +472,7 @@ +@@ -351,7 +444,7 @@ std::string extension = system::getExtension(path); if (extension == ".vcv") { @@ -334,98 +311,3 @@ e.consume(this); return; } -@@ -368,3 +489,94 @@ - - } // namespace app - } // namespace rack -+ -+ -+namespace patchUtils { -+ -+ -+bool connectToRemote() { -+#ifdef HAVE_LIBLO -+ rack::app::Scene::Internal* const internal = APP->scene->internal; -+ -+ if (internal->oscServer == nullptr) { -+ const lo_server oscServer = lo_server_new_with_proto(nullptr, LO_UDP, nullptr); -+ DISTRHO_SAFE_ASSERT_RETURN(oscServer != nullptr, false); -+ lo_server_add_method(oscServer, "/resp", nullptr, rack::app::Scene::Internal::osc_handler, internal); -+ internal->oscServer = oscServer; -+ } -+ -+ const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); -+ DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr, false); -+ lo_send(addr, "/hello", ""); -+ lo_address_free(addr); -+ -+ return true; -+#else -+ return false; -+#endif -+} -+ -+ -+bool isRemoteConnected() { -+#ifdef HAVE_LIBLO -+ return APP->scene->internal->oscConnected; -+#else -+ return false; -+#endif -+} -+ -+ -+bool isRemoteAutoDeployed() { -+#ifdef HAVE_LIBLO -+ return APP->scene->internal->oscAutoDeploy; -+#else -+ return false; -+#endif -+} -+ -+ -+void setRemoteAutoDeploy(bool autoDeploy) { -+#ifdef HAVE_LIBLO -+ APP->scene->internal->oscAutoDeploy = autoDeploy; -+#endif -+} -+ -+ -+void deployToRemote() { -+#ifdef HAVE_LIBLO -+ const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); -+ DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); -+ -+ APP->engine->prepareSave(); -+ APP->patch->saveAutosave(); -+ APP->patch->cleanAutosave(); -+ std::vector data(rack::system::archiveDirectory(APP->patch->autosavePath, 1)); -+ -+ if (const lo_blob blob = lo_blob_new(data.size(), data.data())) { -+ lo_send(addr, "/load", "b", blob); -+ lo_blob_free(blob); -+ } -+ -+ lo_address_free(addr); -+#endif -+} -+ -+ -+void sendScreenshotToRemote(const char* const screenshot) { -+#ifdef HAVE_LIBLO -+ const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT); -+ DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); -+ -+ std::vector data(d_getChunkFromBase64String(screenshot)); -+ -+ if (const lo_blob blob = lo_blob_new(data.size(), data.data())) { -+ lo_send(addr, "/screenshot", "b", blob); -+ lo_blob_free(blob); -+ } -+ -+ lo_address_free(addr); -+#endif -+} -+ -+ -+} // namespace patchUtils diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index c9866e9c..e71c075b 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,6 +1,6 @@ ---- ../Rack/src/window/Window.cpp 2022-09-21 20:25:53.593040323 +0100 -+++ Window.cpp 2022-09-21 20:18:50.294557597 +0100 -@@ -1,33 +1,87 @@ +--- ../Rack/src/window/Window.cpp 2022-09-21 19:49:12.202540796 +0100 ++++ Window.cpp 2022-12-29 17:16:45.012337253 +0000 +@@ -1,33 +1,88 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho @@ -59,10 +59,10 @@ + +// comment out if wanting to generate a local screenshot.png +#define STBI_WRITE_NO_STDIO - ++ +// uncomment to generate screenshots without the rack rail background (ie, transparent) +// #define CARDINAL_TRANSPARENT_SCREENSHOTS -+ + +// used in Window::screenshot +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "stb_image_write.h" @@ -71,6 +71,7 @@ +#include "Application.hpp" +#include "extra/String.hpp" +#include "../CardinalCommon.hpp" ++#include "../PluginContext.hpp" +#include "../WindowParameters.hpp" + +#ifndef DGL_NO_SHARED_RESOURCES @@ -101,7 +102,7 @@ Font::~Font() { -@@ -42,9 +96,8 @@ +@@ -42,9 +97,8 @@ // Transfer ownership of font data to font object uint8_t* data = system::readFile(filename, &size); // Don't use nvgCreateFont because it doesn't properly handle UTF-8 filenames on Windows. @@ -112,7 +113,7 @@ throw Exception("Failed to load font %s", filename.c_str()); } INFO("Loaded font %s", filename.c_str()); -@@ -79,375 +132,347 @@ +@@ -79,375 +133,489 @@ } @@ -133,14 +134,17 @@ - int lastWindowWidth = 0; - int lastWindowHeight = 0; + DISTRHO_NAMESPACE::UI* ui = nullptr; ++ DGL_NAMESPACE::NanoTopLevelWidget* tlw = nullptr; + DISTRHO_NAMESPACE::WindowParameters params; + DISTRHO_NAMESPACE::WindowParametersCallback* callback = nullptr; ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + DGL_NAMESPACE::Application hiddenApp; + DGL_NAMESPACE::Window hiddenWindow; + NVGcontext* r_vg = nullptr; + NVGcontext* r_fbVg = nullptr; + NVGcontext* o_vg = nullptr; + NVGcontext* o_fbVg = nullptr; ++#endif + + math::Vec size = WINDOW_SIZE_MIN; + @@ -168,26 +172,42 @@ bool fbDirtyOnSubpixelChange = true; int fbCount = 0; -+ +-}; +- + +-static void windowPosCallback(GLFWwindow* win, int x, int y) { +- if (glfwGetWindowAttrib(win, GLFW_MAXIMIZED)) +- return; +- if (glfwGetWindowAttrib(win, GLFW_ICONIFIED)) +- return; +- if (glfwGetWindowMonitor(win)) +- return; +- settings::windowPos = math::Vec(x, y); +- // DEBUG("windowPosCallback %d %d", x, y); +-} + Internal() ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + : hiddenApp(false), + hiddenWindow(hiddenApp) + { + hiddenWindow.setIgnoringKeyRepeat(true); + hiddenApp.idle(); + } - }; ++#else ++ {} ++#endif ++}; --static void windowPosCallback(GLFWwindow* win, int x, int y) { +-static void windowSizeCallback(GLFWwindow* win, int width, int height) { - if (glfwGetWindowAttrib(win, GLFW_MAXIMIZED)) - return; - if (glfwGetWindowAttrib(win, GLFW_ICONIFIED)) - return; - if (glfwGetWindowMonitor(win)) - return; -- settings::windowPos = math::Vec(x, y); -- // DEBUG("windowPosCallback %d %d", x, y); +- settings::windowSize = math::Vec(width, height); +- // DEBUG("windowSizeCallback %d %d", width, height); -} +#ifndef DGL_NO_SHARED_RESOURCES +static int loadFallbackFont(NVGcontext* const vg) @@ -198,30 +218,14 @@ + using namespace dpf_resources; --static void windowSizeCallback(GLFWwindow* win, int width, int height) { -- if (glfwGetWindowAttrib(win, GLFW_MAXIMIZED)) -- return; -- if (glfwGetWindowAttrib(win, GLFW_ICONIFIED)) -- return; -- if (glfwGetWindowMonitor(win)) -- return; -- settings::windowSize = math::Vec(width, height); -- // DEBUG("windowSizeCallback %d %d", width, height); -+ return nvgCreateFontMem(vg, NANOVG_DEJAVU_SANS_TTF, -+ (uchar*)dejavusans_ttf, dejavusans_ttf_size, 0); - } -+#endif - - -static void windowMaximizeCallback(GLFWwindow* win, int maximized) { - settings::windowMaximized = maximized; - // DEBUG("windowMaximizeCallback %d", maximized); --} -+Window::Window() { -+ internal = new Internal; - -+ DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); - ++ return nvgCreateFontMem(vg, NANOVG_DEJAVU_SANS_TTF, ++ (uchar*)dejavusans_ttf, dejavusans_ttf_size, 0); + } +- +- -static void mouseButtonCallback(GLFWwindow* win, int button, int action, int mods) { - contextSet((Context*) glfwGetWindowUserPointer(win)); -#if defined ARCH_MAC @@ -234,19 +238,56 @@ - if (button == GLFW_MOUSE_BUTTON_LEFT && (mods & RACK_MOD_MASK) == (GLFW_MOD_CONTROL | GLFW_MOD_SHIFT)) { - button = GLFW_MOUSE_BUTTON_MIDDLE; - mods &= ~(GLFW_MOD_CONTROL | GLFW_MOD_SHIFT); +- } + #endif + +- APP->event->handleButton(APP->window->internal->lastMousePos, button, action, mods); +-} +- + +-static void cursorPosCallback(GLFWwindow* win, double xpos, double ypos) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- math::Vec mousePos = math::Vec(xpos, ypos).div(APP->window->pixelRatio / APP->window->windowRatio).round(); +- math::Vec mouseDelta = mousePos.minus(APP->window->internal->lastMousePos); ++Window::Window() { ++ internal = new Internal; + +- // Workaround for GLFW warping mouse to a different position when the cursor is locked or unlocked. +- if (APP->window->internal->ignoreNextMouseDelta) { +- APP->window->internal->ignoreNextMouseDelta = false; +- mouseDelta = math::Vec(); - } + // Set up NanoVG + const int nvgFlags = NVG_ANTIALIAS; + +- int cursorMode = glfwGetInputMode(win, GLFW_CURSOR); +- (void) cursorMode; ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++ DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); + vg = nvgCreateGL(nvgFlags); ++#else ++ vg = static_cast(APP)->tlw->getContext(); ++#endif + DISTRHO_SAFE_ASSERT_RETURN(vg != nullptr,); + +-#if defined ARCH_MAC +- // Workaround for Mac. We can't use GLFW_CURSOR_DISABLED because it's buggy, so implement it on our own. +- // This is not an ideal implementation. For example, if the user drags off the screen, the new mouse position will be clamped. +- if (cursorMode == GLFW_CURSOR_HIDDEN) { +- // CGSetLocalEventsSuppressionInterval(0.0); +- glfwSetCursorPos(win, APP->window->internal->lastMousePos.x, APP->window->internal->lastMousePos.y); +- CGAssociateMouseAndMouseCursorPosition(true); +- mousePos = APP->window->internal->lastMousePos; +- } +- // Because sometimes the cursor turns into an arrow when its position is on the boundary of the window +- glfwSetCursor(win, NULL); +#ifdef NANOVG_GLES2 + fbVg = nvgCreateSharedGLES2(vg, nvgFlags); +#else + fbVg = nvgCreateSharedGL2(vg, nvgFlags); #endif -- APP->event->handleButton(APP->window->internal->lastMousePos, button, action, mods); --} +- APP->window->internal->lastMousePos = mousePos; + // Load default Blendish font +#ifndef DGL_NO_SHARED_RESOURCES + uiFont = std::make_shared(); @@ -263,55 +304,51 @@ + uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); +#endif +- APP->event->handleHover(mousePos, mouseDelta); + if (uiFont != nullptr) + bndSetFont(uiFont->handle); --static void cursorPosCallback(GLFWwindow* win, double xpos, double ypos) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- math::Vec mousePos = math::Vec(xpos, ypos).div(APP->window->pixelRatio / APP->window->windowRatio).round(); -- math::Vec mouseDelta = mousePos.minus(APP->window->internal->lastMousePos); +- // Keyboard/mouse MIDI driver +- int width, height; +- glfwGetWindowSize(win, &width, &height); +- math::Vec scaledPos(xpos / width, ypos / height); +- keyboard::mouseMove(scaledPos); +#ifdef DISTRHO_OS_WASM + emscripten_lock_orientation(EMSCRIPTEN_ORIENTATION_LANDSCAPE_PRIMARY); +#endif -+} + } -- // Workaround for GLFW warping mouse to a different position when the cursor is locked or unlocked. -- if (APP->window->internal->ignoreNextMouseDelta) { -- APP->window->internal->ignoreNextMouseDelta = false; -- mouseDelta = math::Vec(); -+void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) +- +-static void cursorEnterCallback(GLFWwindow* win, int entered) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- if (!entered) { +- APP->event->handleLeave(); ++void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) +{ + // if nanovg context failed, init only bare minimum + if (window->vg == nullptr) + { -+ if (ui != nullptr) ++ if (tlw != nullptr) + { -+ window->internal->ui = ui; -+ window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); ++ window->internal->tlw = tlw; ++ window->internal->size = rack::math::Vec(tlw->getWidth(), tlw->getHeight()); + } + else + { -+ window->internal->ui = nullptr; ++ window->internal->tlw = nullptr; + window->internal->callback = nullptr; + } + return; } +-} -- int cursorMode = glfwGetInputMode(win, GLFW_CURSOR); -- (void) cursorMode; - +-static void scrollCallback(GLFWwindow* win, double x, double y) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- math::Vec scrollDelta = math::Vec(x, y); -#if defined ARCH_MAC -- // Workaround for Mac. We can't use GLFW_CURSOR_DISABLED because it's buggy, so implement it on our own. -- // This is not an ideal implementation. For example, if the user drags off the screen, the new mouse position will be clamped. -- if (cursorMode == GLFW_CURSOR_HIDDEN) { -- // CGSetLocalEventsSuppressionInterval(0.0); -- glfwSetCursorPos(win, APP->window->internal->lastMousePos.x, APP->window->internal->lastMousePos.y); -- CGAssociateMouseAndMouseCursorPosition(true); -- mousePos = APP->window->internal->lastMousePos; -- } -- // Because sometimes the cursor turns into an arrow when its position is on the boundary of the window -- glfwSetCursor(win, NULL); -+ if (ui != nullptr) +- scrollDelta = scrollDelta.mult(10.0); ++ if (tlw != nullptr) + { + const GLubyte* vendor = glGetString(GL_VENDOR); + const GLubyte* renderer = glGetString(GL_RENDERER); @@ -319,18 +356,21 @@ + INFO("Renderer: %s %s", vendor, renderer); + INFO("OpenGL: %s", version); + -+ window->internal->ui = ui; -+ window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); ++ window->internal->tlw = tlw; ++ window->internal->size = rack::math::Vec(tlw->getWidth(), tlw->getHeight()); + ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + // Set up NanoVG -+ window->internal->r_vg = ui->getContext(); ++ window->internal->r_vg = tlw->getContext(); +#ifdef NANOVG_GLES2 + window->internal->r_fbVg = nvgCreateSharedGLES2(window->internal->r_vg, NVG_ANTIALIAS); -+#else + #else +- scrollDelta = scrollDelta.mult(50.0); + window->internal->r_fbVg = nvgCreateSharedGL2(window->internal->r_vg, NVG_ANTIALIAS); #endif -- APP->window->internal->lastMousePos = mousePos; +- APP->event->handleScroll(APP->window->internal->lastMousePos, scrollDelta); +-} + // swap contexts + window->internal->o_vg = window->vg; + window->internal->o_fbVg = window->fbVg; @@ -354,16 +394,15 @@ + image.second->handle = nvgCreateImage(window->vg, image.second->ofilename.c_str(), + NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); + } ++#endif -- APP->event->handleHover(mousePos, mouseDelta); + // Init settings + WindowParametersRestore(window); -- // Keyboard/mouse MIDI driver -- int width, height; -- glfwGetWindowSize(win, &width, &height); -- math::Vec scaledPos(xpos / width, ypos / height); -- keyboard::mouseMove(scaledPos); +-static void charCallback(GLFWwindow* win, unsigned int codepoint) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- if (APP->event->handleText(APP->window->internal->lastMousePos, codepoint)) +- return; -} + widget::Widget::ContextCreateEvent e; + APP->scene->onContextCreate(e); @@ -372,7 +411,8 @@ + { + widget::Widget::ContextDestroyEvent e; + APP->scene->onContextDestroy(e); -+ + ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + // swap contexts + window->uiFont->vg = window->internal->o_vg; + window->vg = window->internal->o_vg; @@ -396,75 +436,16 @@ + image.second->ohandle = -1; + } +-static void keyCallback(GLFWwindow* win, int key, int scancode, int action, int mods) { +- contextSet((Context*) glfwGetWindowUserPointer(win)); +- if (APP->event->handleKey(APP->window->internal->lastMousePos, key, scancode, action, mods)) +- return; +#if defined NANOVG_GLES2 + nvgDeleteGLES2(window->internal->r_fbVg); +#else + nvgDeleteGL2(window->internal->r_fbVg); +#endif - --static void cursorEnterCallback(GLFWwindow* win, int entered) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- if (!entered) { -- APP->event->handleLeave(); -+ window->internal->ui = nullptr; -+ window->internal->callback = nullptr; - } - } - -+void WindowSetMods(Window* const window, const int mods) -+{ -+ window->internal->mods = mods; -+} - --static void scrollCallback(GLFWwindow* win, double x, double y) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- math::Vec scrollDelta = math::Vec(x, y); --#if defined ARCH_MAC -- scrollDelta = scrollDelta.mult(10.0); -+Window::~Window() { -+ { -+ DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); -+ internal->hiddenWindow.close(); -+ internal->hiddenApp.idle(); -+ -+ // Fonts and Images in the cache must be deleted before the NanoVG context is deleted -+ internal->fontCache.clear(); -+ internal->imageCache.clear(); -+ -+ if (vg != nullptr) -+ { -+#if defined NANOVG_GLES2 -+ nvgDeleteGLES2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); -+ nvgDeleteGLES2(internal->o_vg != nullptr ? internal->o_vg : vg); - #else -- scrollDelta = scrollDelta.mult(50.0); -+ nvgDeleteGL2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); -+ nvgDeleteGL2(internal->o_vg != nullptr ? internal->o_vg : vg); - #endif -+ } -+ } - -- APP->event->handleScroll(APP->window->internal->lastMousePos, scrollDelta); -+ delete internal; - } - - --static void charCallback(GLFWwindow* win, unsigned int codepoint) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- if (APP->event->handleText(APP->window->internal->lastMousePos, codepoint)) -- return; -+math::Vec Window::getSize() { -+ return internal->size; - } - - --static void keyCallback(GLFWwindow* win, int key, int scancode, int action, int mods) { -- contextSet((Context*) glfwGetWindowUserPointer(win)); -- if (APP->event->handleKey(APP->window->internal->lastMousePos, key, scancode, action, mods)) -- return; -+void Window::setSize(math::Vec size) { -+ size = size.max(WINDOW_SIZE_MIN); -+ internal->size = size; ++#endif - // Keyboard/mouse MIDI driver - if (action == GLFW_PRESS && (mods & RACK_MOD_MASK) == 0) { @@ -472,9 +453,9 @@ - } - if (action == GLFW_RELEASE) { - keyboard::release(key); -- } -+ if (DISTRHO_NAMESPACE::UI* const ui = internal->ui) -+ ui->setSize(internal->size.x, internal->size.y); ++ window->internal->tlw = nullptr; ++ window->internal->callback = nullptr; + } } - @@ -483,25 +464,56 @@ - std::vector pathsVec; - for (int i = 0; i < count; i++) { - pathsVec.push_back(paths[i]); -- } ++void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) ++{ ++ // if nanovg context failed, init only bare minimum ++ if (window->vg == nullptr) ++ { ++ if (ui != nullptr) ++ { ++ window->internal->ui = ui; ++ window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); ++ } ++ else ++ { ++ window->internal->ui = nullptr; ++ window->internal->callback = nullptr; ++ } ++ return; + } - APP->event->handleDrop(APP->window->internal->lastMousePos, pathsVec); -+void WindowSetInternalSize(rack::window::Window* const window, math::Vec size) { -+ size = size.max(WINDOW_SIZE_MIN); -+ window->internal->size = size; - } - +-} +- -static void errorCallback(int error, const char* description) { - WARN("GLFW error %d: %s", error, description); -+void Window::run() { -+ internal->frame = 0; - } - +-} +- +- +-Window::Window() { +- internal = new Internal; +- int err; ++ if (ui != nullptr) ++ { ++ const GLubyte* vendor = glGetString(GL_VENDOR); ++ const GLubyte* renderer = glGetString(GL_RENDERER); ++ const GLubyte* version = glGetString(GL_VERSION); ++ INFO("Renderer: %s %s", vendor, renderer); ++ INFO("OpenGL: %s", version); ++ ++ window->internal->tlw = ui; ++ window->internal->ui = ui; ++ window->internal->size = rack::math::Vec(ui->getWidth(), ui->getHeight()); ++ ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++ // Set up NanoVG ++ window->internal->r_vg = ui->getContext(); ++#ifdef NANOVG_GLES2 ++ window->internal->r_fbVg = nvgCreateSharedGLES2(window->internal->r_vg, NVG_ANTIALIAS); ++#else ++ window->internal->r_fbVg = nvgCreateSharedGL2(window->internal->r_vg, NVG_ANTIALIAS); ++#endif --Window::Window() { -- internal = new Internal; -- int err; -- - // Set window hints -#if defined NANOVG_GL2 - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); @@ -582,10 +594,36 @@ - const GLubyte* version = glGetString(GL_VERSION); - INFO("Renderer: %s %s", vendor, renderer); - INFO("OpenGL: %s", version); -- ++ // swap contexts ++ window->internal->o_vg = window->vg; ++ window->internal->o_fbVg = window->fbVg; ++ window->vg = window->internal->r_vg; ++ window->fbVg = window->internal->r_fbVg; ++ ++ // also for fonts and images ++ window->uiFont->vg = window->vg; ++ window->uiFont->handle = loadFallbackFont(window->vg); ++ for (auto& font : window->internal->fontCache) ++ { ++ font.second->vg = window->vg; ++ font.second->ohandle = font.second->handle; ++ font.second->handle = nvgCreateFont(window->vg, ++ font.second->ofilename.c_str(), font.second->ofilename.c_str()); ++ } ++ for (auto& image : window->internal->imageCache) ++ { ++ image.second->vg = window->vg; ++ image.second->ohandle = image.second->handle; ++ image.second->handle = nvgCreateImage(window->vg, image.second->ofilename.c_str(), ++ NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); ++ } ++#endif + - // GLEW generates GL error because it calls glGetString(GL_EXTENSIONS), we'll consume it here. - glGetError(); -- ++ // Init settings ++ WindowParametersRestore(window); + - // Set up NanoVG - int nvgFlags = NVG_ANTIALIAS; -#if defined NANOVG_GL2 @@ -599,15 +637,146 @@ - if (!vg) { - osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Could not initialize NanoVG. Does your graphics card support OpenGL 2.0 or greater? If so, make sure you have the latest graphics drivers installed."); - throw Exception("Could not initialize NanoVG"); -- } -- ++ widget::Widget::ContextCreateEvent e; ++ APP->scene->onContextCreate(e); + } ++ else ++ { ++ widget::Widget::ContextDestroyEvent e; ++ APP->scene->onContextDestroy(e); + - // Load default Blendish font - uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); - bndSetFont(uiFont->handle); -- ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++ // swap contexts ++ window->uiFont->vg = window->internal->o_vg; ++ window->vg = window->internal->o_vg; ++ window->fbVg = window->internal->o_fbVg; ++ window->internal->o_vg = nullptr; ++ window->internal->o_fbVg = nullptr; ++ ++ // also for fonts and images ++ window->uiFont->vg = window->vg; ++ window->uiFont->handle = loadFallbackFont(window->vg); ++ for (auto& font : window->internal->fontCache) ++ { ++ font.second->vg = window->vg; ++ font.second->handle = font.second->ohandle; ++ font.second->ohandle = -1; ++ } ++ for (auto& image : window->internal->imageCache) ++ { ++ image.second->vg = window->vg; ++ image.second->handle = image.second->ohandle; ++ image.second->ohandle = -1; ++ } + - if (APP->scene) { - widget::Widget::ContextCreateEvent e; - APP->scene->onContextCreate(e); ++#if defined NANOVG_GLES2 ++ nvgDeleteGLES2(window->internal->r_fbVg); ++#else ++ nvgDeleteGL2(window->internal->r_fbVg); ++#endif ++#endif ++ ++ window->internal->tlw = nullptr; ++ window->internal->ui = nullptr; ++ window->internal->callback = nullptr; + } + } + ++void WindowSetMods(Window* const window, const int mods) ++{ ++ window->internal->mods = mods; ++} + + Window::~Window() { +- if (APP->scene) { +- widget::Widget::ContextDestroyEvent e; +- APP->scene->onContextDestroy(e); +- } ++ { ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++ DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow); ++ internal->hiddenWindow.close(); ++ internal->hiddenApp.idle(); ++#endif + +- // Fonts and Images in the cache must be deleted before the NanoVG context is deleted +- internal->fontCache.clear(); +- internal->imageCache.clear(); +- +- // nvgDeleteClone(fbVg); +- +-#if defined NANOVG_GL2 +- nvgDeleteGL2(vg); +- nvgDeleteGL2(fbVg); +-#elif defined NANOVG_GL3 +- nvgDeleteGL3(vg); +-#elif defined NANOVG_GLES2 +- nvgDeleteGLES2(vg); ++ // Fonts and Images in the cache must be deleted before the NanoVG context is deleted ++ internal->fontCache.clear(); ++ internal->imageCache.clear(); ++ ++ if (vg != nullptr) ++ { ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++#if defined NANOVG_GLES2 ++ nvgDeleteGLES2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); ++ nvgDeleteGLES2(internal->o_vg != nullptr ? internal->o_vg : vg); ++#else ++ nvgDeleteGL2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); ++ nvgDeleteGL2(internal->o_vg != nullptr ? internal->o_vg : vg); ++#endif ++#else ++#if defined NANOVG_GLES2 ++ nvgDeleteGLES2(fbVg); ++#else ++ nvgDeleteGL2(fbVg); ++#endif + #endif ++ } ++ } + +- glfwDestroyWindow(win); + delete internal; + } + + + math::Vec Window::getSize() { +- int width, height; +- glfwGetWindowSize(win, &width, &height); +- return math::Vec(width, height); ++ return internal->size; + } + + + void Window::setSize(math::Vec size) { + size = size.max(WINDOW_SIZE_MIN); +- glfwSetWindowSize(win, size.x, size.y); ++ internal->size = size; ++ ++ if (DGL_NAMESPACE::NanoTopLevelWidget* const tlw = internal->ui) ++ tlw->setSize(internal->size.x, internal->size.y); ++} ++ ++void WindowSetInternalSize(rack::window::Window* const window, math::Vec size) { ++ size = size.max(WINDOW_SIZE_MIN); ++ window->internal->size = size; + } + + + void Window::run() { + internal->frame = 0; +- while (!glfwWindowShouldClose(win)) { +- step(); ++} ++ ++ +#ifndef DGL_USE_GLES +static void Window__flipBitmap(uint8_t* pixels, const int width, const int height, const int depth) { + for (int y = 0; y < height / 2; y++) { @@ -620,10 +789,6 @@ } --Window::~Window() { -- if (APP->scene) { -- widget::Widget::ContextDestroyEvent e; -- APP->scene->onContextDestroy(e); +#ifdef STBI_WRITE_NO_STDIO +static void Window__downscaleBitmap(uint8_t* pixels, int& width, int& height) { + int targetWidth = width; @@ -650,62 +815,31 @@ + const int xs = static_cast(x * scale); + std::memmove(pixels + (width * y + x) * 3, pixels + (width * ys + xs) * 3, 3); + } - } - -- // Fonts and Images in the cache must be deleted before the NanoVG context is deleted -- internal->fontCache.clear(); -- internal->imageCache.clear(); -- -- // nvgDeleteClone(fbVg); -- --#if defined NANOVG_GL2 -- nvgDeleteGL2(vg); -- nvgDeleteGL2(fbVg); --#elif defined NANOVG_GL3 -- nvgDeleteGL3(vg); --#elif defined NANOVG_GLES2 -- nvgDeleteGLES2(vg); --#endif -- -- glfwDestroyWindow(win); -- delete internal; --} -- -- --math::Vec Window::getSize() { -- int width, height; -- glfwGetWindowSize(win, &width, &height); -- return math::Vec(width, height); ++ } ++ + width = targetWidth; + height = targetHeight; - } - -- --void Window::setSize(math::Vec size) { -- size = size.max(WINDOW_SIZE_MIN); -- glfwSetWindowSize(win, size.x, size.y); ++} ++ +static void Window__writeImagePNG(void* context, void* data, int size) { + USE_NAMESPACE_DISTRHO -+ UI* const ui = static_cast(context); -+ ui->setState("screenshot", String::asBase64(data, size).buffer()); - } ++ CardinalBaseUI* const ui = static_cast(context); ++ if (char* const screenshot = String::asBase64(data, size).getAndReleaseBuffer()) { ++ ui->setState("screenshot", screenshot); ++ remoteUtils::sendScreenshotToRemote(ui->remoteDetails, screenshot); ++ std::free(screenshot); ++ } ++} +#endif +#endif - - --void Window::run() { -- internal->frame = 0; -- while (!glfwWindowShouldClose(win)) { -- step(); -- } --} -+void Window::step() { -+ DISTRHO_SAFE_ASSERT_RETURN(internal->ui != nullptr,); - ++ ++ + void Window::step() { ++ DISTRHO_SAFE_ASSERT_RETURN(internal->tlw != nullptr,); ++ + if (vg == nullptr) + return; - --void Window::step() { ++ double frameTime = system::getTime(); double lastFrameTime = internal->frameTime; internal->frameTime = frameTime; @@ -748,12 +882,12 @@ if (APP->patch->path != "") { windowTitle += " - "; if (!APP->history->isSaved()) -@@ -455,246 +480,189 @@ +@@ -455,246 +623,189 @@ windowTitle += system::getFilename(APP->patch->path); } if (windowTitle != internal->lastWindowTitle) { - glfwSetWindowTitle(win, windowTitle.c_str()); -+ internal->ui->getWindow().setTitle(windowTitle.c_str()); ++ internal->tlw->getWindow().setTitle(windowTitle.c_str()); internal->lastWindowTitle = windowTitle; } @@ -766,7 +900,7 @@ - glfwGetWindowContentScale(win, &newPixelRatio, NULL); - newPixelRatio = std::floor(newPixelRatio + 0.5); - } -+ float newPixelRatio = internal->ui->getScaleFactor(); ++ float newPixelRatio = internal->tlw->getScaleFactor(); if (newPixelRatio != pixelRatio) { pixelRatio = newPixelRatio; APP->event->handleDirty(); @@ -789,8 +923,8 @@ - glfwGetFramebufferSize(win, &fbWidth, &fbHeight); - int winWidth, winHeight; - glfwGetWindowSize(win, &winWidth, &winHeight); -+ int winWidth = internal->ui->getWidth(); -+ int winHeight = internal->ui->getHeight(); ++ int winWidth = internal->tlw->getWidth(); ++ int winHeight = internal->tlw->getHeight(); + int fbWidth = winWidth;// * newPixelRatio; + int fbHeight = winHeight;// * newPixelRatio; windowRatio = (float)fbWidth / winWidth; @@ -842,19 +976,6 @@ - if (frameDurationRemaining > 0.0) { - std::this_thread::sleep_for(std::chrono::duration(frameDurationRemaining)); - } -- -- // t5 = system::getTime(); -- -- // DEBUG("pre-step %6.1f step %6.1f draw %6.1f nvgEndFrame %6.1f glfwSwapBuffers %6.1f total %6.1f", -- // (t1 - frameTime) * 1e3f, -- // (t2 - t1) * 1e3f, -- // (t3 - t2) * 1e3f, -- // (t4 - t2) * 1e3f, -- // (t5 - t4) * 1e3f, -- // (t5 - frameTime) * 1e3f -- // ); -- internal->frame++; --} +#ifndef DGL_USE_GLES + if (internal->generateScreenshotStep != kScreenshotStepNone) { + ++internal->generateScreenshotStep; @@ -867,16 +988,24 @@ + constexpr const int depth = 3; +#endif +- // t5 = system::getTime(); + // Allocate pixel color buffer + uint8_t* const pixels = new uint8_t[winHeight * winWidth * 4]; --void Window::activateContext() { -- glfwMakeContextCurrent(win); +- // DEBUG("pre-step %6.1f step %6.1f draw %6.1f nvgEndFrame %6.1f glfwSwapBuffers %6.1f total %6.1f", +- // (t1 - frameTime) * 1e3f, +- // (t2 - t1) * 1e3f, +- // (t3 - t2) * 1e3f, +- // (t4 - t2) * 1e3f, +- // (t5 - t4) * 1e3f, +- // (t5 - frameTime) * 1e3f +- // ); +- internal->frame++; -} + // glReadPixels defaults to GL_BACK, but the back-buffer is unstable, so use the front buffer (what the user sees) + glReadBuffer(GL_FRONT); + glReadPixels(0, 0, winWidth, winHeight, depth == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, pixels); -+ + + if (internal->generateScreenshotStep == kScreenshotStepSaving) + { + // Write pixels to PNG @@ -892,10 +1021,18 @@ + stbi_write_png("screenshot.png", winWidth, winHeight, depth, pixelsWithOffset, stride); +#endif +-void Window::activateContext() { +- glfwMakeContextCurrent(win); + internal->generateScreenshotStep = kScreenshotStepNone; + APP->scene->menuBar->show(); + APP->scene->rack->children.front()->show(); + } ++ ++ delete[] pixels; ++ } ++#endif + } + -static void flipBitmap(uint8_t* pixels, int width, int height, int depth) { - for (int y = 0; y < height / 2; y++) { @@ -904,9 +1041,8 @@ - std::memcpy(tmp, &pixels[y * width * depth], width * depth); - std::memcpy(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); - std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); -+ delete[] pixels; - } -+#endif +- } ++void Window::activateContext() { } @@ -975,7 +1111,7 @@ - nvgImageSize(vg, fbw->getImageHandle(), &width, &height); - uint8_t* pixels = new uint8_t[height * width * 4]; - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); -+void Window::activateContext() { ++void Window::screenshot(const std::string&) { +} - // Write pixels to PNG @@ -988,19 +1124,15 @@ - delete fbw; - } - } -+void Window::screenshot(const std::string&) { -+} -+ -+ +void Window::screenshotModules(const std::string&, float) { } void Window::close() { - glfwSetWindowShouldClose(win, GLFW_TRUE); -+ DISTRHO_SAFE_ASSERT_RETURN(internal->ui != nullptr,); ++ DISTRHO_SAFE_ASSERT_RETURN(internal->tlw != nullptr,); + -+ internal->ui->getWindow().close(); ++ internal->tlw->getWindow().close(); } @@ -1013,7 +1145,7 @@ - glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN); -#else - glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_DISABLED); -+ emscripten_request_pointerlock(internal->ui->getWindow().getApp().getClassName(), false); ++ emscripten_request_pointerlock(internal->tlw->getWindow().getApp().getClassName(), false); #endif - internal->ignoreNextMouseDelta = true; } @@ -1071,7 +1203,7 @@ +void Window::setFullScreen(const bool fullscreen) { +#ifdef DISTRHO_OS_WASM + if (fullscreen) -+ emscripten_request_fullscreen(internal->ui->getWindow().getApp().getClassName(), false); ++ emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false); + else + emscripten_exit_fullscreen(); +#endif @@ -1097,7 +1229,7 @@ double Window::getMonitorRefreshRate() { return internal->monitorRefreshRate; } -@@ -722,14 +690,15 @@ +@@ -722,14 +833,15 @@ return pair->second; // Load font @@ -1116,7 +1248,7 @@ } internal->fontCache[filename] = font; return font; -@@ -742,14 +711,15 @@ +@@ -742,14 +854,15 @@ return pair->second; // Load image @@ -1135,7 +1267,7 @@ } internal->imageCache[filename] = image; return image; -@@ -766,28 +736,156 @@ +@@ -766,28 +879,156 @@ } diff --git a/src/override/diffs/blendish.c.diff b/src/override/diffs/blendish.c.diff index d1c1b8a0..90a2481b 100644 --- a/src/override/diffs/blendish.c.diff +++ b/src/override/diffs/blendish.c.diff @@ -1,5 +1,5 @@ ---- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 20:26:10.733413463 +0100 -+++ blendish.c 2022-09-21 20:18:50.294557597 +0100 +--- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 19:49:29.973066921 +0100 ++++ blendish.c 2022-09-21 19:41:45.883648777 +0100 @@ -61,7 +61,7 @@ } diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index 2569432c..5675f5a7 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,6 +1,6 @@ ---- ../Rack/src/common.cpp 2022-09-21 20:25:53.591040280 +0100 -+++ common.cpp 2022-09-21 20:18:50.294557597 +0100 -@@ -1,33 +1,77 @@ +--- ../Rack/src/common.cpp 2022-09-21 19:49:12.199540706 +0100 ++++ common.cpp 2022-12-02 19:11:45.780215974 +0000 +@@ -1,12 +1,57 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho @@ -42,11 +42,14 @@ #include FILE* fopen_u8(const char* filename, const char* mode) { +- return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str()); ++ if (FILE* const f = _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str())) ++ return f; + if (std::strncmp(filename, "\\\\?\\", 4) == 0 && std::getenv("CARDINAL_UNDER_WINE") != nullptr) -+ filename = "Z:\\dev\\null"; - return _wfopen(rack::string::UTF8toUTF16(filename).c_str(), rack::string::UTF8toUTF16(mode).c_str()); - } - ++ return _wfopen(L"Z:\\dev\\null", rack::string::UTF8toUTF16(mode).c_str()); ++ return nullptr; ++} ++ +#elif defined(DISTRHO_OS_WASM) +#include +#undef fopen @@ -54,10 +57,10 @@ +FILE* fopen_wasm(const char* filename, const char* mode) { + chmod(filename, 0777); + return std::fopen(filename, mode); -+} -+ - #endif + } + #endif +@@ -14,20 +59,21 @@ namespace rack { diff --git a/src/override/diffs/context.cpp.diff b/src/override/diffs/context.cpp.diff index d34fba38..8b6fa4d4 100644 --- a/src/override/diffs/context.cpp.diff +++ b/src/override/diffs/context.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/context.cpp 2022-09-21 20:25:53.591040280 +0100 -+++ context.cpp 2022-09-21 20:18:50.294557597 +0100 +--- ../Rack/src/context.cpp 2022-09-21 19:49:12.199540706 +0100 ++++ context.cpp 2022-09-21 19:41:45.883648777 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/minblep.cpp.diff b/src/override/diffs/minblep.cpp.diff index 2af153a4..5d549e80 100644 --- a/src/override/diffs/minblep.cpp.diff +++ b/src/override/diffs/minblep.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/dsp/minblep.cpp 2022-09-21 20:25:53.592040301 +0100 -+++ minblep.cpp 2022-09-21 20:18:50.295557620 +0100 +--- ../Rack/src/dsp/minblep.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ minblep.cpp 2022-09-21 19:41:45.884648820 +0100 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin diff --git a/src/override/diffs/plugin.cpp.diff b/src/override/diffs/plugin.cpp.diff index c49eb23d..2a68bf6a 100644 --- a/src/override/diffs/plugin.cpp.diff +++ b/src/override/diffs/plugin.cpp.diff @@ -1,5 +1,5 @@ ---- ../Rack/src/plugin.cpp 2022-09-21 20:25:53.592040301 +0100 -+++ plugin.cpp 2022-11-29 19:49:19.197926669 +0000 +--- ../Rack/src/plugin.cpp 2022-09-21 19:49:12.200540736 +0100 ++++ plugin.cpp 2022-11-25 18:24:09.485450570 +0000 @@ -1,342 +1,41 @@ -#include -#include From 6aedd9d2f3162399a42b24a428168935584b1d01 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 17:37:52 +0000 Subject: [PATCH 203/451] Cleanup, fix MOD builds Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 2 +- src/CardinalRemote.cpp | 25 +++++++++++++++++++------ src/CardinalUI.cpp | 2 ++ src/WindowParameters.hpp | 6 +----- src/override/Window.cpp | 38 +++++++++++++++++++++++--------------- 5 files changed, 46 insertions(+), 27 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 905cc612..85c6e9c4 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -66,7 +66,7 @@ static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount; extern const std::string CARDINAL_VERSION; namespace rack { -#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +#if CARDINAL_VARIANT_MINI || defined(HEADLESS) namespace app { rack::widget::Widget* createMenuBar() { return new rack::widget::Widget; } } diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index c1313c27..9dbb7006 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -32,11 +32,12 @@ # undef HAVE_LIBLO #endif -#ifdef HAVE_LIBLO -# include +#if (CARDINAL_VARIANT_MINI && !defined(HEADLESS)) || defined(HAVE_LIBLO) +# define CARDINAL_REMOTE_ENABLED #endif #ifdef HAVE_LIBLO +# include // # define REMOTE_HOST "localhost" # define REMOTE_HOST "192.168.51.1" #endif @@ -63,6 +64,7 @@ static int osc_handler(const char* const path, const char* const types, lo_arg** RemoteDetails* getRemote() { +#ifdef CARDINAL_REMOTE_ENABLED CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, nullptr); @@ -70,10 +72,14 @@ RemoteDetails* getRemote() DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr, nullptr); return ui->remoteDetails; +#else + return nullptr; +#endif } bool connectToRemote() { +#ifdef CARDINAL_REMOTE_ENABLED CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, false); @@ -82,7 +88,7 @@ bool connectToRemote() RemoteDetails* remoteDetails = ui->remoteDetails; -#if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI if (remoteDetails == nullptr) { ui->remoteDetails = remoteDetails = new RemoteDetails; @@ -90,7 +96,7 @@ bool connectToRemote() remoteDetails->connected = true; remoteDetails->autoDeploy = true; } -#elif defined(HAVE_LIBLO) + #elif defined(HAVE_LIBLO) if (remoteDetails == nullptr) { const lo_server oscServer = lo_server_new_with_proto(nullptr, LO_UDP, nullptr); @@ -112,9 +118,12 @@ bool connectToRemote() lo_send(addr, "/hello", ""); lo_address_free(addr); } -#endif + #endif return remoteDetails != nullptr; +#else + return false; +#endif } void disconnectFromRemote(RemoteDetails* const remote) @@ -138,6 +147,7 @@ void idleRemote(RemoteDetails* const remote) void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int paramId, float value) { +#ifdef CARDINAL_REMOTE_ENABLED #if CARDINAL_VARIANT_MINI char paramBuf[512] = {}; { @@ -153,10 +163,12 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int lo_address_free(addr); #endif +#endif } void sendFullPatchToRemote(RemoteDetails* const remote) { +#ifdef CARDINAL_REMOTE_ENABLED CardinalPluginContext* const context = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(context != nullptr,); @@ -204,11 +216,12 @@ void sendFullPatchToRemote(RemoteDetails* const remote) lo_address_free(addr); #endif +#endif } void sendScreenshotToRemote(RemoteDetails*, const char* const screenshot) { -#ifdef HAVE_LIBLO +#if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index b33ff766..6852146b 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -78,6 +78,8 @@ START_NAMESPACE_DISTRHO // -------------------------------------------------------------------------------------------------------------------- #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +uint32_t Plugin::getBufferSize() const noexcept { return 0; } +double Plugin::getSampleRate() const noexcept { return 0.0; } const char* Plugin::getBundlePath() const noexcept { return nullptr; } bool Plugin::isSelfTestInstance() const noexcept { return false; } bool Plugin::writeMidiEvent(const MidiEvent&) noexcept { return false; } diff --git a/src/WindowParameters.hpp b/src/WindowParameters.hpp index 55c28323..d8f6780f 100644 --- a/src/WindowParameters.hpp +++ b/src/WindowParameters.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -15,10 +15,6 @@ * For a full copy of the GNU General Public License see the LICENSE file. */ -#ifdef HEADLESS -# error wrong include -#endif - #pragma once #include "DistrhoUtils.hpp" diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 2591bd71..63908b7f 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -42,6 +42,21 @@ # undef DEBUG #endif +#include "DistrhoUI.hpp" +#include "Application.hpp" +#include "extra/String.hpp" +#include "../CardinalCommon.hpp" +#include "../PluginContext.hpp" +#include "../WindowParameters.hpp" + +#ifndef DGL_NO_SHARED_RESOURCES +# include "src/Resources.hpp" +#endif + +#if !(defined(DGL_USE_GLES) || CARDINAL_VARIANT_MINI) + +#define CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS + // comment out if wanting to generate a local screenshot.png #define STBI_WRITE_NO_STDIO @@ -52,15 +67,6 @@ #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" -#include "DistrhoUI.hpp" -#include "Application.hpp" -#include "extra/String.hpp" -#include "../CardinalCommon.hpp" -#include "../PluginContext.hpp" -#include "../WindowParameters.hpp" - -#ifndef DGL_NO_SHARED_RESOURCES -# include "src/Resources.hpp" #endif #ifdef DISTRHO_OS_WASM @@ -133,6 +139,7 @@ std::shared_ptr Image::load(const std::string& filename) { } +#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS enum ScreenshotStep { kScreenshotStepNone, kScreenshotStepStarted, @@ -140,6 +147,7 @@ enum ScreenshotStep { kScreenshotStepSecondPass, kScreenshotStepSaving }; +#endif struct Window::Internal { @@ -165,7 +173,7 @@ struct Window::Internal { int frame = 0; int frameSwapInterval = 1; -#ifndef DGL_USE_GLES +#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS int generateScreenshotStep = kScreenshotStepNone; #endif double monitorRefreshRate = 60.0; @@ -538,7 +546,7 @@ void Window::run() { } -#ifndef DGL_USE_GLES +#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS static void Window__flipBitmap(uint8_t* pixels, const int width, const int height, const int depth) { for (int y = 0; y < height / 2; y++) { const int flipY = height - y - 1; @@ -634,7 +642,7 @@ void Window::step() { APP->event->handleDirty(); } -#ifndef DGL_USE_GLES +#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS // Hide menu and background if generating screenshot if (internal->generateScreenshotStep == kScreenshotStepStarted) { #ifdef CARDINAL_TRANSPARENT_SCREENSHOTS @@ -684,7 +692,7 @@ void Window::step() { ++internal->frame; -#ifndef DGL_USE_GLES +#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS if (internal->generateScreenshotStep != kScreenshotStepNone) { ++internal->generateScreenshotStep; @@ -799,7 +807,7 @@ bool Window::isFullScreen() { if (emscripten_get_fullscreen_status(&status) == EMSCRIPTEN_RESULT_SUCCESS) return status.isFullscreen; return false; -#elif defined(CARDINAL_TRANSPARENT_SCREENSHOTS) && !defined(DGL_USE_GLES) +#elif defined(CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS) && defined(CARDINAL_TRANSPARENT_SCREENSHOTS) return internal->generateScreenshotStep != kScreenshotStepNone; #else return false; @@ -880,7 +888,7 @@ int& Window::fbCount() { void generateScreenshot() { -#ifndef DGL_USE_GLES +#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS APP->window->internal->generateScreenshotStep = kScreenshotStepStarted; #endif } From 3d5cca6874c3301ba7410bc9dc1b2a6603d003a4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 19:59:17 +0000 Subject: [PATCH 204/451] Fix headless build Signed-off-by: falkTX --- src/CardinalRemote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index 9dbb7006..9f5e48be 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -32,7 +32,7 @@ # undef HAVE_LIBLO #endif -#if (CARDINAL_VARIANT_MINI && !defined(HEADLESS)) || defined(HAVE_LIBLO) +#if (CARDINAL_VARIANT_MINI || defined(HAVE_LIBLO)) && !defined(HEADLESS) # define CARDINAL_REMOTE_ENABLED #endif From 73711f77a6474568c70216730c29e7a92e18a388 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 30 Dec 2022 23:06:09 +0000 Subject: [PATCH 205/451] Add enum for state indexes, define "param" for mini variant Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 85c6e9c4..b3b60d48 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -52,17 +52,27 @@ # include "extra/SharedResourcePointer.hpp" #endif -static const constexpr uint kCardinalStateBaseCount = 3; // patch, screenshot, comment - #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) # include "extra/ScopedValueSetter.hpp" # include "WindowParameters.hpp" -static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount + 2; // moduleInfos, windowSize #else # define kWindowParameterCount 0 -static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount; #endif +enum CardinalStates { + kCardinalStatePatch, + kCardinalStateScreenshot, + kCardinalStateComment, + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) + kCardinalStateModuleInfos, + kCardinalStateWindowSize, + #endif + #if CARDINAL_VARIANT_MINI + kCardinalStateParamChange, + #endif + kCardinalStateCount +}; + extern const std::string CARDINAL_VERSION; namespace rack { @@ -621,7 +631,7 @@ class CardinalPlugin : public CardinalBasePlugin { switch (index) { - case 0: + case kCardinalStatePatch: #if CARDINAL_VARIANT_MINI state.hints = kStateIsHostWritable; #else @@ -655,17 +665,18 @@ class CardinalPlugin : public CardinalBasePlugin state.key = "patch"; state.label = "Patch"; break; - case 1: + case kCardinalStateScreenshot: state.hints = kStateIsHostReadable | kStateIsBase64Blob; state.key = "screenshot"; state.label = "Screenshot"; break; - case 2: + case kCardinalStateComment: state.hints = kStateIsHostWritable; state.key = "comment"; state.label = "Comment"; break; - case 3: + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) + case kCardinalStateModuleInfos: state.hints = 0x0; #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS state.hints |= kStateIsOnlyForDSP; @@ -674,12 +685,20 @@ class CardinalPlugin : public CardinalBasePlugin state.key = "moduleInfos"; state.label = "moduleInfos"; break; - case 4: + case kCardinalStateWindowSize: state.hints = kStateIsOnlyForUI; // state.defaultValue = String("%d:%d", DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT); state.key = "windowSize"; state.label = "Window size"; break; + #endif + #if CARDINAL_VARIANT_MINI + case kCardinalStateParamChange: + state.hints = kStateIsHostReadable | kStateIsOnlyForDSP; + state.key = "param"; + state.label = "ParamChange"; + break; + #endif } } From 919e21703b6e0536c0f19747dcbfa7e7c99139b3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 11:57:39 +0000 Subject: [PATCH 206/451] Send audio input and time values to mini GUI Signed-off-by: falkTX --- plugins/Cardinal/src/HostParameters-Map.cpp | 16 +- plugins/Cardinal/src/HostParameters.cpp | 12 +- plugins/Cardinal/src/plugincontext.hpp | 4 +- src/CardinalMini/DistrhoPluginInfo.h | 4 +- src/CardinalPlugin.cpp | 526 +++++++++++++------- src/CardinalUI.cpp | 210 +++++--- src/PluginContext.hpp | 78 ++- 7 files changed, 575 insertions(+), 275 deletions(-) diff --git a/plugins/Cardinal/src/HostParameters-Map.cpp b/plugins/Cardinal/src/HostParameters-Map.cpp index edfa93c7..eed89b50 100644 --- a/plugins/Cardinal/src/HostParameters-Map.cpp +++ b/plugins/Cardinal/src/HostParameters-Map.cpp @@ -63,8 +63,8 @@ struct HostParametersMap : TerminalModule { uint8_t learningId = UINT8_MAX; CardinalPluginContext* const pcontext; - bool parametersChanged[kModuleParameters] = {}; - float parameterValues[kModuleParameters]; + bool parametersChanged[kModuleParameterCount] = {}; + float parameterValues[kModuleParameterCount]; bool bypassed = false; bool firstRun = true; uint32_t lastProcessCounter = 0; @@ -135,7 +135,7 @@ struct HostParametersMap : TerminalModule { if (isBypassed()) return; - for (uint32_t i = 0; i < kModuleParameters; ++i) + for (uint32_t i = 0; i < kModuleParameterCount; ++i) { if (d_isEqual(pcontext->parameters[i], parameterValues[i])) continue; @@ -161,7 +161,7 @@ struct HostParametersMap : TerminalModule { // Validate hostParamId const uint8_t hostParamId = mappings[id].hostParamId; - if (hostParamId >= kModuleParameters) + if (hostParamId >= kModuleParameterCount) continue; // Set filter from param value if filter is uninitialized @@ -350,7 +350,7 @@ struct ParameterIndexQuantity : Quantity { return 0; } float getMaxValue() override { - return kModuleParameters - 1; + return kModuleParameterCount - 1; } float getDefaultValue() override { return 0; @@ -360,7 +360,7 @@ struct ParameterIndexQuantity : Quantity { } void setValue(float value) override { v = math::clamp(value, getMinValue(), getMaxValue()); - mapping.hostParamId = math::clamp(static_cast(v + 0.5f), 0, kModuleParameters - 1); + mapping.hostParamId = math::clamp(static_cast(v + 0.5f), 0, kModuleParameterCount - 1); } float getDisplayValue() override { return mapping.hostParamId + 1; @@ -437,7 +437,7 @@ struct HostParametersMapChoice : CardinalLedDisplayChoice { if (ParamWidget* const touchedParam = APP->scene->rack->touchedParam) { APP->scene->rack->touchedParam = nullptr; - DISTRHO_SAFE_ASSERT_RETURN(mapping.hostParamId < kModuleParameters,); + DISTRHO_SAFE_ASSERT_RETURN(mapping.hostParamId < kModuleParameterCount,); const int64_t moduleId = touchedParam->module->id; const int paramId = touchedParam->paramId; @@ -453,7 +453,7 @@ struct HostParametersMapChoice : CardinalLedDisplayChoice { text.clear(); // mapped - if (module->mappings[id].hostParamId < kModuleParameters) + if (module->mappings[id].hostParamId < kModuleParameterCount) text += string::f("P%02d: ", module->mappings[id].hostParamId + 1); if (module->mappings[id].paramHandle.moduleId >= 0) text += getParamName(); diff --git a/plugins/Cardinal/src/HostParameters.cpp b/plugins/Cardinal/src/HostParameters.cpp index a2e57ae6..97c89122 100644 --- a/plugins/Cardinal/src/HostParameters.cpp +++ b/plugins/Cardinal/src/HostParameters.cpp @@ -28,15 +28,15 @@ struct HostParameters : TerminalModule { NUM_INPUTS }; enum OutputIds { - NUM_OUTPUTS = 24 + NUM_OUTPUTS = kModuleParameterCount }; enum LightIds { NUM_LIGHTS }; CardinalPluginContext* const pcontext; - rack::dsp::SlewLimiter parameters[kModuleParameters]; - bool parametersConnected[kModuleParameters] = {}; + rack::dsp::SlewLimiter parameters[kModuleParameterCount]; + bool parametersConnected[kModuleParameterCount] = {}; bool bypassed = false; bool smooth = true; uint32_t lastProcessCounter = 0; @@ -59,7 +59,7 @@ struct HostParameters : TerminalModule { bypassed = isBypassed(); lastProcessCounter = processCounter; - for (uint32_t i=0; iparameters[i]) @@ -89,7 +89,7 @@ struct HostParameters : TerminalModule { { const double fall = 1.0 / (double(pcontext->bufferSize) / e.sampleRate); - for (uint32_t i=0; i #include #include "CardinalCommon.hpp" @@ -54,25 +55,8 @@ #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) # include "extra/ScopedValueSetter.hpp" -# include "WindowParameters.hpp" -#else -# define kWindowParameterCount 0 #endif -enum CardinalStates { - kCardinalStatePatch, - kCardinalStateScreenshot, - kCardinalStateComment, - #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) - kCardinalStateModuleInfos, - kCardinalStateWindowSize, - #endif - #if CARDINAL_VARIANT_MINI - kCardinalStateParamChange, - #endif - kCardinalStateCount -}; - extern const std::string CARDINAL_VERSION; namespace rack { @@ -194,10 +178,13 @@ class CardinalPlugin : public CardinalBasePlugin // real values, not VCV interpreted ones float fWindowParameters[kWindowParameterCount]; #endif + #if CARDINAL_VARIANT_MINI + float fMiniReportValues[kCardinalParameterCountAtMini - kCardinalParameterStartMini]; + #endif public: CardinalPlugin() - : CardinalBasePlugin(kModuleParameters + kWindowParameterCount + 1, 0, kCardinalStateCount), + : CardinalBasePlugin(kCardinalParameterCount, 0, kCardinalStateCount), #ifdef DISTRHO_OS_WASM fInitializer(new Initializer(this, static_cast(nullptr))), #else @@ -225,6 +212,14 @@ class CardinalPlugin : public CardinalBasePlugin fWindowParameters[kWindowParameterInvertZoom] = 0.0f; fWindowParameters[kWindowParameterSqueezeModulePositions] = 1.0f; #endif + #if CARDINAL_VARIANT_MINI + std::memset(fMiniReportValues, 0, sizeof(fMiniReportValues)); + fMiniReportValues[kCardinalParameterMiniTimeBar - kCardinalParameterStartMini] = 1; + fMiniReportValues[kCardinalParameterMiniTimeBeat - kCardinalParameterStartMini] = 1; + fMiniReportValues[kCardinalParameterMiniTimeBeatsPerBar - kCardinalParameterStartMini] = 4; + fMiniReportValues[kCardinalParameterMiniTimeBeatType - kCardinalParameterStartMini] = 4; + fMiniReportValues[kCardinalParameterMiniTimeBeatsPerMinute - kCardinalParameterStartMini] = 120; + #endif // create unique temporary path for this instance try { @@ -384,17 +379,23 @@ class CardinalPlugin : public CardinalBasePlugin void initAudioPort(const bool input, uint32_t index, AudioPort& port) override { - #if CARDINAL_VARIANT_MAIN - if (index < 8) + #if CARDINAL_VARIANT_MAIN || CARDINAL_VARIANT_MINI + static_assert(CARDINAL_NUM_AUDIO_INPUTS == CARDINAL_NUM_AUDIO_OUTPUTS, "inputs == outputs"); + + if (index < CARDINAL_NUM_AUDIO_INPUTS) { + #if CARDINAL_VARIANT_MINI + port.groupId = kPortGroupStereo; + #else port.groupId = index / 2; + #endif } else { port.hints = kAudioPortIsCV | kCVPortHasPositiveUnipolarRange | kCVPortHasScaledRange | kCVPortIsOptional; - index -= 8; + index -= CARDINAL_NUM_AUDIO_INPUTS; } - #elif CARDINAL_VARIANT_MINI || CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_FX || CARDINAL_VARIANT_SYNTH + #elif CARDINAL_VARIANT_NATIVE || CARDINAL_VARIANT_FX || CARDINAL_VARIANT_SYNTH if (index < 2) port.groupId = kPortGroupStereo; #endif @@ -429,7 +430,7 @@ class CardinalPlugin : public CardinalBasePlugin void initParameter(const uint32_t index, Parameter& parameter) override { - if (index < kModuleParameters) + if (index < kCardinalParameterCountAtModules) { parameter.name = "Parameter "; parameter.name += String(index + 1); @@ -447,181 +448,326 @@ class CardinalPlugin : public CardinalBasePlugin return; } - if (index == kModuleParameters) + if (index == kCardinalParameterBypass) { parameter.initDesignation(kParameterDesignationBypass); return; } #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) - switch (index - kModuleParameters - 1) + if (index < kCardinalParameterCountAtWindow) { - case kWindowParameterShowTooltips: - parameter.name = "Show tooltips"; - parameter.symbol = "tooltips"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - parameter.ranges.def = 1.0f; + switch (index - kCardinalParameterStartWindow) + { + case kWindowParameterShowTooltips: + parameter.name = "Show tooltips"; + parameter.symbol = "tooltips"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + parameter.ranges.def = 1.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 1.0f; + break; + case kWindowParameterCableOpacity: + parameter.name = "Cable opacity"; + parameter.symbol = "cableOpacity"; + parameter.unit = "%"; + parameter.hints = kParameterIsAutomatable; + parameter.ranges.def = 50.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 100.0f; + break; + case kWindowParameterCableTension: + parameter.name = "Cable tension"; + parameter.symbol = "cableTension"; + parameter.unit = "%"; + parameter.hints = kParameterIsAutomatable; + parameter.ranges.def = 75.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 100.0f; + break; + case kWindowParameterRackBrightness: + parameter.name = "Room brightness"; + parameter.symbol = "rackBrightness"; + parameter.unit = "%"; + parameter.hints = kParameterIsAutomatable; + parameter.ranges.def = 100.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 100.0f; + break; + case kWindowParameterHaloBrightness: + parameter.name = "Light Bloom"; + parameter.symbol = "haloBrightness"; + parameter.unit = "%"; + parameter.hints = kParameterIsAutomatable; + parameter.ranges.def = 25.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 100.0f; + break; + case kWindowParameterKnobMode: + parameter.name = "Knob mode"; + parameter.symbol = "knobMode"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + parameter.ranges.def = 0.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 2.0f; + parameter.enumValues.count = 3; + parameter.enumValues.restrictedMode = true; + parameter.enumValues.values = new ParameterEnumerationValue[3]; + parameter.enumValues.values[0].label = "Linear"; + parameter.enumValues.values[0].value = 0.0f; + parameter.enumValues.values[1].label = "Absolute rotary"; + parameter.enumValues.values[1].value = 1.0f; + parameter.enumValues.values[2].label = "Relative rotary"; + parameter.enumValues.values[2].value = 2.0f; + break; + case kWindowParameterWheelKnobControl: + parameter.name = "Scroll wheel knob control"; + parameter.symbol = "knobScroll"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + parameter.ranges.def = 0.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 1.0f; + break; + case kWindowParameterWheelSensitivity: + parameter.name = "Scroll wheel knob sensitivity"; + parameter.symbol = "knobScrollSensitivity"; + parameter.hints = kParameterIsAutomatable|kParameterIsLogarithmic; + parameter.ranges.def = 1.0f; + parameter.ranges.min = 0.1f; + parameter.ranges.max = 10.0f; + break; + case kWindowParameterLockModulePositions: + parameter.name = "Lock module positions"; + parameter.symbol = "lockModules"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + parameter.ranges.def = 0.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 1.0f; + break; + case kWindowParameterUpdateRateLimit: + parameter.name = "Update rate limit"; + parameter.symbol = "rateLimit"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + parameter.ranges.def = 0.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 2.0f; + parameter.enumValues.count = 3; + parameter.enumValues.restrictedMode = true; + parameter.enumValues.values = new ParameterEnumerationValue[3]; + parameter.enumValues.values[0].label = "None"; + parameter.enumValues.values[0].value = 0.0f; + parameter.enumValues.values[1].label = "2x"; + parameter.enumValues.values[1].value = 1.0f; + parameter.enumValues.values[2].label = "4x"; + parameter.enumValues.values[2].value = 2.0f; + break; + case kWindowParameterBrowserSort: + parameter.name = "Browser sort"; + parameter.symbol = "browserSort"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + parameter.ranges.def = 3.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 5.0f; + parameter.enumValues.count = 6; + parameter.enumValues.restrictedMode = true; + parameter.enumValues.values = new ParameterEnumerationValue[6]; + parameter.enumValues.values[0].label = "Updated"; + parameter.enumValues.values[0].value = 0.0f; + parameter.enumValues.values[1].label = "Last used"; + parameter.enumValues.values[1].value = 1.0f; + parameter.enumValues.values[2].label = "Most used"; + parameter.enumValues.values[2].value = 2.0f; + parameter.enumValues.values[3].label = "Brand"; + parameter.enumValues.values[3].value = 3.0f; + parameter.enumValues.values[4].label = "Name"; + parameter.enumValues.values[4].value = 4.0f; + parameter.enumValues.values[5].label = "Random"; + parameter.enumValues.values[5].value = 5.0f; + break; + case kWindowParameterBrowserZoom: + parameter.name = "Browser zoom"; + parameter.symbol = "browserZoom"; + parameter.hints = kParameterIsAutomatable; + parameter.unit = "%"; + parameter.ranges.def = 50.0f; + parameter.ranges.min = 25.0f; + parameter.ranges.max = 200.0f; + parameter.enumValues.count = 7; + parameter.enumValues.restrictedMode = true; + parameter.enumValues.values = new ParameterEnumerationValue[7]; + parameter.enumValues.values[0].label = "25"; + parameter.enumValues.values[0].value = 25.0f; + parameter.enumValues.values[1].label = "35"; + parameter.enumValues.values[1].value = 35.0f; + parameter.enumValues.values[2].label = "50"; + parameter.enumValues.values[2].value = 50.0f; + parameter.enumValues.values[3].label = "71"; + parameter.enumValues.values[3].value = 71.0f; + parameter.enumValues.values[4].label = "100"; + parameter.enumValues.values[4].value = 100.0f; + parameter.enumValues.values[5].label = "141"; + parameter.enumValues.values[5].value = 141.0f; + parameter.enumValues.values[6].label = "200"; + parameter.enumValues.values[6].value = 200.0f; + break; + case kWindowParameterInvertZoom: + parameter.name = "Invert zoom"; + parameter.symbol = "invertZoom"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + parameter.ranges.def = 0.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 1.0f; + break; + case kWindowParameterSqueezeModulePositions: + parameter.name = "Auto-squeeze module positions"; + parameter.symbol = "squeezeModules"; + parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + parameter.ranges.def = 1.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 1.0f; + break; + } + } + #endif + + #if CARDINAL_VARIANT_MINI + switch (index) + { + case kCardinalParameterMiniAudioIn1: + parameter.name = "Report Audio Input 1"; + parameter.symbol = "r_audio_in_1"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; break; - case kWindowParameterCableOpacity: - parameter.name = "Cable opacity"; - parameter.symbol = "cableOpacity"; - parameter.unit = "%"; - parameter.hints = kParameterIsAutomatable; - parameter.ranges.def = 50.0f; + case kCardinalParameterMiniAudioIn2: + parameter.name = "Report Audio Input 2"; + parameter.symbol = "r_audio_in_2"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 100.0f; + parameter.ranges.max = 1.0f; break; - case kWindowParameterCableTension: - parameter.name = "Cable tension"; - parameter.symbol = "cableTension"; - parameter.unit = "%"; - parameter.hints = kParameterIsAutomatable; - parameter.ranges.def = 75.0f; + case kCardinalParameterMiniCVIn1: + parameter.name = "Report CV Input 1"; + parameter.symbol = "r_cv_in_1"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = -10.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 100.0f; + parameter.ranges.max = 10.0f; break; - case kWindowParameterRackBrightness: - parameter.name = "Room brightness"; - parameter.symbol = "rackBrightness"; - parameter.unit = "%"; - parameter.hints = kParameterIsAutomatable; - parameter.ranges.def = 100.0f; + case kCardinalParameterMiniCVIn2: + parameter.name = "Report CV Input 2"; + parameter.symbol = "r_cv_in_2"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = -10.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 100.0f; + parameter.ranges.max = 10.0f; break; - case kWindowParameterHaloBrightness: - parameter.name = "Light Bloom"; - parameter.symbol = "haloBrightness"; - parameter.unit = "%"; - parameter.hints = kParameterIsAutomatable; - parameter.ranges.def = 25.0f; + case kCardinalParameterMiniCVIn3: + parameter.name = "Report CV Input 3"; + parameter.symbol = "r_cv_in_3"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = -10.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 100.0f; + parameter.ranges.max = 10.0f; break; - case kWindowParameterKnobMode: - parameter.name = "Knob mode"; - parameter.symbol = "knobMode"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger; - parameter.ranges.def = 0.0f; + case kCardinalParameterMiniCVIn4: + parameter.name = "Report CV Input 4"; + parameter.symbol = "r_cv_in_4"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = -10.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 2.0f; - parameter.enumValues.count = 3; - parameter.enumValues.restrictedMode = true; - parameter.enumValues.values = new ParameterEnumerationValue[3]; - parameter.enumValues.values[0].label = "Linear"; - parameter.enumValues.values[0].value = 0.0f; - parameter.enumValues.values[1].label = "Absolute rotary"; - parameter.enumValues.values[1].value = 1.0f; - parameter.enumValues.values[2].label = "Relative rotary"; - parameter.enumValues.values[2].value = 2.0f; + parameter.ranges.max = 10.0f; break; - case kWindowParameterWheelKnobControl: - parameter.name = "Scroll wheel knob control"; - parameter.symbol = "knobScroll"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - parameter.ranges.def = 0.0f; + case kCardinalParameterMiniCVIn5: + parameter.name = "Report CV Input 5"; + parameter.symbol = "r_cv_in_5"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = -10.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 1.0f; + parameter.ranges.max = 10.0f; break; - case kWindowParameterWheelSensitivity: - parameter.name = "Scroll wheel knob sensitivity"; - parameter.symbol = "knobScrollSensitivity"; - parameter.hints = kParameterIsAutomatable|kParameterIsLogarithmic; + case kCardinalParameterMiniTimeFlags: + parameter.name = "Report Time Flags"; + parameter.symbol = "r_time_flags"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 0x0; + parameter.ranges.min = 0x0; + parameter.ranges.max = 0x7; + break; + case kCardinalParameterMiniTimeBar: + parameter.name = "Report Time Bar"; + parameter.symbol = "r_time_bar"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; parameter.ranges.def = 1.0f; - parameter.ranges.min = 0.1f; - parameter.ranges.max = 10.0f; + parameter.ranges.min = 1.0f; + parameter.ranges.max = FLT_MAX; break; - case kWindowParameterLockModulePositions: - parameter.name = "Lock module positions"; - parameter.symbol = "lockModules"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - parameter.ranges.def = 0.0f; + case kCardinalParameterMiniTimeBeat: + parameter.name = "Report Time Beat"; + parameter.symbol = "r_time_beat"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 1.0f; + parameter.ranges.min = 1.0f; + parameter.ranges.max = 128.0f; + break; + case kCardinalParameterMiniTimeBeatsPerBar: + parameter.name = "Report Time Beats Per Bar"; + parameter.symbol = "r_time_beatsPerBar"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 4.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 1.0f; + parameter.ranges.max = 128.0f; + break; + case kCardinalParameterMiniTimeBeatType: + parameter.name = "Report Time Beat Type"; + parameter.symbol = "r_time_beatType"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 4.0f; + parameter.ranges.min = 0.0f; + parameter.ranges.max = 128.0f; break; - case kWindowParameterUpdateRateLimit: - parameter.name = "Update rate limit"; - parameter.symbol = "rateLimit"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + case kCardinalParameterMiniTimeFrame: + parameter.name = "Report Time Frame"; + parameter.symbol = "r_time_frame"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 2.0f; - parameter.enumValues.count = 3; - parameter.enumValues.restrictedMode = true; - parameter.enumValues.values = new ParameterEnumerationValue[3]; - parameter.enumValues.values[0].label = "None"; - parameter.enumValues.values[0].value = 0.0f; - parameter.enumValues.values[1].label = "2x"; - parameter.enumValues.values[1].value = 1.0f; - parameter.enumValues.values[2].label = "4x"; - parameter.enumValues.values[2].value = 2.0f; + parameter.ranges.max = FLT_MAX; break; - case kWindowParameterBrowserSort: - parameter.name = "Browser sort"; - parameter.symbol = "browserSort"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger; - parameter.ranges.def = 3.0f; + case kCardinalParameterMiniTimeBarStartTick: + parameter.name = "Report Time BarStartTick"; + parameter.symbol = "r_time_barStartTick"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 5.0f; - parameter.enumValues.count = 6; - parameter.enumValues.restrictedMode = true; - parameter.enumValues.values = new ParameterEnumerationValue[6]; - parameter.enumValues.values[0].label = "Updated"; - parameter.enumValues.values[0].value = 0.0f; - parameter.enumValues.values[1].label = "Last used"; - parameter.enumValues.values[1].value = 1.0f; - parameter.enumValues.values[2].label = "Most used"; - parameter.enumValues.values[2].value = 2.0f; - parameter.enumValues.values[3].label = "Brand"; - parameter.enumValues.values[3].value = 3.0f; - parameter.enumValues.values[4].label = "Name"; - parameter.enumValues.values[4].value = 4.0f; - parameter.enumValues.values[5].label = "Random"; - parameter.enumValues.values[5].value = 5.0f; + parameter.ranges.max = FLT_MAX; break; - case kWindowParameterBrowserZoom: - parameter.name = "Browser zoom"; - parameter.symbol = "browserZoom"; - parameter.hints = kParameterIsAutomatable; - parameter.unit = "%"; - parameter.ranges.def = 50.0f; - parameter.ranges.min = 25.0f; - parameter.ranges.max = 200.0f; - parameter.enumValues.count = 7; - parameter.enumValues.restrictedMode = true; - parameter.enumValues.values = new ParameterEnumerationValue[7]; - parameter.enumValues.values[0].label = "25"; - parameter.enumValues.values[0].value = 25.0f; - parameter.enumValues.values[1].label = "35"; - parameter.enumValues.values[1].value = 35.0f; - parameter.enumValues.values[2].label = "50"; - parameter.enumValues.values[2].value = 50.0f; - parameter.enumValues.values[3].label = "71"; - parameter.enumValues.values[3].value = 71.0f; - parameter.enumValues.values[4].label = "100"; - parameter.enumValues.values[4].value = 100.0f; - parameter.enumValues.values[5].label = "141"; - parameter.enumValues.values[5].value = 141.0f; - parameter.enumValues.values[6].label = "200"; - parameter.enumValues.values[6].value = 200.0f; + case kCardinalParameterMiniTimeBeatsPerMinute: + parameter.name = "Report Time Beats Per Minute"; + parameter.symbol = "r_time_bpm"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 20.0f; + parameter.ranges.min = 120.0f; + parameter.ranges.max = 999.0f; break; - case kWindowParameterInvertZoom: - parameter.name = "Invert zoom"; - parameter.symbol = "invertZoom"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + case kCardinalParameterMiniTimeTick: + parameter.name = "Report Time Tick"; + parameter.symbol = "r_time_tick"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 1.0f; + parameter.ranges.max = 8192.0f; break; - case kWindowParameterSqueezeModulePositions: - parameter.name = "Auto-squeeze module positions"; - parameter.symbol = "squeezeModules"; - parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - parameter.ranges.def = 1.0f; + case kCardinalParameterMiniTimeTicksPerBeat: + parameter.name = "Report Time Ticks Per Beat"; + parameter.symbol = "r_time_ticksPerBeat"; + parameter.hints = kParameterIsAutomatable|kParameterIsOutput; + parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; - parameter.ranges.max = 1.0f; + parameter.ranges.max = 8192.0f; break; } #endif @@ -708,19 +854,21 @@ class CardinalPlugin : public CardinalBasePlugin float getParameterValue(uint32_t index) const override { // host mapped parameters - if (index < kModuleParameters) + if (index < kCardinalParameterCountAtModules) return context->parameters[index]; // bypass - if (index == kModuleParameters) + if (index == kCardinalParameterBypass) return context->bypassed ? 1.0f : 0.0f; #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) - // window related parameters - index -= kModuleParameters + 1; + if (index < kCardinalParameterCountAtWindow) + return fWindowParameters[index - kCardinalParameterStartWindow]; + #endif - if (index < kWindowParameterCount) - return fWindowParameters[index]; + #if CARDINAL_VARIANT_MINI + if (index < kCardinalParameterCountAtMini) + return fMiniReportValues[index - kCardinalParameterStartMini]; #endif return 0.0f; @@ -729,26 +877,23 @@ class CardinalPlugin : public CardinalBasePlugin void setParameterValue(uint32_t index, float value) override { // host mapped parameters - if (index < kModuleParameters) + if (index < kCardinalParameterCountAtModules) { context->parameters[index] = value; return; } // bypass - if (index == kModuleParameters) + if (index == kCardinalParameterBypass) { context->bypassed = value > 0.5f; return; } #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) - // window related parameters - index -= kModuleParameters + 1; - - if (index < kWindowParameterCount) + if (index < kCardinalParameterCountAtWindow) { - fWindowParameters[index] = value; + fWindowParameters[index - kCardinalParameterStartWindow] = value; return; } #endif @@ -1044,10 +1189,28 @@ class CardinalPlugin : public CardinalBasePlugin context->ticksPerClock = timePos.bbt.ticksPerBeat / timePos.bbt.beatType; context->ticksPerFrame = 1.0 / samplesPerTick; context->tickClock = std::fmod(timePos.bbt.tick, context->ticksPerClock); + #if CARDINAL_VARIANT_MINI + fMiniReportValues[kCardinalParameterMiniTimeBar - kCardinalParameterStartMini] = timePos.bbt.bar; + fMiniReportValues[kCardinalParameterMiniTimeBeat - kCardinalParameterStartMini] = timePos.bbt.beat; + fMiniReportValues[kCardinalParameterMiniTimeBeatsPerBar - kCardinalParameterStartMini] = timePos.bbt.beatsPerBar; + fMiniReportValues[kCardinalParameterMiniTimeBeatType - kCardinalParameterStartMini] = timePos.bbt.beatType; + fMiniReportValues[kCardinalParameterMiniTimeBarStartTick - kCardinalParameterStartMini] = timePos.bbt.barStartTick; + fMiniReportValues[kCardinalParameterMiniTimeBeatsPerMinute - kCardinalParameterStartMini] = timePos.bbt.beatsPerMinute; + fMiniReportValues[kCardinalParameterMiniTimeTick - kCardinalParameterStartMini] = timePos.bbt.tick; + fMiniReportValues[kCardinalParameterMiniTimeTicksPerBeat - kCardinalParameterStartMini] = timePos.bbt.ticksPerBeat; + #endif } context->reset = reset; fNextExpectedFrame = timePos.playing ? timePos.frame + frames : 0; + + #if CARDINAL_VARIANT_MINI + const int flags = (timePos.playing ? 0x1 : 0x0) + | (timePos.bbt.valid ? 0x2 : 0x0) + | (reset ? 0x4 : 0x0); + fMiniReportValues[kCardinalParameterMiniTimeFlags - kCardinalParameterStartMini] = flags; + fMiniReportValues[kCardinalParameterMiniTimeFrame - kCardinalParameterStartMini] = timePos.frame / getSampleRate(); + #endif } // separate buffers, use them @@ -1062,8 +1225,8 @@ class CardinalPlugin : public CardinalBasePlugin #if DISTRHO_PLUGIN_NUM_INPUTS != 0 for (int i=0; idataIns[i][0]; + #endif + if (bypassed) { if (fWasBypassed != bypassed) diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 6852146b..7bacf2b9 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -704,7 +704,7 @@ class CardinalUI : public CardinalBaseUI, return; } - setParameterValue(kModuleParameters + param + 1, value * mult); + setParameterValue(kCardinalParameterStartWindow + param, value * mult); } protected: @@ -718,7 +718,7 @@ class CardinalUI : public CardinalBaseUI, void parameterChanged(const uint32_t index, const float value) override { // host mapped parameters - if (index < kModuleParameters) + if (index < kCardinalParameterCountAtModules) { #if CARDINAL_VARIANT_MINI context->parameters[index] = value; @@ -727,7 +727,7 @@ class CardinalUI : public CardinalBaseUI, } // bypass - if (index == kModuleParameters) + if (index == kCardinalParameterBypass) { #if CARDINAL_VARIANT_MINI context->bypassed = value > 0.5f; @@ -735,89 +735,147 @@ class CardinalUI : public CardinalBaseUI, return; } - switch (index - kModuleParameters - 1) + if (index < kCardinalParameterCountAtWindow) { - case kWindowParameterShowTooltips: - windowParameters.tooltips = value > 0.5f; - break; - case kWindowParameterCableOpacity: - windowParameters.cableOpacity = value / 100.0f; - break; - case kWindowParameterCableTension: - windowParameters.cableTension = value / 100.0f; - break; - case kWindowParameterRackBrightness: - windowParameters.rackBrightness = value / 100.0f; - break; - case kWindowParameterHaloBrightness: - windowParameters.haloBrightness = value / 100.0f; - break; - case kWindowParameterKnobMode: - switch (static_cast(value + 0.5f)) + switch (index - kCardinalParameterStartWindow) { - case 0: - windowParameters.knobMode = rack::settings::KNOB_MODE_LINEAR; + case kWindowParameterShowTooltips: + windowParameters.tooltips = value > 0.5f; break; - case 1: - windowParameters.knobMode = rack::settings::KNOB_MODE_ROTARY_ABSOLUTE; + case kWindowParameterCableOpacity: + windowParameters.cableOpacity = value / 100.0f; break; - case 2: - windowParameters.knobMode = rack::settings::KNOB_MODE_ROTARY_RELATIVE; + case kWindowParameterCableTension: + windowParameters.cableTension = value / 100.0f; break; + case kWindowParameterRackBrightness: + windowParameters.rackBrightness = value / 100.0f; + break; + case kWindowParameterHaloBrightness: + windowParameters.haloBrightness = value / 100.0f; + break; + case kWindowParameterKnobMode: + switch (static_cast(value + 0.5f)) + { + case 0: + windowParameters.knobMode = rack::settings::KNOB_MODE_LINEAR; + break; + case 1: + windowParameters.knobMode = rack::settings::KNOB_MODE_ROTARY_ABSOLUTE; + break; + case 2: + windowParameters.knobMode = rack::settings::KNOB_MODE_ROTARY_RELATIVE; + break; + } + break; + case kWindowParameterWheelKnobControl: + windowParameters.knobScroll = value > 0.5f; + break; + case kWindowParameterWheelSensitivity: + windowParameters.knobScrollSensitivity = value / 1000.0f; + break; + case kWindowParameterLockModulePositions: + windowParameters.lockModules = value > 0.5f; + break; + case kWindowParameterUpdateRateLimit: + windowParameters.rateLimit = static_cast(value + 0.5f); + rateLimitStep = 0; + break; + case kWindowParameterBrowserSort: + windowParameters.browserSort = static_cast(value + 0.5f); + break; + case kWindowParameterBrowserZoom: + // round up to nearest valid value + { + float rvalue = value - 1.0f; + + if (rvalue <= 25.0f) + rvalue = -2.0f; + else if (rvalue <= 35.0f) + rvalue = -1.5f; + else if (rvalue <= 50.0f) + rvalue = -1.0f; + else if (rvalue <= 71.0f) + rvalue = -0.5f; + else if (rvalue <= 100.0f) + rvalue = 0.0f; + else if (rvalue <= 141.0f) + rvalue = 0.5f; + else if (rvalue <= 200.0f) + rvalue = 1.0f; + else + rvalue = 0.0f; + + windowParameters.browserZoom = rvalue; + } + break; + case kWindowParameterInvertZoom: + windowParameters.invertZoom = value > 0.5f; + break; + case kWindowParameterSqueezeModulePositions: + windowParameters.squeezeModules = value > 0.5f; + break; + default: + return; } - break; - case kWindowParameterWheelKnobControl: - windowParameters.knobScroll = value > 0.5f; - break; - case kWindowParameterWheelSensitivity: - windowParameters.knobScrollSensitivity = value / 1000.0f; - break; - case kWindowParameterLockModulePositions: - windowParameters.lockModules = value > 0.5f; - break; - case kWindowParameterUpdateRateLimit: - windowParameters.rateLimit = static_cast(value + 0.5f); - rateLimitStep = 0; - break; - case kWindowParameterBrowserSort: - windowParameters.browserSort = static_cast(value + 0.5f); - break; - case kWindowParameterBrowserZoom: - // round up to nearest valid value - { - float rvalue = value - 1.0f; - - if (rvalue <= 25.0f) - rvalue = -2.0f; - else if (rvalue <= 35.0f) - rvalue = -1.5f; - else if (rvalue <= 50.0f) - rvalue = -1.0f; - else if (rvalue <= 71.0f) - rvalue = -0.5f; - else if (rvalue <= 100.0f) - rvalue = 0.0f; - else if (rvalue <= 141.0f) - rvalue = 0.5f; - else if (rvalue <= 200.0f) - rvalue = 1.0f; - else - rvalue = 0.0f; - windowParameters.browserZoom = rvalue; - } - break; - case kWindowParameterInvertZoom: - windowParameters.invertZoom = value > 0.5f; - break; - case kWindowParameterSqueezeModulePositions: - windowParameters.squeezeModules = value > 0.5f; - break; - default: + WindowParametersSetValues(context->window, windowParameters); + return; + } + + #if CARDINAL_VARIANT_MINI + if (index < kCardinalParameterCountAtMiniBuffers) + { + float* const buffer = *const_cast(&context->dataIns[index - kCardinalParameterStartMiniBuffers]); + buffer[0] = value; return; } - WindowParametersSetValues(context->window, windowParameters); + switch (index) + { + case kCardinalParameterMiniTimeFlags: { + const int32_t flags = static_cast(value + 0.5f); + context->playing = flags & 0x1; + context->bbtValid = flags & 0x2; + context->reset = flags & 0x4; + return; + } + case kCardinalParameterMiniTimeBar: + context->bar = static_cast(value + 0.5f); + return; + case kCardinalParameterMiniTimeBeat: + context->beat = static_cast(value + 0.5f); + return; + case kCardinalParameterMiniTimeBeatsPerBar: + context->beatsPerBar = static_cast(value + 0.5f); + return; + case kCardinalParameterMiniTimeBeatType: + context->beatType = static_cast(value + 0.5f); + context->ticksPerClock = context->ticksPerBeat / context->beatType; + context->tickClock = std::fmod(context->tick, context->ticksPerClock); + return; + case kCardinalParameterMiniTimeFrame: + context->frame = static_cast(value * context->sampleRate + 0.5f); + return; + case kCardinalParameterMiniTimeBarStartTick: + context->barStartTick = value; + return; + case kCardinalParameterMiniTimeBeatsPerMinute: + context->beatsPerMinute = value; + context->ticksPerFrame = 1.0 / (60.0 * context->sampleRate / context->beatsPerMinute / context->ticksPerBeat); + return; + case kCardinalParameterMiniTimeTick: + context->tick = value; + context->tickClock = std::fmod(context->tick, context->ticksPerClock); + return; + case kCardinalParameterMiniTimeTicksPerBeat: + context->ticksPerBeat = value; + context->ticksPerClock = context->ticksPerBeat / context->beatType; + context->ticksPerFrame = 1.0 / (60.0 * context->sampleRate / context->beatsPerMinute / context->ticksPerBeat); + context->tickClock = std::fmod(context->tick, context->ticksPerClock); + return; + } + #endif } void stateChanged(const char* const key, const char* const value) override diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 1217c690..6a4db834 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -28,6 +28,12 @@ #include "CardinalRemote.hpp" #include "DistrhoPlugin.hpp" +#if CARDINAL_VARIANT_MINI || !defined(HEADLESS) +# include "WindowParameters.hpp" +#else +# define kWindowParameterCount 0 +#endif + #ifndef HEADLESS # include "DistrhoUI.hpp" #else @@ -43,7 +49,7 @@ START_NAMESPACE_DISTRHO // ----------------------------------------------------------------------------------------------------------- -static constexpr const uint kModuleParameters = 24; +static constexpr const uint kModuleParameterCount = 24; enum CardinalVariant { kCardinalVariantMain, @@ -53,6 +59,74 @@ enum CardinalVariant { kCardinalVariantSynth, }; +enum CardinalParameters { + kCardinalParameterCountAtModules = kModuleParameterCount, + kCardinalParameterBypass = kCardinalParameterCountAtModules, + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) + kCardinalParameterStartWindow, + kCardinalParameterCountAtWindow = kCardinalParameterStartWindow + kWindowParameterCount, + #if CARDINAL_VARIANT_MINI + kCardinalParameterStartMini = kCardinalParameterCountAtWindow, + kCardinalParameterStartMiniBuffers = kCardinalParameterStartMini, + kCardinalParameterMiniAudioIn1 = kCardinalParameterStartMiniBuffers, + kCardinalParameterMiniAudioIn2, + kCardinalParameterMiniCVIn1, + kCardinalParameterMiniCVIn2, + kCardinalParameterMiniCVIn3, + kCardinalParameterMiniCVIn4, + kCardinalParameterMiniCVIn5, + kCardinalParameterCountAtMiniBuffers, + kCardinalParameterStartMiniTime = kCardinalParameterCountAtMiniBuffers, + kCardinalParameterMiniTimeFlags = kCardinalParameterStartMiniTime, + kCardinalParameterMiniTimeBar, + kCardinalParameterMiniTimeBeat, + kCardinalParameterMiniTimeBeatsPerBar, + kCardinalParameterMiniTimeBeatType, + kCardinalParameterMiniTimeFrame, + kCardinalParameterMiniTimeBarStartTick, + kCardinalParameterMiniTimeBeatsPerMinute, + kCardinalParameterMiniTimeTick, + kCardinalParameterMiniTimeTicksPerBeat, + kCardinalParameterCountAtMiniTime, + kCardinalParameterCountAtMini = kCardinalParameterCountAtMiniTime, + kCardinalParameterCount = kCardinalParameterCountAtMini + #else + kCardinalParameterCount = kCardinalParameterCountAtWindow + #endif + #else + kCardinalParameterCount + #endif +}; + +enum CardinalStates { + kCardinalStatePatch, + kCardinalStateScreenshot, + kCardinalStateComment, + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) + kCardinalStateModuleInfos, + kCardinalStateWindowSize, + #endif + #if CARDINAL_VARIANT_MINI + kCardinalStateParamChange, + #endif + kCardinalStateCount +}; + +static_assert(kCardinalParameterBypass == kModuleParameterCount, "valid parameter indexes"); +#if CARDINAL_VARIANT_MINI || !defined(HEADLESS) +static_assert(kCardinalParameterStartWindow == kModuleParameterCount + 1, "valid parameter indexes"); +static_assert(kCardinalParameterStartWindow == kCardinalParameterBypass + 1, "valid parameter indexes"); +static_assert(kCardinalParameterCountAtWindow == kModuleParameterCount + kWindowParameterCount + 1, "valid parameter indexes"); +#endif +#if CARDINAL_VARIANT_MINI +static_assert(0 == kCardinalParameterStartMini - kCardinalParameterMiniAudioIn1, "valid parameter indexes"); +static_assert(kCardinalParameterStartMini == kCardinalParameterCountAtWindow, "valid parameter indexes"); +static_assert(kCardinalParameterStartMini == kCardinalParameterBypass + kWindowParameterCount + 1, "valid parameter indexes"); +static_assert(kCardinalParameterStartMini == kModuleParameterCount + kWindowParameterCount + 1, "valid parameter indexes"); +static_assert(kCardinalParameterCountAtWindow == kModuleParameterCount + kWindowParameterCount + 1, "valid parameter indexes"); +static_assert(DISTRHO_PLUGIN_NUM_INPUTS == kCardinalParameterCountAtMiniBuffers - kCardinalParameterStartMiniBuffers, "valid parameter indexes"); +#endif + class UI; // ----------------------------------------------------------------------------------------------------------- @@ -60,7 +134,7 @@ class UI; struct CardinalPluginContext : rack::Context { uint32_t bufferSize, processCounter; double sampleRate; - float parameters[kModuleParameters]; + float parameters[kModuleParameterCount]; CardinalVariant variant; bool bypassed, playing, reset, bbtValid; int32_t bar, beat, beatsPerBar, beatType; From 45022608ab093bf99b96262a13f0ce086326342f Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 12:46:25 +0000 Subject: [PATCH 207/451] Make Host CV work for mini variant, hide unused jacks Signed-off-by: falkTX --- plugins/Cardinal/src/HostAudio.cpp | 16 ++- plugins/Cardinal/src/HostCV.cpp | 170 +++++++++++++++++-------- plugins/Cardinal/src/ModuleWidgets.hpp | 12 +- src/CardinalUI.cpp | 8 +- 4 files changed, 145 insertions(+), 61 deletions(-) diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index 7bc15b1e..acaf610f 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -313,19 +313,23 @@ struct HostAudio8 : HostAudio<8> { template struct HostAudioWidget : ModuleWidgetWith8HP { HostAudio* const module; + CardinalPluginContext* const pcontext; HostAudioWidget(HostAudio* const m) - : module(m) + : module(m), + pcontext(static_cast(APP)) { setModule(m); setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/HostAudio.svg"))); createAndAddScrews(); + const uint8_t ioCount = pcontext->variant == kCardinalVariantMain ? 8 : 2; + for (uint i=0; i { void draw(const DrawArgs& args) override { + const uint8_t ioCount = pcontext->variant == kCardinalVariantMain ? 8 : 2; + drawBackground(args.vg); - drawOutputJacksArea(args.vg, 8); + drawOutputJacksArea(args.vg, ioCount); setupTextLines(args.vg); - for (int i=0; i<8; ++i) + for (int i=0; i('0'+i+1),'\0'}; drawTextLine(args.vg, i, text); diff --git a/plugins/Cardinal/src/HostCV.cpp b/plugins/Cardinal/src/HostCV.cpp index 1be4141c..cf373f76 100644 --- a/plugins/Cardinal/src/HostCV.cpp +++ b/plugins/Cardinal/src/HostCV.cpp @@ -18,8 +18,6 @@ #include "plugincontext.hpp" #include "ModuleWidgets.hpp" -#define CARDINAL_AUDIO_IO_OFFSET 8 - // ----------------------------------------------------------------------------------------------------------- USE_NAMESPACE_DISTRHO; @@ -54,17 +52,28 @@ struct HostCV : TerminalModule { throw rack::Exception("Plugin context is null"); config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - configParam(BIPOLAR_INPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Inputs 1-5")->randomizeEnabled = false; + + if (pcontext->variant == kCardinalVariantMini) + { + configParam(BIPOLAR_INPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Inputs")->randomizeEnabled = false; + configParam(BIPOLAR_OUTPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Outputs")->randomizeEnabled = false; + } + else + { + configParam(BIPOLAR_INPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Inputs 1-5")->randomizeEnabled = false; + configParam(BIPOLAR_OUTPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Outputs 1-5")->randomizeEnabled = false; + } + configParam(BIPOLAR_INPUTS_6_10, 0.f, 1.f, 0.f, "Bipolar Inputs 6-10")->randomizeEnabled = false; - configParam(BIPOLAR_OUTPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Outputs 1-5")->randomizeEnabled = false; configParam(BIPOLAR_OUTPUTS_6_10, 0.f, 1.f, 0.f, "Bipolar Outputs 6-10")->randomizeEnabled = false; } void processTerminalInput(const ProcessArgs&) override { - if (pcontext->variant != kCardinalVariantMain) + if (pcontext->variant != kCardinalVariantMain && pcontext->variant != kCardinalVariantMini) return; + const uint8_t ioOffset = pcontext->variant == kCardinalVariantMini ? 2 : 8; const uint32_t bufferSize = pcontext->bufferSize; const uint32_t processCounter = pcontext->processCounter; @@ -87,27 +96,38 @@ struct HostCV : TerminalModule { } else if (const float* const* const dataIns = pcontext->dataIns) { - if (dataIns[CARDINAL_AUDIO_IO_OFFSET] == nullptr) + if (dataIns[ioOffset] == nullptr) return; float outputOffset; - outputOffset = params[BIPOLAR_OUTPUTS_1_5].getValue() > 0.1f ? 5.0f : 0.0f; + outputOffset = params[BIPOLAR_OUTPUTS_1_5].getValue() > 0.1f ? 5.f : 0.f; for (int i=0; i<5; ++i) - outputs[i].setVoltage(dataIns[i+CARDINAL_AUDIO_IO_OFFSET][k] - outputOffset); - - outputOffset = params[BIPOLAR_OUTPUTS_6_10].getValue() > 0.1f ? 5.0f : 0.0f; - - for (int i=5; i<10; ++i) - outputs[i].setVoltage(dataIns[i+CARDINAL_AUDIO_IO_OFFSET][k] - outputOffset); + outputs[i].setVoltage(dataIns[i+ioOffset][k] - outputOffset); + + if (pcontext->variant == kCardinalVariantMain) + { + outputOffset = params[BIPOLAR_OUTPUTS_6_10].getValue() > 0.1f ? 5.f : 0.f; + + for (int i=5; i<10; ++i) + outputs[i].setVoltage(dataIns[i+ioOffset][k] - outputOffset); + } + else + { + for (int i=5; i<10; ++i) + outputs[i].setVoltage(0.f); + } } } void processTerminalOutput(const ProcessArgs&) override { - if (pcontext->variant != kCardinalVariantMain || pcontext->bypassed) + if (pcontext->variant != kCardinalVariantMain && pcontext->variant != kCardinalVariantMini) + return; + if (pcontext->bypassed) return; + const uint8_t ioOffset = pcontext->variant == kCardinalVariantMini ? 2 : 8; const uint32_t bufferSize = pcontext->bufferSize; // only incremented on output @@ -119,54 +139,87 @@ struct HostCV : TerminalModule { float** const dataOuts = pcontext->dataOuts; - if (dataOuts[CARDINAL_AUDIO_IO_OFFSET] == nullptr) + if (dataOuts[ioOffset] == nullptr) return; float inputOffset; inputOffset = params[BIPOLAR_INPUTS_1_5].getValue() > 0.1f ? 5.0f : 0.0f; for (int i=0; i<5; ++i) - dataOuts[i+CARDINAL_AUDIO_IO_OFFSET][k] += inputs[i].getVoltage() + inputOffset; + dataOuts[i+ioOffset][k] += inputs[i].getVoltage() + inputOffset; - inputOffset = params[BIPOLAR_INPUTS_6_10].getValue() > 0.1f ? 5.0f : 0.0f; + if (pcontext->variant == kCardinalVariantMain) + { + inputOffset = params[BIPOLAR_INPUTS_6_10].getValue() > 0.1f ? 5.0f : 0.0f; - for (int i=5; i<10; ++i) - dataOuts[i+CARDINAL_AUDIO_IO_OFFSET][k] += inputs[i].getVoltage() + inputOffset; + for (int i=5; i<10; ++i) + dataOuts[i+ioOffset][k] += inputs[i].getVoltage() + inputOffset; + } } }; #ifndef HEADLESS struct HostCVWidget : ModuleWidgetWith8HP { + CardinalPluginContext* const pcontext; + HostCVWidget(HostCV* const module) + : pcontext(static_cast(APP)) { setModule(module); setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/HostCV.svg"))); createAndAddScrews(); + uint8_t maxVisible; + switch (pcontext->variant) + { + case kCardinalVariantMain: + maxVisible = HostCV::NUM_INPUTS; + break; + case kCardinalVariantMini: + maxVisible = 5; + break; + default: + maxVisible = 0; + break; + } + for (uint i=0; ivariant != kCardinalVariantMain && pcontext->variant != kCardinalVariantMini) + return; + + drawOutputJacksArea(args.vg, pcontext->variant == kCardinalVariantMini ? 5 : HostCV::NUM_INPUTS); setupTextLines(args.vg); - drawTextLine(args.vg, 0, "CV 1"); - drawTextLine(args.vg, 1, "CV 2"); - drawTextLine(args.vg, 2, "CV 3"); - drawTextLine(args.vg, 3, "CV 4"); - drawTextLine(args.vg, 4, "CV 5"); - drawTextLine(args.vg, 5, "CV 6"); - drawTextLine(args.vg, 6, "CV 7"); - drawTextLine(args.vg, 7, "CV 8"); - drawTextLine(args.vg, 8, "CV 9"); - drawTextLine(args.vg, 9, "CV 10"); + switch (pcontext->variant) + { + case kCardinalVariantMain: + drawTextLine(args.vg, 5, "CV 6"); + drawTextLine(args.vg, 6, "CV 7"); + drawTextLine(args.vg, 7, "CV 8"); + drawTextLine(args.vg, 8, "CV 9"); + drawTextLine(args.vg, 9, "CV 10"); + // fall through + case kCardinalVariantMini: + drawTextLine(args.vg, 0, "CV 1"); + drawTextLine(args.vg, 1, "CV 2"); + drawTextLine(args.vg, 2, "CV 3"); + drawTextLine(args.vg, 3, "CV 4"); + drawTextLine(args.vg, 4, "CV 5"); + break; + default: + break; + } ModuleWidgetWith8HP::draw(args); } @@ -175,25 +228,40 @@ struct HostCVWidget : ModuleWidgetWith8HP { { menu->addChild(new ui::MenuSeparator); - menu->addChild(createCheckMenuItem("Bipolar Inputs 1-5", "", - [=]() {return module->params[HostCV::BIPOLAR_INPUTS_1_5].getValue() > 0.1f;}, - [=]() {module->params[HostCV::BIPOLAR_INPUTS_1_5].setValue(1.0f - module->params[HostCV::BIPOLAR_INPUTS_1_5].getValue());} - )); - - menu->addChild(createCheckMenuItem("Bipolar Inputs 6-10", "", - [=]() {return module->params[HostCV::BIPOLAR_INPUTS_6_10].getValue() > 0.1f;}, - [=]() {module->params[HostCV::BIPOLAR_INPUTS_6_10].setValue(1.0f - module->params[HostCV::BIPOLAR_INPUTS_6_10].getValue());} - )); - - menu->addChild(createCheckMenuItem("Bipolar Outputs 1-5", "", - [=]() {return module->params[HostCV::BIPOLAR_OUTPUTS_1_5].getValue() > 0.1f;}, - [=]() {module->params[HostCV::BIPOLAR_OUTPUTS_1_5].setValue(1.0f - module->params[HostCV::BIPOLAR_OUTPUTS_1_5].getValue());} - )); - - menu->addChild(createCheckMenuItem("Bipolar Outputs 6-10", "", - [=]() {return module->params[HostCV::BIPOLAR_OUTPUTS_6_10].getValue() > 0.1f;}, - [=]() {module->params[HostCV::BIPOLAR_OUTPUTS_6_10].setValue(1.0f - module->params[HostCV::BIPOLAR_OUTPUTS_6_10].getValue());} - )); + if (pcontext->variant == kCardinalVariantMini) + { + menu->addChild(createCheckMenuItem("Bipolar Inputs", "", + [=]() {return module->params[HostCV::BIPOLAR_INPUTS_1_5].getValue() > 0.1f;}, + [=]() {module->params[HostCV::BIPOLAR_INPUTS_1_5].setValue(1.0f - module->params[HostCV::BIPOLAR_INPUTS_1_5].getValue());} + )); + + menu->addChild(createCheckMenuItem("Bipolar Outputs", "", + [=]() {return module->params[HostCV::BIPOLAR_OUTPUTS_1_5].getValue() > 0.1f;}, + [=]() {module->params[HostCV::BIPOLAR_OUTPUTS_1_5].setValue(1.0f - module->params[HostCV::BIPOLAR_OUTPUTS_1_5].getValue());} + )); + } + else + { + menu->addChild(createCheckMenuItem("Bipolar Inputs 1-5", "", + [=]() {return module->params[HostCV::BIPOLAR_INPUTS_1_5].getValue() > 0.1f;}, + [=]() {module->params[HostCV::BIPOLAR_INPUTS_1_5].setValue(1.0f - module->params[HostCV::BIPOLAR_INPUTS_1_5].getValue());} + )); + + menu->addChild(createCheckMenuItem("Bipolar Inputs 6-10", "", + [=]() {return module->params[HostCV::BIPOLAR_INPUTS_6_10].getValue() > 0.1f;}, + [=]() {module->params[HostCV::BIPOLAR_INPUTS_6_10].setValue(1.0f - module->params[HostCV::BIPOLAR_INPUTS_6_10].getValue());} + )); + + menu->addChild(createCheckMenuItem("Bipolar Outputs 1-5", "", + [=]() {return module->params[HostCV::BIPOLAR_OUTPUTS_1_5].getValue() > 0.1f;}, + [=]() {module->params[HostCV::BIPOLAR_OUTPUTS_1_5].setValue(1.0f - module->params[HostCV::BIPOLAR_OUTPUTS_1_5].getValue());} + )); + + menu->addChild(createCheckMenuItem("Bipolar Outputs 6-10", "", + [=]() {return module->params[HostCV::BIPOLAR_OUTPUTS_6_10].getValue() > 0.1f;}, + [=]() {module->params[HostCV::BIPOLAR_OUTPUTS_6_10].setValue(1.0f - module->params[HostCV::BIPOLAR_OUTPUTS_6_10].getValue());} + )); + } } }; #else diff --git a/plugins/Cardinal/src/ModuleWidgets.hpp b/plugins/Cardinal/src/ModuleWidgets.hpp index 9a3f1ed6..4cf46fed 100644 --- a/plugins/Cardinal/src/ModuleWidgets.hpp +++ b/plugins/Cardinal/src/ModuleWidgets.hpp @@ -37,16 +37,20 @@ struct ModuleWidgetWithSideScrews : ModuleWidget { createAndAddInput(paramId, paramId); } - void createAndAddInput(const uint posY, const uint paramId) { - addInput(createInput(Vec(startX_In, startY + padding * posY), module, paramId)); + void createAndAddInput(const uint posY, const uint paramId, bool visible = true) { + PortWidget* const widget = createInput(Vec(startX_In, startY + padding * posY), module, paramId); + widget->visible = visible; + addInput(widget); } void createAndAddOutput(const uint paramId) { createAndAddOutput(paramId, paramId); } - void createAndAddOutput(const uint posY, const uint paramId) { - addOutput(createOutput(Vec(startX_Out, startY + padding * posY), module, paramId)); + void createAndAddOutput(const uint posY, const uint paramId, bool visible = true) { + PortWidget* const widget = createOutput(Vec(startX_Out, startY + padding * posY), module, paramId); + widget->visible = visible; + addOutput(widget); } void createAndAddScrews() { diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 7bacf2b9..764cf0ef 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -375,7 +375,11 @@ class CardinalUI : public CardinalBaseUI, context->dataOuts = new float*[DISTRHO_PLUGIN_NUM_OUTPUTS]; for (uint32_t i=0; i(&context->dataIns[i]) = new float[1]; + { + float** const bufferptr = const_cast(&context->dataIns[i]); + *bufferptr = new float[1]; + (*bufferptr)[0] = 0.f; + } for (uint32_t i=0; idataOuts[i] = new float[1]; @@ -619,6 +623,8 @@ class CardinalUI : public CardinalBaseUI, #if CARDINAL_VARIANT_MINI { const ScopedContext sc(this); + for (uint32_t i=0; idataOuts[i][0] = 0.f; ++context->processCounter; context->engine->stepBlock(1); } From 88b6c387b6e09f1e7f0917155be061e1e9954b8a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 14:20:13 +0000 Subject: [PATCH 208/451] Fix display of host cv in non main/mini variant Signed-off-by: falkTX --- plugins/Cardinal/src/HostCV.cpp | 46 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/plugins/Cardinal/src/HostCV.cpp b/plugins/Cardinal/src/HostCV.cpp index cf373f76..be9c1101 100644 --- a/plugins/Cardinal/src/HostCV.cpp +++ b/plugins/Cardinal/src/HostCV.cpp @@ -195,30 +195,30 @@ struct HostCVWidget : ModuleWidgetWith8HP { { drawBackground(args.vg); - if (pcontext->variant != kCardinalVariantMain && pcontext->variant != kCardinalVariantMini) - return; - - drawOutputJacksArea(args.vg, pcontext->variant == kCardinalVariantMini ? 5 : HostCV::NUM_INPUTS); - setupTextLines(args.vg); - - switch (pcontext->variant) + if (pcontext->variant == kCardinalVariantMain || pcontext->variant == kCardinalVariantMini) { - case kCardinalVariantMain: - drawTextLine(args.vg, 5, "CV 6"); - drawTextLine(args.vg, 6, "CV 7"); - drawTextLine(args.vg, 7, "CV 8"); - drawTextLine(args.vg, 8, "CV 9"); - drawTextLine(args.vg, 9, "CV 10"); - // fall through - case kCardinalVariantMini: - drawTextLine(args.vg, 0, "CV 1"); - drawTextLine(args.vg, 1, "CV 2"); - drawTextLine(args.vg, 2, "CV 3"); - drawTextLine(args.vg, 3, "CV 4"); - drawTextLine(args.vg, 4, "CV 5"); - break; - default: - break; + drawOutputJacksArea(args.vg, pcontext->variant == kCardinalVariantMini ? 5 : HostCV::NUM_INPUTS); + setupTextLines(args.vg); + + switch (pcontext->variant) + { + case kCardinalVariantMain: + drawTextLine(args.vg, 5, "CV 6"); + drawTextLine(args.vg, 6, "CV 7"); + drawTextLine(args.vg, 7, "CV 8"); + drawTextLine(args.vg, 8, "CV 9"); + drawTextLine(args.vg, 9, "CV 10"); + // fall through + case kCardinalVariantMini: + drawTextLine(args.vg, 0, "CV 1"); + drawTextLine(args.vg, 1, "CV 2"); + drawTextLine(args.vg, 2, "CV 3"); + drawTextLine(args.vg, 3, "CV 4"); + drawTextLine(args.vg, 4, "CV 5"); + break; + default: + break; + } } ModuleWidgetWith8HP::draw(args); From a1fce952c96296912fd1acdc1cb92e673283a39d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 14:23:26 +0000 Subject: [PATCH 209/451] CI: Use a single build job for final pluginval stage Signed-off-by: falkTX --- .github/workflows/build.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 088f85c5..a0711494 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -420,7 +420,7 @@ jobs: make features # multiple jobs for building carla, deps and plugins make DEBUG=true carla deps dgl plugins resources -j $(nproc) - # single job for final build stage, otherwise we might killed due to OOM + # single job for final build stage, otherwise we might get killed due to OOM make DEBUG=true HAVE_PULSEAUDIO=false -j 1 - name: Set sha8 id: slug @@ -1180,7 +1180,8 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2 with: key: ccache-pluginval-v${{ env.CACHE_VERSION }} - - name: Build Cardinal + # multiple jobs for building carla, deps and plugins + - name: Build Cardinal (carla, deps and plugins) env: CFLAGS: -g CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions @@ -1189,7 +1190,18 @@ jobs: run: | export PATH="/usr/lib/ccache:${PATH}" make features - make NOOPT=true SKIP_STRIPPING=true -j $(nproc) + make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc) + # single job for final build stage, otherwise we might get killed due to OOM + - name: Build Cardinal (final build stage) + env: + CFLAGS: -g + CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions + LDFLAGS: -static-libgcc -static-libstdc++ + WITH_LTO: false + run: | + export PATH="/usr/lib/ccache:${PATH}" + make features + make NOOPT=true SKIP_STRIPPING=true -j 1 - name: Run Cardinal self-tests run: | # --exit-on-first-error=yes From 7974430c4ef5ec52fde75849a4b2f189bf3465c7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 17:16:58 +0000 Subject: [PATCH 210/451] CI: skip ccache for pluginval job Signed-off-by: falkTX --- .github/workflows/build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0711494..a5150b59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1176,10 +1176,6 @@ jobs: # runtime testing sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb sudo apt-get clean - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-pluginval-v${{ env.CACHE_VERSION }} # multiple jobs for building carla, deps and plugins - name: Build Cardinal (carla, deps and plugins) env: @@ -1188,7 +1184,6 @@ jobs: LDFLAGS: -static-libgcc -static-libstdc++ WITH_LTO: false run: | - export PATH="/usr/lib/ccache:${PATH}" make features make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc) # single job for final build stage, otherwise we might get killed due to OOM @@ -1199,7 +1194,6 @@ jobs: LDFLAGS: -static-libgcc -static-libstdc++ WITH_LTO: false run: | - export PATH="/usr/lib/ccache:${PATH}" make features make NOOPT=true SKIP_STRIPPING=true -j 1 - name: Run Cardinal self-tests From d0a354a411b6b5cd6ac6ef1573a7c8f5e8a9b394 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 18:01:22 +0000 Subject: [PATCH 211/451] Set up aggressive optimizations when using simde or MOD Signed-off-by: falkTX --- include/simd-compat/emmintrin.h | 6 ++++++ include/simd-compat/immintrin.h | 6 ++++++ include/simd-compat/mmintrin.h | 6 ++++++ include/simd-compat/pmmintrin.h | 6 ++++++ include/simd-compat/xmmintrin.h | 6 ++++++ plugins/Cardinal/src/HostAudio.cpp | 6 ++++++ plugins/Cardinal/src/HostCV.cpp | 8 ++++++++ src/CardinalPlugin.cpp | 2 +- src/Makefile | 4 ++++ src/Makefile.cardinal.mk | 4 ++-- src/override/Engine.cpp | 8 +++----- 11 files changed, 54 insertions(+), 8 deletions(-) diff --git a/include/simd-compat/emmintrin.h b/include/simd-compat/emmintrin.h index 1ac10271..f3f798ba 100644 --- a/include/simd-compat/emmintrin.h +++ b/include/simd-compat/emmintrin.h @@ -20,6 +20,12 @@ #if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else +# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES +# define SIMDE_FAST_CONVERSION_RANGE +# define SIMDE_FAST_MATH +# define SIMDE_FAST_NANS +# define SIMDE_FAST_ROUND_MODE +# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/sse.h" #endif diff --git a/include/simd-compat/immintrin.h b/include/simd-compat/immintrin.h index 3d186244..20fe5e44 100644 --- a/include/simd-compat/immintrin.h +++ b/include/simd-compat/immintrin.h @@ -20,7 +20,13 @@ #if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else +# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES +# define SIMDE_FAST_CONVERSION_RANGE +# define SIMDE_FAST_MATH +# define SIMDE_FAST_NANS +# define SIMDE_FAST_ROUND_MODE +# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/sse.h" # include "../simde/simde/x86/sse2.h" #endif diff --git a/include/simd-compat/mmintrin.h b/include/simd-compat/mmintrin.h index 7ee7529f..92d9b458 100644 --- a/include/simd-compat/mmintrin.h +++ b/include/simd-compat/mmintrin.h @@ -22,6 +22,12 @@ #elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) # include #else +# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES +# define SIMDE_FAST_CONVERSION_RANGE +# define SIMDE_FAST_MATH +# define SIMDE_FAST_NANS +# define SIMDE_FAST_ROUND_MODE +# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/mmx.h" #endif diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 3c35e0bc..3fd9afc5 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -67,7 +67,13 @@ __m64 _mm_set1_pi16(short w) */ #else +# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES +# define SIMDE_FAST_CONVERSION_RANGE +# define SIMDE_FAST_MATH +# define SIMDE_FAST_NANS +# define SIMDE_FAST_ROUND_MODE +# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/sse.h" # include "../simde/simde/x86/sse2.h" # include "../simde/simde/x86/sse3.h" diff --git a/include/simd-compat/xmmintrin.h b/include/simd-compat/xmmintrin.h index 362a9da1..9a860e58 100644 --- a/include/simd-compat/xmmintrin.h +++ b/include/simd-compat/xmmintrin.h @@ -20,6 +20,12 @@ #if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else +# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES +# define SIMDE_FAST_CONVERSION_RANGE +# define SIMDE_FAST_MATH +# define SIMDE_FAST_NANS +# define SIMDE_FAST_ROUND_MODE +# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/avx.h" #endif diff --git a/plugins/Cardinal/src/HostAudio.cpp b/plugins/Cardinal/src/HostAudio.cpp index acaf610f..09c7949f 100644 --- a/plugins/Cardinal/src/HostAudio.cpp +++ b/plugins/Cardinal/src/HostAudio.cpp @@ -182,6 +182,9 @@ struct HostAudio2 : HostAudio<2> { if (in1connected) { + if (!std::isfinite(dataOuts[0][k])) + __builtin_unreachable(); + valueL = inputs[0].getVoltageSum() * 0.1f; if (dcFilterEnabled) @@ -200,6 +203,9 @@ struct HostAudio2 : HostAudio<2> { if (in2connected) { + if (!std::isfinite(dataOuts[1][k])) + __builtin_unreachable(); + valueR = inputs[1].getVoltageSum() * 0.1f; if (dcFilterEnabled) diff --git a/plugins/Cardinal/src/HostCV.cpp b/plugins/Cardinal/src/HostCV.cpp index be9c1101..fee8aec9 100644 --- a/plugins/Cardinal/src/HostCV.cpp +++ b/plugins/Cardinal/src/HostCV.cpp @@ -146,14 +146,22 @@ struct HostCV : TerminalModule { inputOffset = params[BIPOLAR_INPUTS_1_5].getValue() > 0.1f ? 5.0f : 0.0f; for (int i=0; i<5; ++i) + { + if (!std::isfinite(dataOuts[i+ioOffset][k])) + __builtin_unreachable(); dataOuts[i+ioOffset][k] += inputs[i].getVoltage() + inputOffset; + } if (pcontext->variant == kCardinalVariantMain) { inputOffset = params[BIPOLAR_INPUTS_6_10].getValue() > 0.1f ? 5.0f : 0.0f; for (int i=5; i<10; ++i) + { + if (!std::isfinite(dataOuts[i+ioOffset][k])) + __builtin_unreachable(); dataOuts[i+ioOffset][k] += inputs[i].getVoltage() + inputOffset; + } } } }; diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index bcf760d2..413ced92 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -924,7 +924,7 @@ class CardinalPlugin : public CardinalBasePlugin json_object_set_new(moduleJ, "favorite", json_boolean(m.favorite)); if (m.added > 0) json_object_set_new(moduleJ, "added", json_integer(m.added)); - if (std::isfinite(m.lastAdded)) + if (std::isfinite(m.lastAdded) && d_isNotZero(m.lastAdded)) json_object_set_new(moduleJ, "lastAdded", json_real(m.lastAdded)); if (json_object_size(moduleJ)) diff --git a/src/Makefile b/src/Makefile index 7d73a0f7..2654df4d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -104,6 +104,10 @@ ifeq ($(HAIKU),true) BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC endif +ifeq ($(MOD_BUILD),true) +BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp +endif + ifneq ($(WASM),true) ifneq ($(HAIKU),true) BASE_FLAGS += -pthread diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 42e94236..f646d26d 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -323,6 +323,8 @@ BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=0 else BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=1 endif +BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp +LINK_FLAGS += -fopenmp endif ifneq ($(WASM),true) @@ -346,8 +348,6 @@ BASE_FLAGS += -DNANOVG_GLES3_FORCED endif BUILD_C_FLAGS += -std=gnu11 -BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index c0b03a1a..4145670c 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -140,11 +140,9 @@ static void Cable_step(Cable* that) { const int channels = output->channels; // Copy all voltages from output to input for (int c = 0; c < channels; c++) { - float v = output->voltages[c]; - // Set 0V if infinite or NaN - if (!std::isfinite(v)) - v = 0.f; - input->voltages[c] = v; + if (!std::isfinite(output->voltages[c])) + __builtin_unreachable(); + input->voltages[c] = output->voltages[c]; } // Set higher channel voltages to 0 for (int c = channels; c < input->channels; c++) { From abf1d4455a6f707b1cb5c5f1fdeab653b9cce4bc Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 18:02:08 +0000 Subject: [PATCH 212/451] Auto-push to remote when loading new patch Signed-off-by: falkTX --- src/CardinalCommon.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index fb8e6645..951b625c 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -643,6 +643,10 @@ void loadPathDialog(const std::string& path, const bool asTemplate) APP->patch->path = ""; APP->history->setSaved(); } + + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + if (remoteDetails->autoDeploy) + remoteUtils::sendFullPatchToRemote(remoteDetails); }); #endif } @@ -668,6 +672,10 @@ void loadSelectionDialog() } std::free(pathC); + + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + if (remoteDetails->autoDeploy) + remoteUtils::sendFullPatchToRemote(remoteDetails); }); } @@ -676,6 +684,10 @@ void loadTemplateDialog() #ifndef HEADLESS_BEHAVIOUR promptClear("The current patch is unsaved. Clear it and start a new patch?", []() { APP->patch->loadTemplate(); + + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + if (remoteDetails->autoDeploy) + remoteUtils::sendFullPatchToRemote(remoteDetails); }); #endif } @@ -687,6 +699,10 @@ void revertDialog() return; promptClear("Revert patch to the last saved state?", []{ APP->patch->loadAction(APP->patch->path); + + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + if (remoteDetails->autoDeploy) + remoteUtils::sendFullPatchToRemote(remoteDetails); }); #endif } From c1fdfae3c28e7d06c48304e2e50c11d0a36eb8da Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 18:02:43 +0000 Subject: [PATCH 213/451] Add more plugins to mini, finish the optimizations bit Signed-off-by: falkTX --- plugins/Makefile | 619 +++++++++++++++++++++++++++++++++++++-- plugins/plugins-mini.cpp | 49 +++- 2 files changed, 635 insertions(+), 33 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index d61043f8..8097b349 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -313,9 +313,12 @@ PLUGIN_FILES += Fundamental/src/dr_wav.c MINIPLUGIN_FILES += Fundamental/src/ADSR.cpp MINIPLUGIN_FILES += Fundamental/src/LFO.cpp +MINIPLUGIN_FILES += Fundamental/src/Merge.cpp MINIPLUGIN_FILES += Fundamental/src/Noise.cpp +MINIPLUGIN_FILES += Fundamental/src/Quantizer.cpp MINIPLUGIN_FILES += Fundamental/src/Random.cpp MINIPLUGIN_FILES += Fundamental/src/Scope.cpp +MINIPLUGIN_FILES += Fundamental/src/Split.cpp MINIPLUGIN_FILES += Fundamental/src/VCA-1.cpp MINIPLUGIN_FILES += Fundamental/src/VCF.cpp MINIPLUGIN_FILES += Fundamental/src/VCMixer.cpp @@ -592,14 +595,24 @@ PLUGIN_FILES += $(wildcard BogaudioModules/src/dsp/filters/*.cpp) MINIPLUGIN_FILES += BogaudioModules/src/LFO.cpp MINIPLUGIN_FILES += BogaudioModules/src/Noise.cpp +MINIPLUGIN_FILES += BogaudioModules/src/Offset.cpp +MINIPLUGIN_FILES += BogaudioModules/src/SampleHold.cpp +MINIPLUGIN_FILES += BogaudioModules/src/Switch.cpp +MINIPLUGIN_FILES += BogaudioModules/src/Switch18.cpp +MINIPLUGIN_FILES += BogaudioModules/src/UMix.cpp +MINIPLUGIN_FILES += BogaudioModules/src/Unison.cpp MINIPLUGIN_FILES += BogaudioModules/src/VCA.cpp MINIPLUGIN_FILES += BogaudioModules/src/VCF.cpp MINIPLUGIN_FILES += BogaudioModules/src/VCO.cpp +MINIPLUGIN_FILES += BogaudioModules/src/disable_output_limit.cpp MINIPLUGIN_FILES += BogaudioModules/src/lfo_base.cpp +MINIPLUGIN_FILES += BogaudioModules/src/matrix_base.cpp MINIPLUGIN_FILES += BogaudioModules/src/menu.cpp MINIPLUGIN_FILES += BogaudioModules/src/module.cpp MINIPLUGIN_FILES += BogaudioModules/src/param_quantities.cpp MINIPLUGIN_FILES += BogaudioModules/src/poly_channels.cpp +MINIPLUGIN_FILES += BogaudioModules/src/rack_overrides.cpp +MINIPLUGIN_FILES += BogaudioModules/src/save_latch_to_patch.cpp MINIPLUGIN_FILES += BogaudioModules/src/skins.cpp MINIPLUGIN_FILES += BogaudioModules/src/utils.cpp MINIPLUGIN_FILES += BogaudioModules/src/vco_base.cpp @@ -1006,6 +1019,7 @@ PLUGIN_FILES += surgext-helper/surgext-helper.cpp 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 += $(NOFINITE_FLAGS) SURGEXT_FLAGS += -std=gnu++17 SURGEXT_FLAGS += -DTIXML_USE_STL=1 SURGEXT_FLAGS += -Isurgext/surge/src/common \ @@ -1133,6 +1147,58 @@ PLUGIN_BINARIES += ValleyAudio/src/VOICE_6.bin PLUGIN_BINARIES += ValleyAudio/src/VOX_MACH.bin PLUGIN_BINARIES += ValleyAudio/src/XFADE.bin +MINIPLUGIN_FILES += ValleyAudio/src/PlainText.cpp +MINIPLUGIN_FILES += ValleyAudio/src/SteppedSlider.cpp +MINIPLUGIN_FILES += ValleyAudio/src/ValleyChoiceMenu.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/FreqLUT.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/Utilities.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/DSP/OnePoleFilters.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/DSP/OTAFilter.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/QuadOsc.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecLoopingADSR.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecOnePoleFilters.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecOTAFilter.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Dexter/Dexter.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Dexter/DexterRoutingMatrix.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Dexter/Osc4Core_SIMD.cpp +MINIPLUGIN_FILES += ValleyAudio/src/Interzone/Interzone.cpp + +MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_BANK1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SAW.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SINE.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SQR.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/ALTOSAX.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/AM_HARM.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/BASIC.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/BITCRUSH1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/BITCRUSH2.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/BI_PULSE.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/CELLO_1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/CELLO_2.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/CHIP_1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/CHIP_2.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/OBOE.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/OPAL.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/OVERTONE1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/OVERTONE2.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/PIANO.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/PLUCK.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/PWM.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/SAW_GAP1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/SAW_GAP2.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/SINE_HARM.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/SWEEPHARM.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/SYMMETRY.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/TEE_EKS.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/THEREMIN.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VIDEOGAME.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VIOLIN.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_1.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_2.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_3.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_4.bin +MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_5.bin + # modules/types which are present in other plugins VALLEYAUDIO_CUSTOM = $(DRWAV) DigitalDisplay VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob @@ -1245,6 +1311,10 @@ BASE_FLAGS += -D'aligned_alloc_16(ptr)'='aligned_alloc(16,ptr)' BASE_FLAGS += -D'aligned_free_16(ptr)'='free(ptr)' endif +ifeq ($(MOD_BUILD),true) +BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp +endif + ifneq ($(WASM),true) ifneq ($(HAIKU),true) BASE_FLAGS += -pthread @@ -1274,8 +1344,6 @@ BASE_FLAGS += -DHAVE_SNDFILE endif BUILD_C_FLAGS += -std=gnu11 -BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing ifneq ($(MACOS),true) BUILD_CXX_FLAGS += -faligned-new -Wno-abi @@ -1295,6 +1363,9 @@ ifeq ($(MOD_BUILD),true) BUILD_CXX_FLAGS += -Wno-overflow endif +# Use this for any plugins that rely on NaN presence +NOFINITE_FLAGS = -fno-finite-math-only -fno-strict-aliasing + # -------------------------------------------------------------- # lots of warnings from VCV side @@ -1424,13 +1495,505 @@ endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png -MINIPLUGIN_LIST = AudibleInstruments BogaudioModules Cardinal Fundamental -MINIRESOURCE_FILES = $(wildcard AudibleInstruments/res/*.svg) -MINIRESOURCE_FILES += $(wildcard BogaudioModules/res/*.svg) -MINIRESOURCE_FILES += $(wildcard Cardinal/res/*.svg) -MINIRESOURCE_FILES += $(wildcard Fundamental/res/*.svg) -MINIRESOURCE_FILES += $(wildcard Fundamental/res/components/*.svg) +MINIPLUGIN_LIST = AudibleInstruments BogaudioModules Cardinal Fundamental ValleyAudio +MINIRESOURCE_FILES = AudibleInstruments/res/Plaits.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AD-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AD.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Additator-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Additator-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Additator.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ADSR-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ADSR-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ADSR.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AMRM-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AMRM-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AMRM.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Analyzer-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Analyzer-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Analyzer.svg +# MINIRESOURCE_FILES += BogaudioModules/res/AnalyzerXL.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Arp-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Arp-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Arp.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ASR-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ASR-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ASR.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Assign-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Assign-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Assign.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Bool-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Bool-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Bool.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_18px_0.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_18px_1_green.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_18px_1_orange.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_18px_1.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_9px_0.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_9px_1_green.svg +MINIRESOURCE_FILES += BogaudioModules/res/button_9px_1.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Chirp-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Chirp-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Chirp.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Clpr-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Clpr-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Clpr.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Cmp-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/CmpDist-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/CmpDist-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/CmpDist.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Cmp-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Cmp.svg +# MINIRESOURCE_FILES += BogaudioModules/res/CVD-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/CVD-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/CVD.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Detune-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Detune-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Detune.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DGate-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DGate-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DGate.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Edge-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Edge-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Edge.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EightFO-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EightFO-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EightFO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EightOne-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EightOne-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EightOne.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EQ-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EQ-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EQS-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EQS-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EQS.svg +# MINIRESOURCE_FILES += BogaudioModules/res/EQ.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FFB-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FFB-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FFB.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FMOp-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FMOp-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FMOp.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Follow-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Follow-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Follow.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FourFO-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FourFO-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FourFO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FourMan-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FourMan-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/FourMan.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Inv-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Inv-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Inv.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_16px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_16px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_16px.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_19px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_19px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_19px.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_26px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_26px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_26px.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_29px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_29px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_29px.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_38px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_38px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_38px.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_45px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_45px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_45px.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_68px-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_68px-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/knob_68px.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lag-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lag-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lag.svg +MINIRESOURCE_FILES += BogaudioModules/res/LFO-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/LFO-latif.svg +MINIRESOURCE_FILES += BogaudioModules/res/LFO-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/LFO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lgsw-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lgsw-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lgsw.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LLFO-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LLFO-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LLFO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LLPG-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LLPG-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LLPG.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lmtr-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lmtr-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Lmtr.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LPG-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LPG-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LPG.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LVCF-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LVCF-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LVCF.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LVCO-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LVCO-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/LVCO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Manual-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Manual-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Manual.svg +# MINIRESOURCE_FILES += BogaudioModules/res/MegaGate-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/MegaGate-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/MegaGate.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix1-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix1-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix1-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix1.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix2-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix2-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix2-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix2.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mono-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mono-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mono.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mult-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mult-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mult.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mumix-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mumix-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mumix.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mute8-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mute8-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Mute8.svg +MINIRESOURCE_FILES += BogaudioModules/res/Noise-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/Noise-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/Noise.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Nsgt-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Nsgt-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Nsgt.svg +MINIRESOURCE_FILES += BogaudioModules/res/Offset-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/Offset-latif.svg +MINIRESOURCE_FILES += BogaudioModules/res/Offset-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/Offset.svg +# MINIRESOURCE_FILES += BogaudioModules/res/OneEight-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/OneEight-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/OneEight.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pan-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pan-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pan.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PEQ.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pgmr-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pgmr-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pgmr.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PgmrX-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PgmrX-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PgmrX.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyMult-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyMult-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyMult.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8.svg +MINIRESOURCE_FILES += BogaudioModules/res/port-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/port-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/port.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pressor-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pressor-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pressor.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pulse-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pulse-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Pulse.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Ranalyzer.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Reftone-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Reftone-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Reftone.svg +# MINIRESOURCE_FILES += BogaudioModules/res/RGate-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/RGate-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/RGate.svg +MINIRESOURCE_FILES += BogaudioModules/res/SampleHold-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/SampleHold-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/SampleHold.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Shaper-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Shaper-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Shaper.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Sine-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Sine-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Sine.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Slew-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Slew-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Slew.svg +# MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_0.svg +# MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_1.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Stack-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Stack-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Stack.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Sums-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Sums-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Sums.svg +MINIRESOURCE_FILES += BogaudioModules/res/Switch-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/Switch-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/Switch.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch1616-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch1616-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch1616.svg +MINIRESOURCE_FILES += BogaudioModules/res/Switch18-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/Switch18-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/Switch18.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch44-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch44-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch44.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch81-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch81-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch81.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch88-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch88-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Switch88.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test2-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test2-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test2.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestGl-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestGl-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestGl.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestVCF-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestVCF-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/TestVCF.svg +MINIRESOURCE_FILES += BogaudioModules/res/UMix-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/UMix-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/UMix.svg +MINIRESOURCE_FILES += BogaudioModules/res/Unison-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/Unison-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/Unison.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCA-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCA-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCA.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VCAmp-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VCAmp-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VCAmp.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCF-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCF-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCF.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VCM-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VCM-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VCM.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCO-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCO-latif.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCO-lowcontrast.svg +MINIRESOURCE_FILES += BogaudioModules/res/VCO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Velo-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Velo-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Velo.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Vish-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Vish-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Vish.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VU-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VU-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/VU.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk2-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk2-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk2-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk2.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Walk.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XCO-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XCO-latif.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XCO-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XCO.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XFade-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XFade-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/XFade.svg + +MINIRESOURCE_FILES += Cardinal/res/HostAudio.svg +MINIRESOURCE_FILES += Cardinal/res/HostCV.svg +MINIRESOURCE_FILES += Cardinal/res/HostMIDICC.svg +MINIRESOURCE_FILES += Cardinal/res/HostMIDIGate.svg +MINIRESOURCE_FILES += Cardinal/res/HostMIDIMap.svg +MINIRESOURCE_FILES += Cardinal/res/HostMIDI.svg +MINIRESOURCE_FILES += Cardinal/res/HostParameters.svg +MINIRESOURCE_FILES += Cardinal/res/HostParamsMap.svg +MINIRESOURCE_FILES += Cardinal/res/HostTime.svg + MINIRESOURCE_FILES += Fundamental/presets +MINIRESOURCE_FILES += Fundamental/res/ADSR.svg +MINIRESOURCE_FILES += Fundamental/res/LFO.svg +MINIRESOURCE_FILES += Fundamental/res/Merge.svg +MINIRESOURCE_FILES += Fundamental/res/Noise.svg +MINIRESOURCE_FILES += Fundamental/res/Quantizer.svg +MINIRESOURCE_FILES += Fundamental/res/Random.svg +MINIRESOURCE_FILES += Fundamental/res/Scope.svg +MINIRESOURCE_FILES += Fundamental/res/Split.svg +MINIRESOURCE_FILES += Fundamental/res/VCA-1.svg +MINIRESOURCE_FILES += Fundamental/res/VCF.svg +MINIRESOURCE_FILES += Fundamental/res/VCMixer.svg +MINIRESOURCE_FILES += Fundamental/res/VCO.svg +MINIRESOURCE_FILES += Fundamental/res/components/ADSR-bg.svg +MINIRESOURCE_FILES += Fundamental/res/components/button-off.svg +MINIRESOURCE_FILES += Fundamental/res/components/button-on.svg +MINIRESOURCE_FILES += Fundamental/res/components/knob-marker-small.svg +MINIRESOURCE_FILES += Fundamental/res/components/knob-marker.svg +MINIRESOURCE_FILES += Fundamental/res/components/knob-small.svg +MINIRESOURCE_FILES += Fundamental/res/components/knob.svg +MINIRESOURCE_FILES += Fundamental/res/components/port.svg +MINIRESOURCE_FILES += Fundamental/res/components/Quantizer-keyboard.svg +MINIRESOURCE_FILES += Fundamental/res/components/Scope-bg.svg + +MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg +MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelLight.svg +MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg +MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelLight.svg +MINIRESOURCE_FILES += ValleyAudio/res/LightLEDButton80.svg +MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmallOut.svg +MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo0.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo1.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo2.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo3.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo4.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo5.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo6.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo7.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo8.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo9.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo10.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo11.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo12.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo13.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo14.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo15.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo16.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo17.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo18.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo19.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo20.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo21.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo22.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo0Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo1Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo2Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo3Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo4Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo5Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo6Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo7Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo8Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo9Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo10Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo11Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo12Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo13Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo14Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo15Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo16Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo17Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo18Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo19Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo20Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo21Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/algo22Dark.svg +MINIRESOURCE_FILES += ValleyAudio/res/din1451alt.ttf +MINIRESOURCE_FILES += ValleyAudio/res/sliderBlue.svg +MINIRESOURCE_FILES += ValleyAudio/res/sliderGreen.svg +MINIRESOURCE_FILES += ValleyAudio/res/sliderRed.svg +MINIRESOURCE_FILES += ValleyAudio/res/sliderOrange.svg +MINIRESOURCE_FILES += ValleyAudio/res/sliderYellow.svg +MINIRESOURCE_FILES += ValleyAudio/res/valleySliderBackground.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMed.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMed-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMedSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMedSmall-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSMed-bg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSMedSmall-bg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSGreenMed.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSGreenMed-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSOrangeMed.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSOrangeMed-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSRedMed.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSRedMed-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSPurpleMed.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSPurpleMed-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSSmall-bg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSBlueSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSBlueSmall-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSOrangeSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSOrangeSmall-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSGreenSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSGreenSmall-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSRedSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSRedSmall-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSMustardSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSMustardSmall-fg.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSPurpleSmall.svg +MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSPurpleSmall-fg.svg # MOD builds only have LV2 main and FX variant ifeq ($(MOD_BUILD),true) @@ -1645,7 +2208,8 @@ endif PLUGIN_OBJS = $(PLUGIN_FILES:%=$(BUILD_DIR)/%.o) PLUGIN_OBJS += $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.o) -MINIPLUGIN_OBJS = $(MINIPLUGIN_FILES:%=$(BUILD_DIR)/%.o) +MINIPLUGIN_OBJS = $(MINIPLUGIN_FILES:%=$(BUILD_DIR)/%.o) +MINIPLUGIN_OBJS += $(MINIPLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.o) NOPLUGIN_OBJS = $(NOPLUGIN_FILES:%=$(BUILD_DIR)/%.o) @@ -1799,7 +2363,7 @@ $(BUILD_DIR)/AudibleInstruments/%.o: AudibleInstruments/% $(BUILD_DIR)/Autinn/%.cpp.o: Autinn/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(AUTINN_CUSTOM),$(call custom_module_names,$(m),Autinn)) \ -DpluginInstance=pluginInstance__Autinn \ -Dinit=init__Autinn @@ -1877,7 +2441,7 @@ $(BUILD_DIR)/CatroModulo/src/%.cpp.o: CatroModulo/src/%.cpp $(BUILD_DIR)/cf/src/%.cpp.o: cf/src/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(CF_CUSTOM),$(call custom_module_names,$(m),cf)) \ -DpluginInstance=pluginInstance__cf \ -Wno-misleading-indentation @@ -1885,7 +2449,7 @@ $(BUILD_DIR)/cf/src/%.cpp.o: cf/src/%.cpp $(BUILD_DIR)/ChowDSP/%.cpp.o: ChowDSP/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(CHOWDSP_CUSTOM),$(call custom_module_names,$(m),ChowDSP)) \ -DpluginInstance=pluginInstance__ChowDSP \ -DUSE_EIGEN \ @@ -1935,7 +2499,7 @@ $(BUILD_DIR)/Extratone/src/%.cpp.o: Extratone/src/%.cpp $(BUILD_DIR)/FehlerFabrik/%.cpp.o: FehlerFabrik/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(FEHLERFABRIK_CUSTOM),$(call custom_module_names,$(m),FehlerFabrik)) \ -DpluginInstance=pluginInstance__FehlerFabrik @@ -1960,6 +2524,13 @@ $(BUILD_DIR)/Fundamental/%.cpp.o: Fundamental/%.cpp $(foreach m,$(FUNDAMENTAL_CUSTOM),$(call custom_module_names,$(m),Fundamental)) \ -DpluginInstance=pluginInstance__Fundamental +$(BUILD_DIR)/Fundamental/src/Scope.cpp.o: Fundamental/src/Scope.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ + $(foreach m,$(FUNDAMENTAL_CUSTOM),$(call custom_module_names,$(m),Fundamental)) \ + -DpluginInstance=pluginInstance__Fundamental + $(BUILD_DIR)/GlueTheGiant/%.cpp.o: GlueTheGiant/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" @@ -1986,7 +2557,7 @@ $(BUILD_DIR)/GoodSheperd/%.cpp.o: GoodSheperd/%.cpp $(BUILD_DIR)/GrandeModular/%.cpp.o: GrandeModular/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(GRANDEMODULAR_CUSTOM),$(call custom_module_names,$(m),GrandeModular)) \ -DpluginInstance=pluginInstance__GrandeModular \ -Wno-missing-braces \ @@ -2010,7 +2581,7 @@ $(BUILD_DIR)/HamptonHarmonics/%.cpp.o: HamptonHarmonics/%.cpp $(BUILD_DIR)/HetrickCV/%.cpp.o: HetrickCV/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(HETRICKCV_CUSTOM),$(call custom_module_names,$(m),HetrickCV)) \ -DpluginInstance=pluginInstance__HetrickCV \ -DSTDIO_OVERRIDE=HetrickCV \ @@ -2020,7 +2591,7 @@ $(BUILD_DIR)/HetrickCV/%.cpp.o: HetrickCV/%.cpp $(BUILD_DIR)/ImpromptuModular/src/Foundr%.cpp.o: ImpromptuModular/src/Foundr%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM),$(call custom_module_names,$(m),ImpromptuModular)) \ -DpluginInstance=pluginInstance__ImpromptuModular \ -DStepAttributes=StepAttributesKernel \ @@ -2028,7 +2599,7 @@ $(BUILD_DIR)/ImpromptuModular/src/Foundr%.cpp.o: ImpromptuModular/src/Foundr%.cp $(BUILD_DIR)/ImpromptuModular/src/ImpromptuModular.cpp.o: ImpromptuModular/src/ImpromptuModular.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM),$(call custom_module_names,$(m),ImpromptuModular)) \ -DpluginInstance=pluginInstance__ImpromptuModular \ -Dinit=init__ImpromptuModular @@ -2036,7 +2607,7 @@ $(BUILD_DIR)/ImpromptuModular/src/ImpromptuModular.cpp.o: ImpromptuModular/src/I $(BUILD_DIR)/ImpromptuModular%.cpp.o: ImpromptuModular%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM),$(call custom_module_names,$(m),ImpromptuModular)) \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),ImpromptuModular_$(shell basename $*))) \ -DpluginInstance=pluginInstance__ImpromptuModular \ @@ -2100,7 +2671,7 @@ $(BUILD_DIR)/LilacLoop/%.cpp.o: LilacLoop/%.cpp $(BUILD_DIR)/LittleUtils/%.cpp.o: LittleUtils/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(LITTLEUTILS_CUSTOM),$(call custom_module_names,$(m),LittleUtils)) \ -DpluginInstance=pluginInstance__LittleUtils @@ -2130,7 +2701,7 @@ $(BUILD_DIR)/Meander/src/Meander.cpp.o: Meander/src/Meander.cpp $(BUILD_DIR)/MindMeldModular/src/MindMeldModular.cpp.o: MindMeldModular/src/MindMeldModular.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(MINDMELD_CUSTOM),$(call custom_module_names,$(m),MindMeld)) \ -DpluginInstance=pluginInstance__MindMeld \ -Dinit=init__MindMeld @@ -2138,7 +2709,7 @@ $(BUILD_DIR)/MindMeldModular/src/MindMeldModular.cpp.o: MindMeldModular/src/Mind $(BUILD_DIR)/MindMeldModular/%.cpp.o: MindMeldModular/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(MINDMELD_CUSTOM),$(call custom_module_names,$(m),MindMeld)) \ -DpluginInstance=pluginInstance__MindMeld @@ -2166,7 +2737,7 @@ $(BUILD_DIR)/Mog/%.cpp.o: Mog/%.cpp $(BUILD_DIR)/mscHack/%.cpp.o: mscHack/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(MSCHACK_CUSTOM),$(call custom_module_names,$(m),mscHack)) \ $(foreach m,$(MSCHACK_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),mscHack_$(shell basename $*))) \ -DthePlugin=pluginInstance__mscHack \ @@ -2219,7 +2790,7 @@ $(BUILD_DIR)/ParableInstruments/%.o: ParableInstruments/% $(BUILD_DIR)/PathSet/%.cpp.o: PathSet/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(PATHSET_CUSTOM),$(call custom_module_names,$(m),PathSet)) \ -DpluginInstance=pluginInstance__PathSet @@ -2264,7 +2835,7 @@ $(BUILD_DIR)/repelzen/%.cpp.o: repelzen/%.cpp $(BUILD_DIR)/Sapphire/%.cpp.o: Sapphire/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ $(foreach m,$(SAPPHIRE_CUSTOM),$(call custom_module_names,$(m),Sapphire)) \ -DpluginInstance=pluginInstance__sapphire diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index a34dfa4d..b08c5ad2 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -45,6 +45,15 @@ extern Model* modelBogaudioNoise; extern Model* modelBogaudioVCA; extern Model* modelBogaudioVCF; extern Model* modelBogaudioVCO; +extern Model* modelOffset; +extern Model* modelSampleHold; +extern Model* modelSwitch; +extern Model* modelSwitch18; +extern Model* modelUMix; +extern Model* modelUnison; + +// ValleyAudio +#include "ValleyAudio/src/Valley.hpp" // known terminal modules std::vector hostTerminalModels; @@ -54,6 +63,7 @@ Plugin* pluginInstance__Cardinal; Plugin* pluginInstance__Fundamental; Plugin* pluginInstance__AudibleInstruments; Plugin* pluginInstance__BogaudioModules; +Plugin* pluginInstance__ValleyAudio; namespace rack { @@ -215,9 +225,12 @@ static void initStatic__Fundamental() { p->addModel(modelADSR); p->addModel(modelLFO); + p->addModel(modelMerge); p->addModel(modelNoise); + p->addModel(modelQuantizer); p->addModel(modelRandom); p->addModel(modelScope); + p->addModel(modelSplit); p->addModel(modelVCA_1); p->addModel(modelVCF); p->addModel(modelVCMixer); @@ -225,17 +238,14 @@ static void initStatic__Fundamental() spl.removeModule("8vert"); spl.removeModule("Delay"); spl.removeModule("LFO2"); - spl.removeModule("Merge"); spl.removeModule("MidSide"); spl.removeModule("Mixer"); spl.removeModule("Mutes"); spl.removeModule("Octave"); spl.removeModule("Pulses"); - spl.removeModule("Quantizer"); spl.removeModule("SEQ3"); spl.removeModule("SequentialSwitch1"); spl.removeModule("SequentialSwitch2"); - spl.removeModule("Split"); spl.removeModule("Sum"); spl.removeModule("VCA"); spl.removeModule("VCO2"); @@ -291,6 +301,12 @@ static void initStatic__BogaudioModules() p->addModel(modelBogaudioVCA); p->addModel(modelBogaudioVCF); p->addModel(modelBogaudioVCO); + p->addModel(modelOffset); + p->addModel(modelSampleHold); + p->addModel(modelSwitch); + p->addModel(modelSwitch18); + p->addModel(modelUMix); + p->addModel(modelUnison); // cat plugins/BogaudioModules/plugin.json | jq -r .modules[].slug - | sort spl.removeModule("Bogaudio-AD"); @@ -355,7 +371,6 @@ static void initStatic__BogaudioModules() spl.removeModule("Bogaudio-Mumix"); spl.removeModule("Bogaudio-Mute8"); spl.removeModule("Bogaudio-Nsgt"); - spl.removeModule("Bogaudio-Offset"); spl.removeModule("Bogaudio-OneEight"); spl.removeModule("Bogaudio-Pan"); spl.removeModule("Bogaudio-PEQ"); @@ -375,21 +390,16 @@ static void initStatic__BogaudioModules() spl.removeModule("Bogaudio-Ranalyzer"); spl.removeModule("Bogaudio-Reftone"); spl.removeModule("Bogaudio-RGate"); - spl.removeModule("Bogaudio-SampleHold"); spl.removeModule("Bogaudio-Shaper"); spl.removeModule("Bogaudio-ShaperPlus"); spl.removeModule("Bogaudio-Sine"); spl.removeModule("Bogaudio-Slew"); spl.removeModule("Bogaudio-Stack"); spl.removeModule("Bogaudio-Sums"); - spl.removeModule("Bogaudio-Switch"); spl.removeModule("Bogaudio-Switch1616"); - spl.removeModule("Bogaudio-Switch18"); spl.removeModule("Bogaudio-Switch44"); spl.removeModule("Bogaudio-Switch81"); spl.removeModule("Bogaudio-Switch88"); - spl.removeModule("Bogaudio-UMix"); - spl.removeModule("Bogaudio-Unison"); spl.removeModule("Bogaudio-VCAmp"); spl.removeModule("Bogaudio-VCM"); spl.removeModule("Bogaudio-Velo"); @@ -402,12 +412,33 @@ static void initStatic__BogaudioModules() } } +static void initStatic__ValleyAudio() +{ + Plugin* const p = new Plugin; + pluginInstance__ValleyAudio = p; + + const StaticPluginLoader spl(p, "ValleyAudio"); + if (spl.ok()) + { + p->addModel(modelDexter); + p->addModel(modelInterzone); + + spl.removeModule("Amalgam"); + spl.removeModule("Feline"); + spl.removeModule("Plateau"); + spl.removeModule("Terrorform"); + spl.removeModule("Topograph"); + spl.removeModule("uGraph"); + } +} + void initStaticPlugins() { initStatic__Cardinal(); initStatic__Fundamental(); initStatic__AudibleInstruments(); initStatic__BogaudioModules(); + initStatic__ValleyAudio(); } void destroyStaticPlugins() From 1b5fb47649198b32a4276c5250fd050d1b98a61e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 18:22:05 +0000 Subject: [PATCH 214/451] Add braids to mini Signed-off-by: falkTX --- plugins/Makefile | 10 +++++++++- plugins/plugins-mini.cpp | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 8097b349..e9c6f2b5 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -532,7 +532,13 @@ PLUGIN_FILES += AudibleInstruments/eurorack/streams/svf.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/vactrol.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/compressor.cc +MINIPLUGIN_FILES += AudibleInstruments/src/Braids.cpp MINIPLUGIN_FILES += AudibleInstruments/src/Plaits.cpp +MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/macro_oscillator.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/analog_oscillator.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/digital_oscillator.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/quantizer.cc +MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/resources.cc MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/*.cc) MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/engine/*.cc) MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/speech/*.cc) @@ -1496,7 +1502,9 @@ endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png MINIPLUGIN_LIST = AudibleInstruments BogaudioModules Cardinal Fundamental ValleyAudio -MINIRESOURCE_FILES = AudibleInstruments/res/Plaits.svg +MINIRESOURCE_FILES = AudibleInstruments/res/Braids.svg +MINIRESOURCE_FILES += AudibleInstruments/res/Plaits.svg +MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf # MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/AD-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/AD.svg diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index b08c5ad2..cd661401 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -260,10 +260,10 @@ static void initStatic__AudibleInstruments() const StaticPluginLoader spl(p, "AudibleInstruments"); if (spl.ok()) { + p->addModel(modelBraids); p->addModel(modelPlaits); spl.removeModule("Blinds"); - spl.removeModule("Braids"); spl.removeModule("Branches"); spl.removeModule("Clouds"); spl.removeModule("Elements"); From 2e5bc3c7dce79e1d640cc6a954f8c13a4eed0473 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 31 Dec 2022 19:28:36 +0000 Subject: [PATCH 215/451] Mini: Remove UMix, add Aria Spleet and Swerge Signed-off-by: falkTX --- plugins/Makefile | 153 +++++++-------------------------------- plugins/plugins-mini.cpp | 44 ++++++++++- 2 files changed, 67 insertions(+), 130 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index e9c6f2b5..909b36dc 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -420,6 +420,9 @@ PLUGIN_FILES += AriaModules/src/Splort.cpp PLUGIN_FILES += AriaModules/src/Swerge.cpp PLUGIN_FILES += AriaModules/src/Undular.cpp +MINIPLUGIN_FILES += AriaModules/src/Spleet.cpp +MINIPLUGIN_FILES += AriaModules/src/Swerge.cpp + # modules/types which are present in other plugins ARIA_CUSTOM = Blank @@ -605,7 +608,6 @@ MINIPLUGIN_FILES += BogaudioModules/src/Offset.cpp MINIPLUGIN_FILES += BogaudioModules/src/SampleHold.cpp MINIPLUGIN_FILES += BogaudioModules/src/Switch.cpp MINIPLUGIN_FILES += BogaudioModules/src/Switch18.cpp -MINIPLUGIN_FILES += BogaudioModules/src/UMix.cpp MINIPLUGIN_FILES += BogaudioModules/src/Unison.cpp MINIPLUGIN_FILES += BogaudioModules/src/VCA.cpp MINIPLUGIN_FILES += BogaudioModules/src/VCF.cpp @@ -1501,44 +1503,44 @@ endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png -MINIPLUGIN_LIST = AudibleInstruments BogaudioModules Cardinal Fundamental ValleyAudio -MINIRESOURCE_FILES = AudibleInstruments/res/Braids.svg +MINIPLUGIN_LIST = AriaModules AudibleInstruments BogaudioModules Cardinal Fundamental ValleyAudio + +MINIRESOURCE_FILES = AriaModules/res/components/jack-transparent.svg +MINIRESOURCE_FILES += AriaModules/res/components/pushbutton-500-off.svg +MINIRESOURCE_FILES += AriaModules/res/components/pushbutton-500-on.svg +MINIRESOURCE_FILES += AriaModules/res/components/pushbutton-500-pink.svg +MINIRESOURCE_FILES += AriaModules/res/components/screw.svg +MINIRESOURCE_FILES += AriaModules/res/faceplates/Spleet.svg +MINIRESOURCE_FILES += AriaModules/res/faceplates/Swerge.svg +MINIRESOURCE_FILES += AriaModules/res/signature/signature.svg + +MINIRESOURCE_FILES += AudibleInstruments/res/Braids.svg MINIRESOURCE_FILES += AudibleInstruments/res/Plaits.svg MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf + # MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AD-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/AD.svg # MINIRESOURCE_FILES += BogaudioModules/res/Additator-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Additator-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Additator.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX.svg # MINIRESOURCE_FILES += BogaudioModules/res/ADSR-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/ADSR-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/ADSR.svg # MINIRESOURCE_FILES += BogaudioModules/res/AMRM-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AMRM-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/AMRM.svg # MINIRESOURCE_FILES += BogaudioModules/res/Analyzer-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Analyzer-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Analyzer.svg # MINIRESOURCE_FILES += BogaudioModules/res/AnalyzerXL.svg # MINIRESOURCE_FILES += BogaudioModules/res/Arp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Arp-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Arp.svg # MINIRESOURCE_FILES += BogaudioModules/res/ASR-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/ASR-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/ASR.svg # MINIRESOURCE_FILES += BogaudioModules/res/Assign-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Assign-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Assign.svg # MINIRESOURCE_FILES += BogaudioModules/res/Bool-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Bool-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Bool.svg MINIRESOURCE_FILES += BogaudioModules/res/button_18px_0.svg MINIRESOURCE_FILES += BogaudioModules/res/button_18px_1_green.svg @@ -1548,337 +1550,232 @@ MINIRESOURCE_FILES += BogaudioModules/res/button_9px_0.svg MINIRESOURCE_FILES += BogaudioModules/res/button_9px_1_green.svg MINIRESOURCE_FILES += BogaudioModules/res/button_9px_1.svg # MINIRESOURCE_FILES += BogaudioModules/res/Chirp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Chirp-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Chirp.svg # MINIRESOURCE_FILES += BogaudioModules/res/Clpr-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Clpr-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Clpr.svg # MINIRESOURCE_FILES += BogaudioModules/res/Cmp-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Cmp.svg # MINIRESOURCE_FILES += BogaudioModules/res/CmpDist-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/CmpDist-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/CmpDist.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Cmp-lowcontrast.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Cmp.svg # MINIRESOURCE_FILES += BogaudioModules/res/CVD-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/CVD-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/CVD.svg # MINIRESOURCE_FILES += BogaudioModules/res/DADSRH-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH.svg # MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH.svg # MINIRESOURCE_FILES += BogaudioModules/res/Detune-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Detune-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Detune.svg # MINIRESOURCE_FILES += BogaudioModules/res/DGate-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DGate-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/DGate.svg # MINIRESOURCE_FILES += BogaudioModules/res/Edge-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Edge-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Edge.svg # MINIRESOURCE_FILES += BogaudioModules/res/EightFO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EightFO-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/EightFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/EightOne-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EightOne-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/EightOne.svg # MINIRESOURCE_FILES += BogaudioModules/res/EQ-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EQ-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/EQS-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EQS-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/EQS.svg # MINIRESOURCE_FILES += BogaudioModules/res/EQ.svg # MINIRESOURCE_FILES += BogaudioModules/res/FFB-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FFB-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/FFB.svg # MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop.svg # MINIRESOURCE_FILES += BogaudioModules/res/FMOp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FMOp-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/FMOp.svg # MINIRESOURCE_FILES += BogaudioModules/res/Follow-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Follow-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Follow.svg # MINIRESOURCE_FILES += BogaudioModules/res/FourFO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FourFO-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/FourFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/FourMan-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FourMan-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/FourMan.svg # MINIRESOURCE_FILES += BogaudioModules/res/Inv-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Inv-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Inv.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_16px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_16px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_16px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_19px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_19px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_19px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_26px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_26px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_26px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_29px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_29px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_29px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_38px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_38px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_38px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_45px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_45px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_45px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_68px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_68px-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_68px.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lag-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Lag-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lag.svg MINIRESOURCE_FILES += BogaudioModules/res/LFO-dark.svg MINIRESOURCE_FILES += BogaudioModules/res/LFO-latif.svg -MINIRESOURCE_FILES += BogaudioModules/res/LFO-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/LFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lgsw-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Lgsw-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lgsw.svg # MINIRESOURCE_FILES += BogaudioModules/res/LLFO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LLFO-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/LLFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/LLPG-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LLPG-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/LLPG.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lmtr-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Lmtr-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lmtr.svg # MINIRESOURCE_FILES += BogaudioModules/res/LPG-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LPG-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/LPG.svg # MINIRESOURCE_FILES += BogaudioModules/res/LVCF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LVCF-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/LVCF.svg # MINIRESOURCE_FILES += BogaudioModules/res/LVCO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LVCO-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/LVCO.svg # MINIRESOURCE_FILES += BogaudioModules/res/Manual-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Manual-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Manual.svg # MINIRESOURCE_FILES += BogaudioModules/res/MegaGate-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/MegaGate-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/MegaGate.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix1-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix1-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix1-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix1.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix2-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix2-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix2-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix2.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix4-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4x.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix8-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8x.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mono-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mono-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mono.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mult-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mult-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mult.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mumix-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mumix-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mumix.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mute8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mute8-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mute8.svg MINIRESOURCE_FILES += BogaudioModules/res/Noise-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Noise-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/Noise.svg # MINIRESOURCE_FILES += BogaudioModules/res/Nsgt-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Nsgt-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Nsgt.svg MINIRESOURCE_FILES += BogaudioModules/res/Offset-dark.svg MINIRESOURCE_FILES += BogaudioModules/res/Offset-latif.svg MINIRESOURCE_FILES += BogaudioModules/res/Offset-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/Offset.svg # MINIRESOURCE_FILES += BogaudioModules/res/OneEight-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/OneEight-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/OneEight.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pan-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pan-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pan.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ6-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ6.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pgmr-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pgmr-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pgmr.svg # MINIRESOURCE_FILES += BogaudioModules/res/PgmrX-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PgmrX-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PgmrX.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyMult-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyMult-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyMult.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8.svg MINIRESOURCE_FILES += BogaudioModules/res/port-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/port-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/port.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pressor-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pressor-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pressor.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pulse-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pulse-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pulse.svg # MINIRESOURCE_FILES += BogaudioModules/res/Ranalyzer.svg # MINIRESOURCE_FILES += BogaudioModules/res/Reftone-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Reftone-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Reftone.svg # MINIRESOURCE_FILES += BogaudioModules/res/RGate-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/RGate-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/RGate.svg MINIRESOURCE_FILES += BogaudioModules/res/SampleHold-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/SampleHold-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/SampleHold.svg # MINIRESOURCE_FILES += BogaudioModules/res/Shaper-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Shaper-lowcontrast.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Shaper.svg # MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Shaper.svg # MINIRESOURCE_FILES += BogaudioModules/res/Sine-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Sine-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Sine.svg # MINIRESOURCE_FILES += BogaudioModules/res/Slew-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Slew-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Slew.svg -# MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_0.svg -# MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_1.svg +MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_0.svg +MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_1.svg # MINIRESOURCE_FILES += BogaudioModules/res/Stack-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Stack-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Stack.svg # MINIRESOURCE_FILES += BogaudioModules/res/Sums-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Sums-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Sums.svg MINIRESOURCE_FILES += BogaudioModules/res/Switch-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Switch-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/Switch.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch1616-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch1616-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch1616.svg MINIRESOURCE_FILES += BogaudioModules/res/Switch18-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Switch18-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/Switch18.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch44-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch44-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch44.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch81-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch81-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch81.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch88-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch88-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch88.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/Test.svg # MINIRESOURCE_FILES += BogaudioModules/res/Test2-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Test2-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Test2.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Test-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestGl-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestGl-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestGl.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Test-lowcontrast.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Test.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestVCF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestVCF-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestVCF.svg -MINIRESOURCE_FILES += BogaudioModules/res/UMix-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/UMix-lowcontrast.svg -MINIRESOURCE_FILES += BogaudioModules/res/UMix.svg +# MINIRESOURCE_FILES += BogaudioModules/res/UMix-dark.svg +# MINIRESOURCE_FILES += BogaudioModules/res/UMix.svg MINIRESOURCE_FILES += BogaudioModules/res/Unison-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Unison-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/Unison.svg MINIRESOURCE_FILES += BogaudioModules/res/VCA-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCA-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/VCA.svg # MINIRESOURCE_FILES += BogaudioModules/res/VCAmp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/VCAmp-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/VCAmp.svg MINIRESOURCE_FILES += BogaudioModules/res/VCF-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCF-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/VCF.svg # MINIRESOURCE_FILES += BogaudioModules/res/VCM-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/VCM-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/VCM.svg MINIRESOURCE_FILES += BogaudioModules/res/VCO-dark.svg MINIRESOURCE_FILES += BogaudioModules/res/VCO-latif.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCO-lowcontrast.svg MINIRESOURCE_FILES += BogaudioModules/res/VCO.svg # MINIRESOURCE_FILES += BogaudioModules/res/Velo-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Velo-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Velo.svg # MINIRESOURCE_FILES += BogaudioModules/res/Vish-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Vish-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Vish.svg # MINIRESOURCE_FILES += BogaudioModules/res/VU-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/VU-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/VU.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk2-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk2-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Walk2-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk2.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Walk-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk.svg # MINIRESOURCE_FILES += BogaudioModules/res/XCO-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/XCO-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/XCO-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/XCO.svg # MINIRESOURCE_FILES += BogaudioModules/res/XFade-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/XFade-lowcontrast.svg # MINIRESOURCE_FILES += BogaudioModules/res/XFade.svg MINIRESOURCE_FILES += Cardinal/res/HostAudio.svg diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index cd661401..8f7dabec 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -26,6 +26,10 @@ // Fundamental #include "Fundamental/src/plugin.hpp" +// Aria +extern Model* modelSpleet; +extern Model* modelSwerge; + // AudibleInstruments #include "AudibleInstruments/src/plugin.hpp" @@ -49,7 +53,6 @@ extern Model* modelOffset; extern Model* modelSampleHold; extern Model* modelSwitch; extern Model* modelSwitch18; -extern Model* modelUMix; extern Model* modelUnison; // ValleyAudio @@ -61,6 +64,7 @@ std::vector hostTerminalModels; // plugin instances Plugin* pluginInstance__Cardinal; Plugin* pluginInstance__Fundamental; +Plugin* pluginInstance__Aria; Plugin* pluginInstance__AudibleInstruments; Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__ValleyAudio; @@ -252,6 +256,41 @@ static void initStatic__Fundamental() } } +static void initStatic__Aria() +{ + Plugin* const p = new Plugin; + pluginInstance__Aria = p; + + const StaticPluginLoader spl(p, "AriaModules"); + if (spl.ok()) + { + p->addModel(modelSpleet); + p->addModel(modelSwerge); + + spl.removeModule("Aleister"); + spl.removeModule("Arcane"); + spl.removeModule("Atout"); + spl.removeModule("Blank"); + spl.removeModule("Darius"); + spl.removeModule("Grabby"); + spl.removeModule("Pokies4"); + spl.removeModule("Psychopump"); + spl.removeModule("Q"); + spl.removeModule("Qqqq"); + spl.removeModule("Quack"); + spl.removeModule("Quale"); + spl.removeModule("Rotatoes4"); + spl.removeModule("Smerge"); + spl.removeModule("Solomon16"); + spl.removeModule("Solomon4"); + spl.removeModule("Solomon8"); + spl.removeModule("Splirge"); + spl.removeModule("Splort"); + spl.removeModule("Undular"); + + } +} + static void initStatic__AudibleInstruments() { Plugin* const p = new Plugin; @@ -305,7 +344,6 @@ static void initStatic__BogaudioModules() p->addModel(modelSampleHold); p->addModel(modelSwitch); p->addModel(modelSwitch18); - p->addModel(modelUMix); p->addModel(modelUnison); // cat plugins/BogaudioModules/plugin.json | jq -r .modules[].slug - | sort @@ -400,6 +438,7 @@ static void initStatic__BogaudioModules() spl.removeModule("Bogaudio-Switch44"); spl.removeModule("Bogaudio-Switch81"); spl.removeModule("Bogaudio-Switch88"); + spl.removeModule("Bogaudio-UMix"); spl.removeModule("Bogaudio-VCAmp"); spl.removeModule("Bogaudio-VCM"); spl.removeModule("Bogaudio-Velo"); @@ -436,6 +475,7 @@ void initStaticPlugins() { initStatic__Cardinal(); initStatic__Fundamental(); + initStatic__Aria(); initStatic__AudibleInstruments(); initStatic__BogaudioModules(); initStatic__ValleyAudio(); From ea41e4de86093c483bdcd21553874ce6d7862c4b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 00:17:25 +0000 Subject: [PATCH 216/451] CI: Skip CardinalNative build on pluginval target Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5150b59..8c5fdf53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1195,7 +1195,7 @@ jobs: WITH_LTO: false run: | make features - make NOOPT=true SKIP_STRIPPING=true -j 1 + make NOOPT=true SKIP_STRIPPING=true jack lv2 vst2 vst3 clap -j 1 - name: Run Cardinal self-tests run: | # --exit-on-first-error=yes From f45825bd990a00a61e4b158e397e72a15f9754a3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 01:23:35 +0000 Subject: [PATCH 217/451] Add custom vcvtnq_s32_f32 implementation for armv7 Signed-off-by: falkTX --- deps/Makefile | 9 ++++++++ include/simd-compat/pmmintrin.h | 40 ++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index 4540c8e9..f7d2cb8d 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -337,6 +337,15 @@ SURGE_CXX_FLAGS += -msse -msse2 -mfpmath=sse endif endif +# same flags as applied to main build +SURGE_CXX_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 +SURGE_CXX_FLAGS += -DSIMDE_ENABLE_NATIVE_ALIASES +SURGE_CXX_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE +SURGE_CXX_FLAGS += -DSIMDE_FAST_MATH +SURGE_CXX_FLAGS += -DSIMDE_FAST_NANS +SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_MODE +SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_TIES + # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) # SURGE_CXX_FLAGS += -DJUCE_DSP_USE_STATIC_FFTW=1 diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 3fd9afc5..2e39a239 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -67,6 +67,45 @@ __m64 _mm_set1_pi16(short w) */ #else +// add missing calls, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95399 +# ifdef __arm__ +# include +// custom vcvtnq_s32_f32 implementation for armv7, based on _mm_cvtps_epi32 from sse2neon +/* + * sse2neon is freely redistributable under the MIT License. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +static __inline__ int32x4_t __attribute__((__always_inline__, __nodebug__)) +vcvtnq_s32_f32(const float32x4_t a) +{ + const uint32x4_t signmask = vdupq_n_u32(0x80000000); + const float32x4_t half = vbslq_f32(signmask, a, vdupq_n_f32(0.5f)); /* +/- 0.5 */ + const int32x4_t r_normal = vcvtq_s32_f32(vaddq_f32(a, half)); /* round to integer: [a + 0.5]*/ + const int32x4_t r_trunc = vcvtq_s32_f32(a); /* truncate to integer: [a] */ + const int32x4_t plusone = vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_s32(vnegq_s32(r_trunc)), 31)); /* 1 or 0 */ + const int32x4_t r_even = vbicq_s32(vaddq_s32(r_trunc, plusone), vdupq_n_s32(1)); /* ([a] + {0,1}) & ~1 */ + const float32x4_t delta = vsubq_f32(a, vcvtq_f32_s32(r_trunc)); /* compute delta: delta = (a - [a]) */ + const uint32x4_t is_delta_half = vceqq_f32(delta, half); /* delta == +/- 0.5 */ + return vbslq_s32(is_delta_half, r_even, r_normal); +} +# endif # define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES # define SIMDE_FAST_CONVERSION_RANGE @@ -77,5 +116,4 @@ __m64 _mm_set1_pi16(short w) # include "../simde/simde/x86/sse.h" # include "../simde/simde/x86/sse2.h" # include "../simde/simde/x86/sse3.h" - #endif From ea318c80103b67c1e4aec9d806299dc774943150 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 01:30:30 +0000 Subject: [PATCH 218/451] Revert previous commit, use newer simde instead Signed-off-by: falkTX --- include/simd-compat/pmmintrin.h | 39 --------------------------------- include/simde | 2 +- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 2e39a239..d16f1bf4 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -67,45 +67,6 @@ __m64 _mm_set1_pi16(short w) */ #else -// add missing calls, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95399 -# ifdef __arm__ -# include -// custom vcvtnq_s32_f32 implementation for armv7, based on _mm_cvtps_epi32 from sse2neon -/* - * sse2neon is freely redistributable under the MIT License. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -static __inline__ int32x4_t __attribute__((__always_inline__, __nodebug__)) -vcvtnq_s32_f32(const float32x4_t a) -{ - const uint32x4_t signmask = vdupq_n_u32(0x80000000); - const float32x4_t half = vbslq_f32(signmask, a, vdupq_n_f32(0.5f)); /* +/- 0.5 */ - const int32x4_t r_normal = vcvtq_s32_f32(vaddq_f32(a, half)); /* round to integer: [a + 0.5]*/ - const int32x4_t r_trunc = vcvtq_s32_f32(a); /* truncate to integer: [a] */ - const int32x4_t plusone = vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_s32(vnegq_s32(r_trunc)), 31)); /* 1 or 0 */ - const int32x4_t r_even = vbicq_s32(vaddq_s32(r_trunc, plusone), vdupq_n_s32(1)); /* ([a] + {0,1}) & ~1 */ - const float32x4_t delta = vsubq_f32(a, vcvtq_f32_s32(r_trunc)); /* compute delta: delta = (a - [a]) */ - const uint32x4_t is_delta_half = vceqq_f32(delta, half); /* delta == +/- 0.5 */ - return vbslq_s32(is_delta_half, r_even, r_normal); -} -# endif # define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES # define SIMDE_FAST_CONVERSION_RANGE diff --git a/include/simde b/include/simde index 12069d72..dd0b662f 160000 --- a/include/simde +++ b/include/simde @@ -1 +1 @@ -Subproject commit 12069d720f43830ae9791e8b0f4c4fa3c88012a0 +Subproject commit dd0b662fd8cf4b1617dbbb4d08aa053e512b08e4 From 93e0c1d7bf0a5108470765227245da4f77266144 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 02:05:23 +0000 Subject: [PATCH 219/451] Revert back a few things.. Signed-off-by: falkTX --- deps/Makefile | 14 +++++------ include/simd-compat/pmmintrin.h | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index f7d2cb8d..19d5a14a 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -338,13 +338,13 @@ endif endif # same flags as applied to main build -SURGE_CXX_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 -SURGE_CXX_FLAGS += -DSIMDE_ENABLE_NATIVE_ALIASES -SURGE_CXX_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE -SURGE_CXX_FLAGS += -DSIMDE_FAST_MATH -SURGE_CXX_FLAGS += -DSIMDE_FAST_NANS -SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_MODE -SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_TIES +# SURGE_CXX_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 +# SURGE_CXX_FLAGS += -DSIMDE_ENABLE_NATIVE_ALIASES +# SURGE_CXX_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE +# SURGE_CXX_FLAGS += -DSIMDE_FAST_MATH +# SURGE_CXX_FLAGS += -DSIMDE_FAST_NANS +# SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_MODE +# SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_TIES # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index d16f1bf4..01a91302 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -67,6 +67,48 @@ __m64 _mm_set1_pi16(short w) */ #else +// add missing calls, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95399 +# ifdef __arm__ +# define SIMDE_ARM_NEON_A64V8_NO_NATIVE +# if 0 +# include +// custom vcvtnq_s32_f32 implementation for armv7, based on _mm_cvtps_epi32 from sse2neon +/* + * sse2neon is freely redistributable under the MIT License. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +static __inline__ int32x4_t __attribute__((__always_inline__, __nodebug__)) +vcvtnq_s32_f32(const float32x4_t a) +{ + const uint32x4_t signmask = vdupq_n_u32(0x80000000); + const float32x4_t half = vbslq_f32(signmask, a, vdupq_n_f32(0.5f)); /* +/- 0.5 */ + const int32x4_t r_normal = vcvtq_s32_f32(vaddq_f32(a, half)); /* round to integer: [a + 0.5]*/ + const int32x4_t r_trunc = vcvtq_s32_f32(a); /* truncate to integer: [a] */ + const int32x4_t plusone = vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_s32(vnegq_s32(r_trunc)), 31)); /* 1 or 0 */ + const int32x4_t r_even = vbicq_s32(vaddq_s32(r_trunc, plusone), vdupq_n_s32(1)); /* ([a] + {0,1}) & ~1 */ + const float32x4_t delta = vsubq_f32(a, vcvtq_f32_s32(r_trunc)); /* compute delta: delta = (a - [a]) */ + const uint32x4_t is_delta_half = vceqq_f32(delta, half); /* delta == +/- 0.5 */ + return vbslq_s32(is_delta_half, r_even, r_normal); +} +# endif +# endif # define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES # define SIMDE_FAST_CONVERSION_RANGE From 48452d93d190c975c48ef636ba0dfcbd6e8d72ca Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 19:17:40 +0000 Subject: [PATCH 220/451] Fix pluginval CI step Signed-off-by: falkTX --- .github/workflows/build.yml | 5 +++-- include/simd-compat/pmmintrin.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c5fdf53..5793a713 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1185,7 +1185,7 @@ jobs: WITH_LTO: false run: | make features - make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc) + make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources dpf/utils/lv2_ttl_generator -j $(nproc) # single job for final build stage, otherwise we might get killed due to OOM - name: Build Cardinal (final build stage) env: @@ -1195,7 +1195,8 @@ jobs: WITH_LTO: false run: | make features - make NOOPT=true SKIP_STRIPPING=true jack lv2 vst2 vst3 clap -j 1 + make NOOPT=true SKIP_STRIPPING=true -C src jack lv2 vst2 vst3 clap -j 1 + ./dpf/utils/generate-ttl.sh - name: Run Cardinal self-tests run: | # --exit-on-first-error=yes diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 01a91302..42acbd45 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -69,7 +69,7 @@ __m64 _mm_set1_pi16(short w) #else // add missing calls, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95399 # ifdef __arm__ -# define SIMDE_ARM_NEON_A64V8_NO_NATIVE +//# define SIMDE_ARM_NEON_A64V8_NO_NATIVE # if 0 # include // custom vcvtnq_s32_f32 implementation for armv7, based on _mm_cvtps_epi32 from sse2neon From 82bbd00b75a605cc05dc1fdefddab6d1ca236892 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 20:12:32 +0000 Subject: [PATCH 221/451] Cleanup Signed-off-by: falkTX --- include/simd-compat/pmmintrin.h | 42 --------------------------------- 1 file changed, 42 deletions(-) diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index 42acbd45..d16f1bf4 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -67,48 +67,6 @@ __m64 _mm_set1_pi16(short w) */ #else -// add missing calls, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95399 -# ifdef __arm__ -//# define SIMDE_ARM_NEON_A64V8_NO_NATIVE -# if 0 -# include -// custom vcvtnq_s32_f32 implementation for armv7, based on _mm_cvtps_epi32 from sse2neon -/* - * sse2neon is freely redistributable under the MIT License. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -static __inline__ int32x4_t __attribute__((__always_inline__, __nodebug__)) -vcvtnq_s32_f32(const float32x4_t a) -{ - const uint32x4_t signmask = vdupq_n_u32(0x80000000); - const float32x4_t half = vbslq_f32(signmask, a, vdupq_n_f32(0.5f)); /* +/- 0.5 */ - const int32x4_t r_normal = vcvtq_s32_f32(vaddq_f32(a, half)); /* round to integer: [a + 0.5]*/ - const int32x4_t r_trunc = vcvtq_s32_f32(a); /* truncate to integer: [a] */ - const int32x4_t plusone = vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_s32(vnegq_s32(r_trunc)), 31)); /* 1 or 0 */ - const int32x4_t r_even = vbicq_s32(vaddq_s32(r_trunc, plusone), vdupq_n_s32(1)); /* ([a] + {0,1}) & ~1 */ - const float32x4_t delta = vsubq_f32(a, vcvtq_f32_s32(r_trunc)); /* compute delta: delta = (a - [a]) */ - const uint32x4_t is_delta_half = vceqq_f32(delta, half); /* delta == +/- 0.5 */ - return vbslq_s32(is_delta_half, r_even, r_normal); -} -# endif -# endif # define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES # define SIMDE_FAST_CONVERSION_RANGE From 696e4040093f9f36abf84f52b8aac91143970f29 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 20:13:49 +0000 Subject: [PATCH 222/451] fix macOS headless build Signed-off-by: falkTX --- .gitignore | 1 + include/OpenGL/gl.h | 39 +++++++++++++++++++++++++++++++++++++++ src/Makefile | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 include/OpenGL/gl.h diff --git a/.gitignore b/.gitignore index 8f76e40a..d30193b6 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ compile_commands.json /bin/ /build/ +/build-headless/ /deps/surge-build/ /documentation.pdf /jucewrapper/build/ diff --git a/include/OpenGL/gl.h b/include/OpenGL/gl.h new file mode 100644 index 00000000..da651aea --- /dev/null +++ b/include/OpenGL/gl.h @@ -0,0 +1,39 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021 Filipe Coelho + * + * 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. + */ + +#pragma once + +#ifdef HEADLESS +# define GL_COLOR_BUFFER_BIT 0 +# define GL_DEPTH_BUFFER_BIT 0 +# define GL_STENCIL_BUFFER_BIT 0 +# define GL_PROJECTION 0 +# define GL_TRIANGLES 0 +static inline void glBegin(int) {} +static inline void glEnd() {} +static inline void glColor3f(float, float, float) {} +static inline void glVertex3f(float, float, float) {} +static inline void glClear(int) {} +static inline void glClearColor(double, double, double, double) {} +static inline void glLoadIdentity() {} +static inline void glMatrixMode(int) {} +static inline void glOrtho(double, double, double, double, double, double) {} +static inline void glViewport(double, double, double, double) {} +typedef unsigned int GLuint; +#else +# include_next +#endif diff --git a/src/Makefile b/src/Makefile index 2654df4d..35270db7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -282,7 +282,7 @@ clap: $(TARGETS) $(MAKE) clap -C CardinalSynth $(CARDINAL_SYNTH_ARGS) clean: - rm -f $(TARGETS) + rm -f *.a rm -rf $(BUILD_DIR) $(MAKE) clean -C Cardinal $(MAKE) clean -C CardinalFX $(CARDINAL_FX_ARGS) From 2c3ab9547260d7fc65c4a362a54211b275bcd701 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 20:14:02 +0000 Subject: [PATCH 223/451] Show manual deploy options on mini variant, sometimes needed Signed-off-by: falkTX --- src/override/MenuBar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 82fd24ba..a390a348 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -172,7 +172,7 @@ struct FileButton : MenuButton { patchUtils::revertDialog(); }, APP->patch->path.empty())); -#if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI +#if defined(HAVE_LIBLO) || CARDINAL_VARIANT_MINI menu->addChild(new ui::MenuSeparator); remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); From 1ddcdee3630e6b5663e76ccd9680c167a8151711 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 1 Jan 2023 21:00:31 +0000 Subject: [PATCH 224/451] Ignore a few more messages for resending patch to remote Signed-off-by: falkTX --- src/Makefile | 1 + src/override/Scene.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 35270db7..42c01b96 100644 --- a/src/Makefile +++ b/src/Makefile @@ -266,6 +266,7 @@ native: $(TARGETS) lv2: $(TARGETS) $(MAKE) lv2 -C Cardinal $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) + $(MAKE) lv2 -C CardinalMini $(MAKE) lv2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) vst2: $(TARGETS) diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 561364bc..7cd9a483 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -45,6 +45,7 @@ #include "../CardinalCommon.hpp" #include "../CardinalRemote.hpp" +#include namespace rack { namespace app { @@ -215,7 +216,12 @@ void Scene::step() { internal->lastSceneChangeTime = time; } else if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) { const std::string& name(APP->history->actions[actionIndex - 1]->name); - if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") { + static const std::vector ignoredNames = { + "move knob", + "move module", + "move switch", + }; + if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) { printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str()); remoteUtils::sendFullPatchToRemote(remoteDetails); window::generateScreenshot(); From d67974284d6e406cdaf78019748a7883fae91d90 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2023 09:20:33 +0000 Subject: [PATCH 225/451] Tweak state flags Signed-off-by: falkTX --- src/CardinalPlugin.cpp | 14 ++++++-------- src/Makefile | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 413ced92..7afcd2aa 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -779,12 +779,9 @@ class CardinalPlugin : public CardinalBasePlugin { case kCardinalStatePatch: #if CARDINAL_VARIANT_MINI - state.hints = kStateIsHostWritable; + state.hints = kStateIsHostReadable; #else - state.hints = kStateIsBase64Blob; - #endif - #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS - state.hints |= kStateIsOnlyForDSP; + state.hints = kStateIsOnlyForDSP | kStateIsBase64Blob; #endif if (FILE* const f = std::fopen(context->patch->factoryTemplatePath.c_str(), "r")) { @@ -823,9 +820,10 @@ class CardinalPlugin : public CardinalBasePlugin break; #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) case kCardinalStateModuleInfos: - state.hints = 0x0; - #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS - state.hints |= kStateIsOnlyForDSP; + #if CARDINAL_VARIANT_MINI + state.hints = kStateIsHostReadable; + #else + state.hints = kStateIsOnlyForDSP; #endif state.defaultValue = "{}"; state.key = "moduleInfos"; diff --git a/src/Makefile b/src/Makefile index 42c01b96..a0398e3f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -244,7 +244,7 @@ all: $(TARGETS) ifeq ($(MOD_BUILD),true) $(MAKE) -C Cardinal lv2 $(MAKE) -C CardinalFX lv2 - $(MAKE) -C CardinalMini lv2 + $(MAKE) -C CardinalMini lv2_sep else ifeq ($(WASM),true) $(MAKE) -C CardinalNative else @@ -266,8 +266,8 @@ native: $(TARGETS) lv2: $(TARGETS) $(MAKE) lv2 -C Cardinal $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) - $(MAKE) lv2 -C CardinalMini $(MAKE) lv2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) + $(MAKE) lv2_sep -C CardinalMini vst2: $(TARGETS) $(MAKE) vst2 -C CardinalFX $(CARDINAL_FX_ARGS) From 30b60dd3b9b76005360931883795b267f1df36cd Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2023 12:51:14 +0000 Subject: [PATCH 226/451] CI: Add modgui spec to pluginval, needed for mini variant Signed-off-by: falkTX --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5793a713..3c588daf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1211,17 +1211,18 @@ jobs: - name: Validate LV2 ttl syntax run: | lv2_validate \ - /usr/lib/lv2/mod.lv2/*.ttl \ /usr/lib/lv2/kx-meta/*.ttl \ /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \ /usr/lib/lv2/kx-programs.lv2/*.ttl \ + /usr/lib/lv2/mod.lv2/*.ttl \ + /usr/lib/lv2/modgui.lv2/*.ttl \ ./bin/*.lv2/*.ttl - name: Validate LV2 metadata and binaries run: | export LV2_PATH=/tmp/lv2-path mkdir ${LV2_PATH} mv bin/CardinalFX.lv2 bin/CardinalSynth.lv2 ${LV2_PATH} - cp -r /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 ${LV2_PATH} + cp -r /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,modgui,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 ${LV2_PATH} xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) - name: Test LV2 plugin run: | From b94762a695724eabbf464f2c30c312d7b8708e4d Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2023 23:52:49 +0000 Subject: [PATCH 227/451] Sync wasm welcome patch to its updated version Signed-off-by: falkTX --- patches/welcome-wasm.vcv | 3126 +++++++++++++++++++------------------- 1 file changed, 1569 insertions(+), 1557 deletions(-) diff --git a/patches/welcome-wasm.vcv b/patches/welcome-wasm.vcv index 4e6dc0d1..8633c286 100644 --- a/patches/welcome-wasm.vcv +++ b/patches/welcome-wasm.vcv @@ -1,9 +1,29 @@ { "version": "2.1.2", - "zoom": 1.0, + "zoom": 0.82074141502380371, + "gridOffset": [ + -44.997005462646484, + -0.079142682254314423 + ], "modules": [ { - "id": 6532964214833122, + "id": 3538881790933672, + "plugin": "MindMeldModular", + "model": "PatchMasterBlank", + "version": "2.0", + "params": [], + "leftModuleId": 8631911439676095, + "rightModuleId": 7579603213780856, + "data": { + "facePlate": 0 + }, + "pos": [ + 65, + 0 + ] + }, + { + "id": 2859633263682263, "plugin": "MindMeldModular", "model": "PatchMaster", "version": "2.0", @@ -13,23 +33,23 @@ "id": 0 }, { - "value": 1.0, + "value": 0.40481904149055481, "id": 1 }, { - "value": 0.6337316632270813, + "value": 0.29517701268196106, "id": 2 }, { - "value": 0.45300984382629395, + "value": 0.81927722692489624, "id": 3 }, { - "value": 0.61325019598007202, + "value": 0.28915113210678101, "id": 4 }, { - "value": 0.75903826951980591, + "value": 0.32771065831184387, "id": 5 }, { @@ -41,14 +61,13 @@ "id": 7 } ], - "leftModuleId": 1748021940156784, - "rightModuleId": 7545907193641280, + "rightModuleId": 359762865999381, "data": { "miscSettings": 65793, "miscSettings2": 1, "tileInfos": [ - 181, - 217, + 180, + 179, 179, 179, 179, @@ -65,15 +84,15 @@ 155 ], "tileNames": [ - "Mute", - "Level", - "Chord Dist", - "Bass Top", - "Ringmod", - "Chord Dist", + "Reset", + "Melody Clock", + "Note Chance", + "Glide", + "MainDist", + "Rev+Dlay", "No name", "No name", - "Chods", + "Control", "No name", "No name", "No name", @@ -84,8 +103,8 @@ ], "maps": [ { - "moduleId": 7693134582131517, - "paramId": 8, + "moduleId": 3492788997026115, + "paramId": 12, "rangeMax": 1.0, "rangeMin": 0.0 }, @@ -108,10 +127,10 @@ "rangeMin": 0.0 }, { - "moduleId": 7693134582131517, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 + "moduleId": 3492788997026115, + "paramId": 2, + "rangeMax": 0.7439998984336853, + "rangeMin": 0.42600008845329285 }, { "moduleId": -1, @@ -132,10 +151,10 @@ "rangeMin": 0.0 }, { - "moduleId": 2364063745493562, - "paramId": 2, - "rangeMax": 0.3600081205368042, - "rangeMin": 0.0 + "moduleId": 2528905409371299, + "paramId": 0, + "rangeMax": 0.0, + "rangeMin": 1.0 }, { "moduleId": -1, @@ -156,15 +175,15 @@ "rangeMin": 0.0 }, { - "moduleId": -1, + "moduleId": 7545907193641280, "paramId": 0, - "rangeMax": 1.0, + "rangeMax": 0.14999982714653015, "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, + "moduleId": 7545907193641280, + "paramId": 2, + "rangeMax": 0.14999990165233612, "rangeMin": 0.0 }, { @@ -180,16 +199,16 @@ "rangeMin": 0.0 }, { - "moduleId": 2364063745493562, - "paramId": 5, - "rangeMax": 0.49200648069381714, - "rangeMin": 0.0 + "moduleId": 8500492434533465, + "paramId": 0, + "rangeMax": 0.85000193119049072, + "rangeMin": 0.40299832820892334 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 + "moduleId": 8500492434533465, + "paramId": 2, + "rangeMax": 0.47900623083114624, + "rangeMin": 0.73800313472747803 }, { "moduleId": -1, @@ -204,14 +223,14 @@ "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, + "moduleId": 1629089543055674, + "paramId": 9, "rangeMax": 1.0, "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, + "moduleId": 7411284708330475, + "paramId": 9, "rangeMax": 1.0, "rangeMin": 0.0 }, @@ -288,12 +307,12 @@ ], "tileOrders": [ 8, - 2, - 4, 0, 1, - -1, - -1, + 2, + 3, + 4, + 5, -1, -1, -1, @@ -324,38 +343,38 @@ ] }, "pos": [ - 19, + 10, 0 ] }, { - "id": 1748021940156784, - "plugin": "MindMeldModular", - "model": "PatchMaster", + "id": 3492788997026115, + "plugin": "ImpromptuModular", + "model": "Clocked", "version": "2.0", "params": [ { - "value": 0.0, + "value": 87.0, "id": 0 }, { - "value": 1.0, + "value": -9.0, "id": 1 }, { - "value": 1.0, + "value": 4.0, "id": 2 }, { - "value": 0.45300984382629395, + "value": 0.0, "id": 3 }, { - "value": 0.90603351593017578, + "value": 0.0, "id": 4 }, { - "value": 0.75903826951980591, + "value": 0.0, "id": 5 }, { @@ -365,796 +384,144 @@ { "value": 0.0, "id": 7 + }, + { + "value": 0.5, + "id": 8 + }, + { + "value": 0.5, + "id": 9 + }, + { + "value": 0.84217530488967896, + "id": 10 + }, + { + "value": 0.5, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 } ], - "leftModuleId": 359762865999381, - "rightModuleId": 6532964214833122, + "rightModuleId": 6206908039426907, "data": { - "miscSettings": 65793, - "miscSettings2": 1, - "tileInfos": [ - 181, - 217, - 179, - 179, - 179, - 179, - 51, - 51, - 155, - 155, - 155, - 155, - 155, - 155, - 155, - 155 - ], - "tileNames": [ - "Mute", - "Level", - "Bass Top", - "Bass Top", - "Filer Cutoff", - "Chord Dist", - "No name", - "No name", - "Bass", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name" - ], - "maps": [ - { - "moduleId": 7693134582131517, - "paramId": 10, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 7693134582131517, - "paramId": 29, - "rangeMax": 0.85500186681747437, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 1202888979525309, - "paramId": 9, - "rangeMax": 0.70200371742248535, - "rangeMin": 0.43799790740013123 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 2120522391757438, - "paramId": 0, - "rangeMax": 0.7510036826133728, - "rangeMin": 0.2460002601146698 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - } - ], - "radioLits": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "tileOrders": [ - 8, - 2, - 4, - 0, - 1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ], - "tileSettings": [ - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] + "panelTheme": 1, + "panelContrast": 220.0, + "running": true, + "displayDelayNoteMode": true, + "bpmDetectionMode": false, + "resetOnStartStop": 0, + "ppqn": 4, + "resetClockOutputsHigh": false, + "momentaryRunInput": true, + "forceCvOnBpmOut": false, + "clockMaster": false }, "pos": [ - 15, - 0 + 34, + 2 ] }, { - "id": 359762865999381, - "plugin": "MindMeldModular", - "model": "PatchMaster", + "id": 2528905409371299, + "plugin": "AudibleInstruments", + "model": "Branches", "version": "2.0", "params": [ { - "value": 0.0, + "value": 0.70482301712036133, "id": 0 }, { - "value": 1.0, + "value": 0.5, "id": 1 }, { - "value": 0.5807153582572937, + "value": 0.0, "id": 2 }, { - "value": 0.45300984382629395, + "value": 0.0, "id": 3 + } + ], + "leftModuleId": 3147629330555360, + "rightModuleId": 8858399717280256, + "data": { + "modes": [ + false, + false + ] + }, + "pos": [ + 83, + 2 + ] + }, + { + "id": 8858399717280256, + "plugin": "Bogaudio", + "model": "Bogaudio-SampleHold", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 }, { - "value": 0.31565791368484497, - "id": 4 + "value": 0.0, + "id": 1 }, { - "value": 0.75903826951980591, - "id": 5 + "value": 0.0, + "id": 2 }, { "value": 0.0, - "id": 6 + "id": 3 }, { "value": 0.0, - "id": 7 + "id": 4 + }, + { + "value": 0.0, + "id": 5 } ], - "leftModuleId": 2859633263682263, - "rightModuleId": 1748021940156784, - "data": { - "miscSettings": 65793, - "miscSettings2": 1, - "tileInfos": [ - 181, - 217, - 179, - 179, - 179, - 179, - 51, - 51, - 155, - 155, - 155, - 155, - 155, - 155, - 155, - 155 - ], - "tileNames": [ - "Mute", - "Level", - "Lead Dist", - "Bass Top", - "Dist Tone", - "Chord Dist", - "No name", - "No name", - "Lead", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name", - "No name" - ], - "maps": [ - { - "moduleId": 7693134582131517, - "paramId": 9, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 7693134582131517, - "paramId": 24, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 8631911439676095, - "paramId": 4, - "rangeMax": 0.44400703907012939, - "rangeMin": 0.0 - }, - { - "moduleId": 7354440315312540, - "paramId": 21, - "rangeMax": 0.67599606513977051, - "rangeMin": 0.75699460506439209 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": 8631911439676095, - "paramId": 1, - "rangeMax": 0.39900767803192139, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - }, - { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, - "rangeMin": 0.0 - } - ], - "radioLits": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "tileOrders": [ - 8, - 2, - 4, - 0, - 1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1, - -1 - ], - "tileSettings": [ - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - "pos": [ - 11, - 0 - ] - }, - { - "id": 3492788997026115, - "plugin": "ImpromptuModular", - "model": "Clocked", - "version": "2.0", - "params": [ - { - "value": 87.0, - "id": 0 - }, - { - "value": -9.0, - "id": 1 - }, - { - "value": 4.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.5, - "id": 8 - }, - { - "value": 0.5, - "id": 9 - }, - { - "value": 0.84217530488967896, - "id": 10 - }, - { - "value": 0.5, - "id": 11 - }, - { - "value": 0.0, - "id": 12 - }, - { - "value": 0.0, - "id": 13 - }, - { - "value": 0.0, - "id": 14 - }, - { - "value": 0.0, - "id": 15 - }, - { - "value": 0.0, - "id": 16 - }, - { - "value": 0.0, - "id": 17 - }, - { - "value": 0.0, - "id": 18 - }, - { - "value": 0.0, - "id": 19 - } - ], - "rightModuleId": 6206908039426907, - "data": { - "panelTheme": 1, - "panelContrast": 220.0, - "running": true, - "displayDelayNoteMode": true, - "bpmDetectionMode": false, - "resetOnStartStop": 0, - "ppqn": 4, - "resetClockOutputsHigh": false, - "momentaryRunInput": true, - "forceCvOnBpmOut": false, - "clockMaster": false - }, - "pos": [ - 28, - 2 - ] - }, - { - "id": 2528905409371299, - "plugin": "AudibleInstruments", - "model": "Branches", - "version": "2.0", - "params": [ - { - "value": 0.68915784358978271, - "id": 0 - }, - { - "value": 0.5, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - } - ], - "leftModuleId": 3147629330555360, - "rightModuleId": 8858399717280256, - "data": { - "modes": [ - false, - false - ] - }, - "pos": [ - 77, - 2 - ] - }, - { - "id": 8858399717280256, - "plugin": "Bogaudio", - "model": "Bogaudio-SampleHold", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - } - ], - "leftModuleId": 2528905409371299, - "rightModuleId": 1929072526365403, + "leftModuleId": 2528905409371299, + "rightModuleId": 1929072526365403, "data": { "poly_input": 0, "noise_type": 0, @@ -1163,71 +530,10 @@ "smoothing_ms": 0.0 }, "pos": [ - 83, - 2 - ] - }, - { - "id": 5599750386095483, - "plugin": "Bogaudio", - "model": "Bogaudio-Offset", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.10659158229827881, - "id": 1 - } - ], - "leftModuleId": 931699531175066, - "rightModuleId": 1660124145346554, - "data": { - "disableOutputLimit": false, - "offset_first": false - }, - "pos": [ - 92, + 89, 2 ] }, - { - "id": 8451952277485002, - "plugin": "Bogaudio", - "model": "Bogaudio-Slew", - "version": "2.0", - "params": [ - { - "value": 0.065060213208198547, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.49092867970466614, - "id": 2 - }, - { - "value": 0.34457814693450928, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - } - ], - "leftModuleId": 7614703401631065, - "rightModuleId": 7354440315312540, - "data": {}, - "pos": [ - 38, - 0 - ] - }, { "id": 7649815730956881, "plugin": "Bogaudio", @@ -1291,7 +597,7 @@ } ], "leftModuleId": 1232093242356119, - "rightModuleId": 7693134582131517, + "rightModuleId": 7744264450943662, "data": {}, "pos": [ 58, @@ -1363,7 +669,7 @@ "shouldTriggerOnLoad": true }, "pos": [ - 86, + 92, 2 ] }, @@ -1382,7 +688,7 @@ "rightModuleId": 5599750386095483, "data": {}, "pos": [ - 89, + 95, 2 ] }, @@ -1449,7 +755,7 @@ "range_scale": 1.0 }, "pos": [ - 48, + 54, 2 ] }, @@ -1722,7 +1028,7 @@ "autostepPaste": 0 }, "pos": [ - 54, + 60, 2 ] }, @@ -1942,7 +1248,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2221,7 +1527,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2248,7 +1554,7 @@ "version": "2.0", "params": [ { - "value": 3.0355033874511719, + "value": 0.23058414459228516, "id": 0 }, { @@ -2361,7 +1667,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2418,7 +1724,7 @@ "id": 8 }, { - "value": 0.70200371742248535, + "value": 0.5343744158744812, "id": 9 }, { @@ -2634,7 +1940,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -2845,204 +2151,89 @@ "id": 45 }, { - "value": 0.0, - "id": 46 - }, - { - "value": 0.0, - "id": 47 - }, - { - "value": 1.0, - "id": 48 - }, - { - "value": 0.0, - "id": 49 - }, - { - "value": 1.0, - "id": 50 - } - ], - "rightModuleId": 7649815730956881, - "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - }, - "modulespecific": { - "halfbandM": 6, - "halfbandSteep": true, - "doDCBlock": true - } - }, - "pos": [ - 4, - 1 - ] - }, - { - "id": 3147629330555360, - "plugin": "GrandeModular", - "model": "Merge8", - "version": "2.0", - "params": [], - "leftModuleId": 3623085877119332, - "rightModuleId": 2528905409371299, - "data": { - "channels_merge": -1 - }, - "pos": [ - 75, - 2 - ] - }, - { - "id": 1660124145346554, - "plugin": "ML_modules", - "model": "Quantum", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - }, - { - "value": 0.0, - "id": 10 - }, - { - "value": 0.0, - "id": 11 - } - ], - "leftModuleId": 5599750386095483, - "data": { - "scale": [ - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 1, - 0 - ], - "mode": 1, - "transpose_select": 1, - "toggle_mode": 1 - }, - "pos": [ - 95, - 2 - ] - }, - { - "id": 7545907193641280, - "plugin": "Bogaudio", - "model": "Bogaudio-Slew", - "version": "2.0", - "params": [ - { - "value": 0.17526623606681824, - "id": 0 - }, - { - "value": -0.33734920620918274, - "id": 1 + "value": 0.0, + "id": 46 }, { - "value": 0.17285659909248352, - "id": 2 + "value": 0.0, + "id": 47 }, { - "value": -0.41927692294120789, - "id": 3 + "value": 1.0, + "id": 48 }, { "value": 0.0, - "id": 4 + "id": 49 + }, + { + "value": 1.0, + "id": 50 } ], - "leftModuleId": 6532964214833122, - "rightModuleId": 7614703401631065, - "data": {}, + "rightModuleId": 7649815730956881, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, "pos": [ - 23, - 0 + 4, + 1 ] }, { - "id": 7614703401631065, + "id": 3147629330555360, + "plugin": "GrandeModular", + "model": "Merge8", + "version": "2.0", + "params": [], + "leftModuleId": 3623085877119332, + "rightModuleId": 2528905409371299, + "data": { + "channels_merge": -1 + }, + "pos": [ + 81, + 2 + ] + }, + { + "id": 6408811696897743, "plugin": "SurgeXTRack", - "model": "SurgeXTOSCTwist", + "model": "SurgeXTOSCModern", "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.0, "id": 0 }, { - "value": 0.004999999888241291, + "value": 1.0, "id": 1 }, { - "value": 0.5, + "value": 0.62471598386764526, "id": 2 }, { - "value": 0.18885940313339233, + "value": 0.60414427518844604, "id": 3 }, { - "value": 0.68385952711105347, + "value": 0.5, "id": 4 }, { @@ -3050,11 +2241,11 @@ "id": 5 }, { - "value": 0.91899901628494263, + "value": 0.094571217894554138, "id": 6 }, { - "value": 0.5, + "value": 0.13726678490638733, "id": 7 }, { @@ -3230,12 +2421,11 @@ "id": 50 } ], - "leftModuleId": 7545907193641280, - "rightModuleId": 8451952277485002, + "rightModuleId": 977849113384714, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -3250,46 +2440,81 @@ } }, "pos": [ - 26, - 0 + 15, + 2 ] }, { - "id": 7354440315312540, + "id": 977849113384714, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 6408811696897743, + "rightModuleId": 1132602188892100, + "pos": [ + 27, + 2 + ] + }, + { + "id": 1132602188892100, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 977849113384714, + "pos": [ + 30, + 2 + ] + }, + { + "id": 2364063745493562, "plugin": "SurgeXTRack", - "model": "SurgeXTVCF", + "model": "SurgeXTMixer", "version": "2.0", "params": [ { - "value": 0.23143219947814941, + "value": 0.0, "id": 0 }, { - "value": 0.53199803829193115, + "value": 0.0, "id": 1 }, { - "value": 1.9437248706817627, + "value": 0.22814854979515076, "id": 2 }, { - "value": 1.0, + "value": 0.0, "id": 3 }, { - "value": 0.50480771064758301, + "value": 0.0, "id": 4 }, { - "value": 0.0, + "value": 0.30172306299209595, "id": 5 }, { - "value": 1.0, + "value": 0.37028577923774719, "id": 6 }, { - "value": 0.0, + "value": 1.0, "id": 7 }, { @@ -3309,7 +2534,7 @@ "id": 11 }, { - "value": 0.0, + "value": 1.0, "id": 12 }, { @@ -3341,11 +2566,11 @@ "id": 19 }, { - "value": 0.0, + "value": 0.88200151920318604, "id": 20 }, { - "value": 0.41991496086120605, + "value": 0.0, "id": 21 }, { @@ -3357,73 +2582,176 @@ "id": 23 }, { - "value": 0.0, + "value": 1.0, "id": 24 }, { - "value": 16.0, + "value": 0.0, "id": 25 }, { - "value": 3.0, + "value": 0.0, "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.2260001003742218, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.67200368642807007, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 0.0, + "id": 48 + }, + { + "value": 0.0, + "id": 49 + }, + { + "value": 0.0, + "id": 50 + }, + { + "value": 0.0, + "id": 51 } ], - "leftModuleId": 8451952277485002, - "rightModuleId": 8631911439676095, + "leftModuleId": 7649815730956881, + "rightModuleId": 8524145861178282, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, "localModulationColor": 900005, "localControlValueColor": 900001, "localPowerButtonColor": 900003 + }, + "modulespecific": { + "vuChannel": 0 } }, "pos": [ - 41, - 0 + 19, + 1 ] }, { - "id": 8631911439676095, + "id": 8524145861178282, "plugin": "SurgeXTRack", - "model": "SurgeXTFXExciter", + "model": "SurgeXTFXChorus", "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.1591431051492691, "id": 0 }, { - "value": 0.12594993412494659, + "value": 0.6618039608001709, "id": 1 }, { - "value": 0.49999994039535522, + "value": 0.41764268279075623, "id": 2 }, { - "value": 0.49999994039535522, + "value": 0.26871439814567566, "id": 3 }, { - "value": 0.25784170627593994, + "value": 0.27980762720108032, "id": 4 }, { - "value": 0.0, + "value": 0.96663463115692139, "id": 5 }, { - "value": 0.0, + "value": 0.42299914360046387, "id": 6 }, { - "value": 0.0, + "value": 0.5, "id": 7 }, { @@ -3633,14 +2961,22 @@ { "value": 0.0, "id": 59 + }, + { + "value": 1.0, + "id": 60 + }, + { + "value": 1.0, + "id": 61 } ], - "leftModuleId": 7354440315312540, - "rightModuleId": 3538881790933672, + "leftModuleId": 2364063745493562, + "rightModuleId": 1772638206753921, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -3650,40 +2986,41 @@ }, "modulespecific": { "loadedPreset": 0, - "presetName": "Init", + "presetName": "Init (Dry)", "presetIsDirty": true, + "clockStyle": 0, "polyphonicMode": false } }, "pos": [ - 53, - 0 + 31, + 1 ] }, { - "id": 6408811696897743, + "id": 1772638206753921, "plugin": "SurgeXTRack", - "model": "SurgeXTOSCModern", + "model": "SurgeXTWaveshaper", "version": "2.0", "params": [ { - "value": 0.0, + "value": 7.0902948379516602, "id": 0 }, { - "value": 1.0, + "value": 0.0, "id": 1 }, { - "value": 0.62471598386764526, + "value": 0.46771752834320068, "id": 2 }, { - "value": 0.60414427518844604, + "value": -23.228555679321289, "id": 3 }, { - "value": 0.5, + "value": 34.732803344726562, "id": 4 }, { @@ -3691,11 +3028,11 @@ "id": 5 }, { - "value": 0.094571217894554138, + "value": 0.0, "id": 6 }, { - "value": 0.13726678490638733, + "value": 0.0, "id": 7 }, { @@ -3719,7 +3056,7 @@ "id": 12 }, { - "value": 0.0, + "value": 0.094000227749347687, "id": 13 }, { @@ -3767,204 +3104,214 @@ "id": 24 }, { - "value": 0.0, + "value": 41.0, "id": 25 }, { - "value": 0.0, + "value": 1.0, "id": 26 }, { - "value": 0.0, + "value": 1.0, "id": 27 - }, - { - "value": 0.0, - "id": 28 - }, - { - "value": 0.0, - "id": 29 - }, - { - "value": 0.0, - "id": 30 - }, - { - "value": 0.0, - "id": 31 - }, - { - "value": 0.0, - "id": 32 - }, - { - "value": 0.0, - "id": 33 - }, - { - "value": 0.0, - "id": 34 - }, + } + ], + "leftModuleId": 8524145861178282, + "rightModuleId": 1232093242356119, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 43, + 1 + ] + }, + { + "id": 5599750386095483, + "plugin": "Bogaudio", + "model": "Bogaudio-Offset", + "version": "2.0", + "params": [ { "value": 0.0, - "id": 35 + "id": 0 }, { - "value": 0.0, - "id": 36 - }, + "value": 0.11173717677593231, + "id": 1 + } + ], + "leftModuleId": 931699531175066, + "rightModuleId": 1660124145346554, + "data": { + "disableOutputLimit": false, + "offset_first": false + }, + "pos": [ + 98, + 2 + ] + }, + { + "id": 1660124145346554, + "plugin": "ML_modules", + "model": "Quantum", + "version": "2.0", + "params": [ { "value": 0.0, - "id": 37 + "id": 0 }, { "value": 0.0, - "id": 38 + "id": 1 }, { "value": 0.0, - "id": 39 + "id": 2 }, { "value": 0.0, - "id": 40 + "id": 3 }, { "value": 0.0, - "id": 41 + "id": 4 }, { "value": 0.0, - "id": 42 + "id": 5 }, { "value": 0.0, - "id": 43 + "id": 6 }, { "value": 0.0, - "id": 44 + "id": 7 }, { "value": 0.0, - "id": 45 + "id": 8 }, { "value": 0.0, - "id": 46 + "id": 9 }, { "value": 0.0, - "id": 47 - }, - { - "value": 1.0, - "id": 48 + "id": 10 }, { "value": 0.0, - "id": 49 - }, - { - "value": 1.0, - "id": 50 + "id": 11 } ], - "rightModuleId": 977849113384714, + "leftModuleId": 5599750386095483, "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - }, - "modulespecific": { - "halfbandM": 6, - "halfbandSteep": true, - "doDCBlock": true - } + "scale": [ + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "mode": 1, + "transpose_select": 1, + "toggle_mode": 1 }, "pos": [ - 9, + 101, 2 ] }, { - "id": 977849113384714, - "plugin": "Fundamental", - "model": "Sum", + "id": 7545907193641280, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.12289144098758698, "id": 0 - } - ], - "leftModuleId": 6408811696897743, - "rightModuleId": 1132602188892100, - "pos": [ - 21, - 2 - ] - }, - { - "id": 1132602188892100, - "plugin": "Fundamental", - "model": "Sum", - "version": "2.0", - "params": [ + }, { - "value": 1.0, - "id": 0 + "value": -0.33734920620918274, + "id": 1 + }, + { + "value": 0.12289150059223175, + "id": 2 + }, + { + "value": -0.41927692294120789, + "id": 3 + }, + { + "value": 0.0, + "id": 4 } ], - "leftModuleId": 977849113384714, + "leftModuleId": 6532964214833122, + "rightModuleId": 7614703401631065, + "data": {}, "pos": [ - 24, - 2 + 26, + 0 ] }, { - "id": 2364063745493562, + "id": 7614703401631065, "plugin": "SurgeXTRack", - "model": "SurgeXTMixer", + "model": "SurgeXTOSCTwist", "version": "2.0", "params": [ { - "value": 0.0, + "value": 1.0, "id": 0 }, { - "value": 0.0, + "value": 0.004999999888241291, "id": 1 }, { - "value": 0.22814854979515076, + "value": 0.5, "id": 2 }, { - "value": 0.0, + "value": 0.18885940313339233, "id": 3 }, { - "value": 0.0, + "value": 0.68385952711105347, "id": 4 }, { - "value": 0.30172306299209595, + "value": 0.0, "id": 5 }, { - "value": 0.37028577923774719, + "value": 0.91899901628494263, "id": 6 }, { - "value": 1.0, + "value": 0.5, "id": 7 }, { @@ -3984,7 +3331,7 @@ "id": 11 }, { - "value": 1.0, + "value": 0.0, "id": 12 }, { @@ -4016,7 +3363,7 @@ "id": 19 }, { - "value": 0.88200151920318604, + "value": 0.0, "id": 20 }, { @@ -4032,7 +3379,7 @@ "id": 23 }, { - "value": 1.0, + "value": 0.0, "id": 24 }, { @@ -4048,7 +3395,7 @@ "id": 27 }, { - "value": 0.2260001003742218, + "value": 0.0, "id": 28 }, { @@ -4064,7 +3411,7 @@ "id": 31 }, { - "value": 0.67200368642807007, + "value": 0.0, "id": 32 }, { @@ -4128,7 +3475,7 @@ "id": 47 }, { - "value": 0.0, + "value": 1.0, "id": 48 }, { @@ -4136,20 +3483,16 @@ "id": 49 }, { - "value": 0.0, + "value": 1.0, "id": 50 - }, - { - "value": 0.0, - "id": 51 } ], - "leftModuleId": 7649815730956881, - "rightModuleId": 8524145861178282, + "leftModuleId": 7545907193641280, + "rightModuleId": 7354440315312540, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -4158,50 +3501,52 @@ "localPowerButtonColor": 900003 }, "modulespecific": { - "vuChannel": 0 + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true } }, "pos": [ - 19, - 1 + 29, + 0 ] }, { - "id": 8524145861178282, + "id": 7354440315312540, "plugin": "SurgeXTRack", - "model": "SurgeXTFXChorus", + "model": "SurgeXTVCF", "version": "2.0", "params": [ { - "value": 0.1591431051492691, + "value": 0.23143219947814941, "id": 0 }, { - "value": 0.6618039608001709, + "value": 0.53199803829193115, "id": 1 }, { - "value": 0.41764268279075623, + "value": 1.9437248706817627, "id": 2 }, { - "value": 0.26871439814567566, + "value": 1.0, "id": 3 }, { - "value": 0.27980762720108032, + "value": 1.4485224485397339, "id": 4 }, { - "value": 0.96663463115692139, + "value": 0.0, "id": 5 }, { - "value": 0.42299914360046387, + "value": 1.0, "id": 6 }, { - "value": 0.5, + "value": 0.0, "id": 7 }, { @@ -4257,7 +3602,7 @@ "id": 20 }, { - "value": 0.0, + "value": 0.44938600063323975, "id": 21 }, { @@ -4273,315 +3618,337 @@ "id": 24 }, { - "value": 0.0, + "value": 16.0, "id": 25 }, { - "value": 0.0, + "value": 3.0, "id": 26 - }, + } + ], + "leftModuleId": 7614703401631065, + "rightModuleId": 8631911439676095, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 41, + 0 + ] + }, + { + "id": 8631911439676095, + "plugin": "SurgeXTRack", + "model": "SurgeXTFXExciter", + "version": "2.0", + "params": [ { - "value": 0.0, - "id": 27 + "value": 1.0, + "id": 0 }, { - "value": 0.0, - "id": 28 + "value": 0.24036593735218048, + "id": 1 }, { - "value": 0.0, - "id": 29 + "value": 0.49999994039535522, + "id": 2 }, { - "value": 0.0, - "id": 30 + "value": 0.49999994039535522, + "id": 3 }, { - "value": 0.0, - "id": 31 + "value": 0.17706665396690369, + "id": 4 }, { "value": 0.0, - "id": 32 + "id": 5 }, { "value": 0.0, - "id": 33 + "id": 6 }, { "value": 0.0, - "id": 34 + "id": 7 }, { "value": 0.0, - "id": 35 + "id": 8 }, { "value": 0.0, - "id": 36 + "id": 9 }, { "value": 0.0, - "id": 37 + "id": 10 }, { "value": 0.0, - "id": 38 + "id": 11 }, { - "value": 0.0, - "id": 39 + "value": -1.0, + "id": 12 }, { "value": 0.0, - "id": 40 + "id": 13 }, { "value": 0.0, - "id": 41 + "id": 14 }, { "value": 0.0, - "id": 42 + "id": 15 }, { "value": 0.0, - "id": 43 + "id": 16 }, { "value": 0.0, - "id": 44 + "id": 17 }, { "value": 0.0, - "id": 45 + "id": 18 }, { "value": 0.0, - "id": 46 + "id": 19 }, { "value": 0.0, - "id": 47 + "id": 20 }, { "value": 0.0, - "id": 48 + "id": 21 }, { "value": 0.0, - "id": 49 + "id": 22 }, { "value": 0.0, - "id": 50 + "id": 23 }, { "value": 0.0, - "id": 51 + "id": 24 }, { "value": 0.0, - "id": 52 + "id": 25 }, { "value": 0.0, - "id": 53 + "id": 26 }, { "value": 0.0, - "id": 54 + "id": 27 }, { "value": 0.0, - "id": 55 + "id": 28 }, { "value": 0.0, - "id": 56 + "id": 29 }, { "value": 0.0, - "id": 57 + "id": 30 }, { "value": 0.0, - "id": 58 + "id": 31 }, { "value": 0.0, - "id": 59 - }, - { - "value": 1.0, - "id": 60 - }, - { - "value": 1.0, - "id": 61 - } - ], - "leftModuleId": 2364063745493562, - "rightModuleId": 1772638206753921, - "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - }, - "modulespecific": { - "loadedPreset": 0, - "presetName": "Init (Dry)", - "presetIsDirty": true, - "clockStyle": 0, - "polyphonicMode": false - } - }, - "pos": [ - 31, - 1 - ] - }, - { - "id": 1772638206753921, - "plugin": "SurgeXTRack", - "model": "SurgeXTWaveshaper", - "version": "2.0", - "params": [ - { - "value": 7.0902948379516602, - "id": 0 + "id": 32 }, { "value": 0.0, - "id": 1 + "id": 33 }, { - "value": 0.46771752834320068, - "id": 2 + "value": 0.0, + "id": 34 }, { - "value": -23.228555679321289, - "id": 3 + "value": 0.0, + "id": 35 }, { - "value": 34.732803344726562, - "id": 4 + "value": 0.0, + "id": 36 }, { "value": 0.0, - "id": 5 + "id": 37 }, { "value": 0.0, - "id": 6 + "id": 38 }, { "value": 0.0, - "id": 7 + "id": 39 }, { "value": 0.0, - "id": 8 + "id": 40 }, { "value": 0.0, - "id": 9 + "id": 41 }, { "value": 0.0, - "id": 10 + "id": 42 }, { "value": 0.0, - "id": 11 + "id": 43 }, { "value": 0.0, - "id": 12 + "id": 44 }, { - "value": 0.094000227749347687, - "id": 13 + "value": 0.0, + "id": 45 }, { "value": 0.0, - "id": 14 + "id": 46 }, { "value": 0.0, - "id": 15 + "id": 47 }, { "value": 0.0, - "id": 16 + "id": 48 }, { "value": 0.0, - "id": 17 + "id": 49 }, { "value": 0.0, - "id": 18 + "id": 50 }, { "value": 0.0, - "id": 19 + "id": 51 }, { "value": 0.0, - "id": 20 + "id": 52 }, { "value": 0.0, - "id": 21 + "id": 53 }, { "value": 0.0, - "id": 22 + "id": 54 }, { "value": 0.0, - "id": 23 + "id": 55 }, { "value": 0.0, - "id": 24 + "id": 56 }, { - "value": 41.0, - "id": 25 + "value": 0.0, + "id": 57 }, { - "value": 1.0, - "id": 26 + "value": 0.0, + "id": 58 }, { - "value": 1.0, - "id": 27 + "value": 0.0, + "id": 59 } ], - "leftModuleId": 8524145861178282, - "rightModuleId": 1232093242356119, + "leftModuleId": 7354440315312540, + "rightModuleId": 3538881790933672, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, "localModulationColor": 900005, "localControlValueColor": 900001, "localPowerButtonColor": 900003 + }, + "modulespecific": { + "loadedPreset": 0, + "presetName": "Init", + "presetIsDirty": true, + "polyphonicMode": false } }, "pos": [ - 43, + 53, + 0 + ] + }, + { + "id": 7744264450943662, + "plugin": "Bogaudio", + "model": "Bogaudio-Slew", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.076470956206321716, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 8078887273046425, + "rightModuleId": 7693134582131517, + "data": {}, + "pos": [ + 61, 1 ] }, @@ -4592,7 +3959,7 @@ "version": "2.0", "params": [ { - "value": 1.0, + "value": 0.89600133895874023, "id": 0 }, { @@ -4688,7 +4055,7 @@ "id": 23 }, { - "value": 0.8123, + "value": 0.80400252342224121, "id": 24 }, { @@ -4696,7 +4063,7 @@ "id": 25 }, { - "value": 0.0, + "value": -0.1679999977350235, "id": 26 }, { @@ -4708,7 +4075,7 @@ "id": 28 }, { - "value": 0.71000373363494873, + "value": 0.58688509464263916, "id": 29 }, { @@ -4800,12 +4167,12 @@ "id": 51 } ], - "leftModuleId": 8078887273046425, + "leftModuleId": 7744264450943662, "rightModuleId": 1629089543055674, "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -4818,7 +4185,7 @@ } }, "pos": [ - 61, + 64, 1 ] }, @@ -4865,7 +4232,7 @@ "id": 8 }, { - "value": 0.26585954427719116, + "value": 0.32771065831184387, "id": 9 }, { @@ -5034,7 +4401,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -5047,7 +4414,7 @@ } }, "pos": [ - 73, + 76, 1 ] }, @@ -5094,7 +4461,7 @@ "id": 8 }, { - "value": 0.39957103133201599, + "value": 0.32771065831184387, "id": 9 }, { @@ -5303,7 +4670,7 @@ "data": { "xtshared": { "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", "isCoupledToGlobalStyle": true, "localStyle": 10001, "localDisplayRegionColor": 900001, @@ -5319,38 +4686,502 @@ } }, "pos": [ - 85, - 1 + 88, + 1 + ] + }, + { + "id": 8500492434533465, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": 1.5479965209960938, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 1.3262277841567993, + "id": 2 + }, + { + "value": -60.0, + "id": 3 + }, + { + "value": 70.0, + "id": 4 + }, + { + "value": -0.12199990451335907, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 1.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + } + ], + "leftModuleId": 7411284708330475, + "rightModuleId": 1, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 20 2022 09:19:54", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + } + }, + "pos": [ + 100, + 1 + ] + }, + { + "id": 359762865999381, + "plugin": "MindMeldModular", + "model": "PatchMaster", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.90200126171112061, + "id": 1 + }, + { + "value": 0.39879244565963745, + "id": 2 + }, + { + "value": 0.45300984382629395, + "id": 3 + }, + { + "value": 0.60240930318832397, + "id": 4 + }, + { + "value": 0.75903826951980591, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + } + ], + "leftModuleId": 2859633263682263, + "rightModuleId": 1748021940156784, + "data": { + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Lead Dist", + "Bass Top", + "Dist Tone", + "Chord Dist", + "No name", + "No name", + "Lead", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 9, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 24, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 4, + "rangeMax": 0.44400703907012939, + "rangeMin": 0.0 + }, + { + "moduleId": 7354440315312540, + "paramId": 21, + "rangeMax": 0.67599606513977051, + "rangeMin": 0.75699460506439209 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 8631911439676095, + "paramId": 1, + "rangeMax": 0.39900767803192139, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "pos": [ + 14, + 0 ] }, { - "id": 8500492434533465, - "plugin": "SurgeXTRack", - "model": "SurgeXTWaveshaper", + "id": 1748021940156784, + "plugin": "MindMeldModular", + "model": "PatchMaster", "version": "2.0", "params": [ { - "value": 13.206838607788086, + "value": 0.0, "id": 0 }, { - "value": 0.0, + "value": 0.92800092697143555, "id": 1 }, { - "value": 1.0, + "value": 0.36505457758903503, "id": 2 }, { - "value": -60.0, + "value": 0.45300984382629395, "id": 3 }, { - "value": 70.0, + "value": 0.35060781240463257, "id": 4 }, { - "value": -0.12199990451335907, + "value": 0.75903826951980591, "id": 5 }, { @@ -5360,109 +5191,297 @@ { "value": 0.0, "id": 7 - }, - { - "value": 0.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - }, - { - "value": 0.0, - "id": 10 - }, - { - "value": 0.0, - "id": 11 - }, - { - "value": 0.0, - "id": 12 - }, - { - "value": 0.0, - "id": 13 - }, - { - "value": 0.0, - "id": 14 - }, - { - "value": 0.0, - "id": 15 - }, - { - "value": 0.0, - "id": 16 - }, - { - "value": 0.0, - "id": 17 - }, - { - "value": 0.0, - "id": 18 - }, - { - "value": 0.0, - "id": 19 - }, - { - "value": 0.0, - "id": 20 - }, - { - "value": 0.0, - "id": 21 - }, - { - "value": 0.0, - "id": 22 - }, - { - "value": 0.0, - "id": 23 - }, - { - "value": 0.0, - "id": 24 - }, - { - "value": 1.0, - "id": 25 - }, - { - "value": 0.0, - "id": 26 - }, - { - "value": 0.0, - "id": 27 } ], - "leftModuleId": 7411284708330475, - "rightModuleId": 1, + "leftModuleId": 359762865999381, + "rightModuleId": 6532964214833122, "data": { - "xtshared": { - "streamingVersion": 1, - "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Dec 13 2022 14:33:27", - "isCoupledToGlobalStyle": true, - "localStyle": 10001, - "localDisplayRegionColor": 900001, - "localModulationColor": 900005, - "localControlValueColor": 900001, - "localPowerButtonColor": 900003 - } + "miscSettings": 65793, + "miscSettings2": 1, + "tileInfos": [ + 181, + 217, + 179, + 179, + 179, + 179, + 51, + 51, + 155, + 155, + 155, + 155, + 155, + 155, + 155, + 155 + ], + "tileNames": [ + "Mute", + "Level", + "Bass Top", + "Bass Top", + "Filer Cutoff", + "Chord Dist", + "No name", + "No name", + "Bass", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name", + "No name" + ], + "maps": [ + { + "moduleId": 7693134582131517, + "paramId": 10, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 7693134582131517, + "paramId": 29, + "rangeMax": 0.85500186681747437, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 1202888979525309, + "paramId": 9, + "rangeMax": 0.70200371742248535, + "rangeMin": 0.43799790740013123 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": 2120522391757438, + "paramId": 0, + "rangeMax": 0.7510036826133728, + "rangeMin": 0.2460002601146698 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + }, + { + "moduleId": -1, + "paramId": 0, + "rangeMax": 1.0, + "rangeMin": 0.0 + } + ], + "radioLits": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "tileOrders": [ + 8, + 2, + 4, + 0, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ], + "tileSettings": [ + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] }, "pos": [ - 97, - 1 + 18, + 0 ] }, { - "id": 2859633263682263, + "id": 6532964214833122, "plugin": "MindMeldModular", "model": "PatchMaster", "version": "2.0", @@ -5472,19 +5491,19 @@ "id": 0 }, { - "value": 0.0, + "value": 0.89600133895874023, "id": 1 }, { - "value": 0.0, + "value": 0.6337316632270813, "id": 2 }, { - "value": 0.51688289642333984, + "value": 0.45300984382629395, "id": 3 }, { - "value": 0.21083655953407288, + "value": 0.61325019598007202, "id": 4 }, { @@ -5500,13 +5519,14 @@ "id": 7 } ], - "rightModuleId": 359762865999381, + "leftModuleId": 1748021940156784, + "rightModuleId": 7545907193641280, "data": { "miscSettings": 65793, "miscSettings2": 1, "tileInfos": [ - 180, - 180, + 181, + 217, 179, 179, 179, @@ -5523,15 +5543,15 @@ 155 ], "tileNames": [ - "Reset", - "Run", - "Lead Dist", + "Mute", + "Level", + "Chord Dist", "Bass Top", - "Dist Tone", + "Ringmod", "Chord Dist", "No name", "No name", - "Control", + "Chods", "No name", "No name", "No name", @@ -5542,8 +5562,8 @@ ], "maps": [ { - "moduleId": 3492788997026115, - "paramId": 12, + "moduleId": 7693134582131517, + "paramId": 8, "rangeMax": 1.0, "rangeMin": 0.0 }, @@ -5566,7 +5586,7 @@ "rangeMin": 0.0 }, { - "moduleId": -1, + "moduleId": 7693134582131517, "paramId": 0, "rangeMax": 1.0, "rangeMin": 0.0 @@ -5590,9 +5610,9 @@ "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, + "moduleId": 2364063745493562, + "paramId": 2, + "rangeMax": 0.3600081205368042, "rangeMin": 0.0 }, { @@ -5638,9 +5658,9 @@ "rangeMin": 0.0 }, { - "moduleId": -1, - "paramId": 0, - "rangeMax": 1.0, + "moduleId": 2364063745493562, + "paramId": 5, + "rangeMax": 0.49200648069381714, "rangeMin": 0.0 }, { @@ -5746,10 +5766,10 @@ ], "tileOrders": [ 8, + 2, + 4, 0, - -1, - -1, - -1, + 1, -1, -1, -1, @@ -5782,23 +5802,7 @@ ] }, "pos": [ - 7, - 0 - ] - }, - { - "id": 3538881790933672, - "plugin": "MindMeldModular", - "model": "PatchMasterBlank", - "version": "2.0", - "params": [], - "leftModuleId": 8631911439676095, - "rightModuleId": 7579603213780856, - "data": { - "facePlate": 0 - }, - "pos": [ - 65, + 22, 0 ] }, @@ -5809,7 +5813,7 @@ "version": "2.0", "params": [ { - "value": 1.1885021924972534, + "value": 1.1899975538253784, "id": 0 } ], @@ -5818,7 +5822,7 @@ "dcFilter": true }, "pos": [ - 109, + 112, 1 ] } @@ -5984,14 +5988,6 @@ "inputId": 0, "color": "#e8ff52" }, - { - "id": 4218135157649869, - "outputModuleId": 8858399717280256, - "outputId": 0, - "inputModuleId": 5599750386095483, - "inputId": 2, - "color": "#a8ff52" - }, { "id": 2550860768686067, "outputModuleId": 7614703401631065, @@ -6008,14 +6004,6 @@ "inputId": 0, "color": "#52ffff" }, - { - "id": 6208990526502806, - "outputModuleId": 8451952277485002, - "outputId": 0, - "inputModuleId": 7354440315312540, - "inputId": 2, - "color": "#527dff" - }, { "id": 3879998451215591, "outputModuleId": 3492788997026115, @@ -6336,14 +6324,6 @@ "inputId": 2, "color": "#e8ff52" }, - { - "id": 6602799437633275, - "outputModuleId": 3492788997026115, - "outputId": 2, - "inputModuleId": 8451952277485002, - "inputId": 2, - "color": "#67ff52" - }, { "id": 192850560558353, "outputModuleId": 3492788997026115, @@ -6367,6 +6347,38 @@ "inputModuleId": 1772638206753921, "inputId": 2, "color": "#a8ff52" + }, + { + "id": 2398088907667742, + "outputModuleId": 8631911439676095, + "outputId": 0, + "inputModuleId": 7744264450943662, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 2878078552254813, + "outputModuleId": 7744264450943662, + "outputId": 0, + "inputModuleId": 7693134582131517, + "inputId": 8, + "color": "#ff9352" + }, + { + "id": 4221700082511182, + "outputModuleId": 7545907193641280, + "outputId": 0, + "inputModuleId": 8631911439676095, + "inputId": 5, + "color": "#ff5252" + }, + { + "id": 655041172928169, + "outputModuleId": 8858399717280256, + "outputId": 0, + "inputModuleId": 5599750386095483, + "inputId": 2, + "color": "#e8ff52" } ] } From 1497e54974b241f37bddc2194f3263677a9b04ad Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2023 23:53:27 +0000 Subject: [PATCH 228/451] Only set window title if standalone Signed-off-by: falkTX --- src/override/Window.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 63908b7f..af99839a 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -623,16 +623,18 @@ void Window::step() { bndSetFont(uiFont->handle); // Set window title - std::string windowTitle = "Cardinal"; - if (APP->patch->path != "") { - windowTitle += " - "; - if (!APP->history->isSaved()) - windowTitle += "*"; - windowTitle += system::getFilename(APP->patch->path); - } - if (windowTitle != internal->lastWindowTitle) { - internal->tlw->getWindow().setTitle(windowTitle.c_str()); - internal->lastWindowTitle = windowTitle; + if (isStandalone()) { + std::string windowTitle = "Cardinal"; + if (APP->patch->path != "") { + windowTitle += " - "; + if (!APP->history->isSaved()) + windowTitle += "*"; + windowTitle += system::getFilename(APP->patch->path); + } + if (windowTitle != internal->lastWindowTitle) { + internal->tlw->getWindow().setTitle(windowTitle.c_str()); + internal->lastWindowTitle = windowTitle; + } } // Get desired pixel ratio From e418bb17c65280845fe6a60893a29a461362ed8d Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2023 23:58:46 +0000 Subject: [PATCH 229/451] Do not show resize handle in mini variant Signed-off-by: falkTX --- dpf | 2 +- src/CardinalCommon.cpp | 9 +++++++++ src/CardinalCommon.hpp | 1 + src/override/Scene.cpp | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dpf b/dpf index 207e0ae8..0c75ecb5 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 207e0ae8720faa4db6f34192d83a0ee3b85b832a +Subproject commit 0c75ecb5db751eda5d5d7168f5299274c050766c diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 951b625c..f221561c 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -533,6 +533,15 @@ END_NAMESPACE_DISTRHO namespace rack { +bool isMini() +{ +#if CARDINAL_VARIANT_MINI + return true; +#else + return false; +#endif +} + bool isStandalone() { return std::strstr(getPluginFormatName(), "Standalone") != nullptr; diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index b411b815..cf2db536 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -43,6 +43,7 @@ namespace window { void generateScreenshot(); } +bool isMini(); bool isStandalone(); #ifdef ARCH_WIN diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 7cd9a483..e8f1e77c 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -139,7 +139,7 @@ Scene::Scene() { browser->hide(); addChild(browser); - if (isStandalone()) + if (isStandalone() || isMini()) return; internal->resizeHandle = new ResizeHandle; From 5ff9a5118e652730bea0de65f5e805e81560750e Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 13:04:05 +0000 Subject: [PATCH 230/451] Ignore cable lights on headless build, for a bit more performance Signed-off-by: falkTX --- dpf | 2 +- src/override/Engine.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dpf b/dpf index 0c75ecb5..8d6748c5 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 0c75ecb5db751eda5d5d7168f5299274c050766c +Subproject commit 8d6748c502d8facf9dba71f1af2247f85dc938a3 diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index 4145670c..d356ec24 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -152,6 +152,7 @@ static void Cable_step(Cable* that) { } +#ifndef HEADLESS static void Port_step(Port* that, float deltaTime) { // Set plug lights if (that->channels == 0) { @@ -172,6 +173,7 @@ static void Port_step(Port* that, float deltaTime) { that->plugLights[2].setSmoothBrightness(v, deltaTime); } } +#endif static void TerminalModule__doProcess(TerminalModule* terminalModule, const Module::ProcessArgs& args, bool input) { @@ -186,6 +188,7 @@ static void TerminalModule__doProcess(TerminalModule* terminalModule, const Modu terminalModule->processTerminalOutput(args); } +#ifndef HEADLESS // Iterate ports to step plug lights if (args.frame % 7 /* PORT_DIVIDER */ == 0) { float portTime = args.sampleTime * 7 /* PORT_DIVIDER */; @@ -196,6 +199,7 @@ static void TerminalModule__doProcess(TerminalModule* terminalModule, const Modu Port_step(&output, portTime); } } +#endif } From 0b7fe21e57ab20ab3678df0af3c99780975181d9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 13:27:10 +0000 Subject: [PATCH 231/451] Mini: Ignore plug lights for regular modules too Signed-off-by: falkTX --- src/override/Engine.cpp | 87 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 4 deletions(-) diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index d356ec24..64de4c6a 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -61,6 +61,13 @@ namespace rack { namespace engine { +static constexpr const int PORT_DIVIDER = 7; +// Arbitrary prime number so it doesn't over- or under-estimate time of buffered processors. +static constexpr const int METER_DIVIDER = 37; +static constexpr const int METER_BUFFER_LEN = 32; +static constexpr const float METER_TIME = 1.f; + + struct Engine::Internal { std::vector modules; std::vector terminalModules; @@ -109,6 +116,17 @@ struct Engine::Internal { }; +struct Module::Internal { + bool bypassed = false; + + int meterSamples = 0; + float meterDurationTotal = 0.f; + + float meterBuffer[METER_BUFFER_LEN] = {}; + int meterIndex = 0; +}; + + static void Engine_updateExpander_NoLock(Engine* that, Module* module, bool side) { Module::Expander& expander = side ? module->rightExpander : module->leftExpander; Module* oldExpanderModule = expander.module; @@ -176,7 +194,7 @@ static void Port_step(Port* that, float deltaTime) { #endif -static void TerminalModule__doProcess(TerminalModule* terminalModule, const Module::ProcessArgs& args, bool input) { +static void TerminalModule__doProcess(TerminalModule* const terminalModule, const Module::ProcessArgs& args, bool input) { // Step module if (input) { terminalModule->processTerminalInput(args); @@ -190,8 +208,8 @@ static void TerminalModule__doProcess(TerminalModule* terminalModule, const Modu #ifndef HEADLESS // Iterate ports to step plug lights - if (args.frame % 7 /* PORT_DIVIDER */ == 0) { - float portTime = args.sampleTime * 7 /* PORT_DIVIDER */; + if (args.frame % PORT_DIVIDER == 0) { + float portTime = args.sampleTime * PORT_DIVIDER; for (Input& input : terminalModule->inputs) { Port_step(&input, portTime); } @@ -203,6 +221,67 @@ static void TerminalModule__doProcess(TerminalModule* terminalModule, const Modu } +static void Module__doProcess(Module* const module, const Module::ProcessArgs& args) { + Module::Internal* const internal = module->internal; + +#ifndef HEADLESS + // This global setting can change while the function is running, so use a local variable. + bool meterEnabled = settings::cpuMeter && (args.frame % METER_DIVIDER == 0); + + // Start CPU timer + double startTime; + if (meterEnabled) { + startTime = system::getTime(); + } +#endif + + // Step module + if (!internal->bypassed) + module->process(args); + else + module->processBypass(args); + +#ifndef HEADLESS + // Stop CPU timer + if (meterEnabled) { + double endTime = system::getTime(); + // Subtract call time of getTime() itself, since we only want to measure process() time. + double endTime2 = system::getTime(); + float duration = (endTime - startTime) - (endTime2 - endTime); + + internal->meterSamples++; + internal->meterDurationTotal += duration; + + // Seconds we've been measuring + float meterTime = internal->meterSamples * METER_DIVIDER * args.sampleTime; + + if (meterTime >= METER_TIME) { + // Push time to buffer + if (internal->meterSamples > 0) { + internal->meterIndex++; + internal->meterIndex %= METER_BUFFER_LEN; + internal->meterBuffer[internal->meterIndex] = internal->meterDurationTotal / internal->meterSamples; + } + // Reset total + internal->meterSamples = 0; + internal->meterDurationTotal = 0.f; + } + } + + // Iterate ports to step plug lights + if (args.frame % PORT_DIVIDER == 0) { + float portTime = args.sampleTime * PORT_DIVIDER; + for (Input& input : module->inputs) { + Port_step(&input, portTime); + } + for (Output& output : module->outputs) { + Port_step(&output, portTime); + } + } +#endif +} + + /** Steps a single frame */ static void Engine_stepFrame(Engine* that) { @@ -260,7 +339,7 @@ static void Engine_stepFrame(Engine* that) { // Step each module and cables for (Module* module : internal->modules) { - module->doProcess(processArgs); + Module__doProcess(module, processArgs); for (Output& output : module->outputs) { for (Cable* cable : output.cables) Cable_step(cable); From ed11ac51517074daee38bb6fb5004615430df1c2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 18:12:42 +0000 Subject: [PATCH 232/451] Add mini modgui screenshot Signed-off-by: falkTX --- src/MOD/Cardinal.lv2/modgui/stylesheet.css | 1 + src/MOD/CardinalMini.lv2/modgui/screenshot.png | Bin 0 -> 213994 bytes src/MOD/CardinalMini.lv2/modgui/thumbnail.png | Bin 0 -> 22890 bytes src/Makefile.cardinal.mk | 13 +++++++++---- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 src/MOD/CardinalMini.lv2/modgui/screenshot.png create mode 100644 src/MOD/CardinalMini.lv2/modgui/thumbnail.png diff --git a/src/MOD/Cardinal.lv2/modgui/stylesheet.css b/src/MOD/Cardinal.lv2/modgui/stylesheet.css index 6065621e..8b373a1e 100644 --- a/src/MOD/Cardinal.lv2/modgui/stylesheet.css +++ b/src/MOD/Cardinal.lv2/modgui/stylesheet.css @@ -73,6 +73,7 @@ align-items: center; justify-content: space-evenly; justify-content: space-between; + white-space: nowrap; } .cardinal-main.mod-pedal .visibility-buttons span { diff --git a/src/MOD/CardinalMini.lv2/modgui/screenshot.png b/src/MOD/CardinalMini.lv2/modgui/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..8b92b9e2ec7f6a2ec7ce72b58b3464a848dcf7e4 GIT binary patch literal 213994 zcmeFYRd8HOlP=m~X31iUnVFec7Bhpz%&ZnOSj=ECGc#H&iU8$3V)xz?X^KDsWtpXOys=~K)a7f+s(ye=HBqMxU#uixSM zy9ETgS6(vS-`f|nTnIMZ;!{xde;-1r3F!C7F8b*ly|BS|(R6oC|9Llfe}{T=(kD1a z!u+$gKoKpud3hQ9=TVr-*B7}96D!B!d8P8r753J<%U9q-6Y|~d56S9f=v#3&hngMc zMWPWe73owCl@C?%h0ZU2JleL~ zO^zGw{Zd-IEcBJV_8ER5Z=SB4U}}(VP%|2ND%;H36jxyoHhkHq=vF@>s?+7ztLca4 z$b57O9z=HHrDyL7cNo0WYnU^NJv}#BxU@Hx;X5}u+wok@R(|D5zOr3?bG)=2%5vMP zWU{aAk$8Wwdvp`9uT~-gu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8NaD^&0LPwRL18VavGQr=0BshTy(ggesrnrQ&Ox-s%5$Abh+gC zz%C*N+EZVK0XsVF^fyA?`C@9v@brnPKkQT*My-xtdVUuIN*Y`0KgE4^S@EfDtRHoV yX_)yjU!|b+_uCs9hnwE|#EN)T3`Q6xugK*5@N#NwQB!4YXPl|^{$gW~#D4+gY76)P literal 0 HcmV?d00001 diff --git a/src/MOD/CardinalMini.lv2/modgui/thumbnail.png b/src/MOD/CardinalMini.lv2/modgui/thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..0fd025ae0cd25860d617a9e878640aa8d558d01e GIT binary patch literal 22890 zcmeEtWl){XvM%m!!QFM??(QDkS-3j{clQw7odChz-8HyNun^n{+?DU!XP>?6-an`6 zo`0LFm-RB!{Y>{WJu}^_hA0&!X=DU^1TZi#WLX&rHPEL8=n;W~0sTIvhmZvWqq_Cc z&~{TZ@g#L}akQ|u1CqLVI{`_7Ue+Kt+J(wCZ;=EKaD~UObewrY)qc%d>S- zDjlWuDt)RFs?+3HFr@|pu%utF@9&^y$EvF#KNnYoyG zIJ+5pxY+jpb^UN8bX_#KeR4DN_FL@n>gMtWBCiLgcASKHarq(c>4o6FOZ;a*`|N|1 zEJbwZ$~NNagBYFv7Th*s>{U+m-TesN|chFf9Eq?9yE}oy-?A+0UMoPzSYpw>Mu{3#$r#^t{eG>O4K2Dz83E z1y=l~)8q9QPJY8Wc)q#ld2K^HtZld!dyn8hdh^2$cyHTg^_RLWJ3j0A6p9U}t!)Oz z@brD>x-0Tw?1dK-WhPyHmK2?yfjB0ewThI3yZK!8SKhQs2V4I(&z9*N&z&Mxr@CIP zw>!rN#~!CzT{5U47hlt%R#S~{c;Rei!cVw(@DBuw*ATD!4|xG}wNXeok~&PL`ab^5 ztn!axP$yJ;SAG54c^>fg0W2bst?niOvLx_&95r~(M;tT6AQ2A?4qTsNOKLp0lEEob zGo^~;EMj-t?)m-~E5;-eet(qoq^M+iqNTA}QXSq8r)7sq$Z^SX%q5HSax5RE6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Ii@I=H}*R0Z0167ryX2=gyrQyw)Y}53y~#8IUB?G*8dW z%>3Q8E_r{*`1trg1GWSpNmA)rm%MKPfWDf Date: Wed, 4 Jan 2023 18:28:23 +0000 Subject: [PATCH 233/451] Tweak pkg-config and MOD builds Signed-off-by: falkTX --- .github/workflows/build.yml | 9 ++++++--- Makefile | 10 +++++----- dpf | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c588daf..fe728390 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -660,7 +660,8 @@ jobs: - name: Build for modduo if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make modduo CIBUILD=true HEADLESS=true MODDUO=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HEADLESS=true modduo-features + make CIBUILD=true HEADLESS=true MODDUO=true WITH_LTO=${{ env.WITH_LTO }} modduo -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -702,7 +703,8 @@ jobs: - name: Build for modduox if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make modduox CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HEADLESS=true modduox-features + make CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} modduox -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -744,7 +746,8 @@ jobs: - name: Build for moddwarf if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make moddwarf CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make CIBUILD=true HEADLESS=true moddwarf-features + make CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} moddwarf -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV diff --git a/Makefile b/Makefile index 55d96a02..d12c8d05 100644 --- a/Makefile +++ b/Makefile @@ -72,16 +72,16 @@ DGL_EXTRA_ARGS = \ ifeq ($(SYSDEPS),true) -ifneq ($(shell pkg-config --exists jansson && echo true),true) +ifneq ($(shell $(PKG_CONFIG) --exists jansson && echo true),true) $(error jansson dependency not installed/available) endif -ifneq ($(shell pkg-config --exists libarchive && echo true),true) +ifneq ($(shell $(PKG_CONFIG) --exists libarchive && echo true),true) $(error libarchive dependency not installed/available) endif -ifneq ($(shell pkg-config --exists samplerate && echo true),true) +ifneq ($(shell $(PKG_CONFIG) --exists samplerate && echo true),true) $(error samplerate dependency not installed/available) endif -ifneq ($(shell pkg-config --exists speexdsp && echo true),true) +ifneq ($(shell $(PKG_CONFIG) --exists speexdsp && echo true),true) $(error speexdsp dependency not installed/available) endif @@ -89,7 +89,7 @@ endif ifeq ($(HEADLESS),true) -ifneq ($(shell pkg-config --exists liblo && echo true),true) +ifneq ($(shell $(PKG_CONFIG) --exists liblo && echo true),true) $(error liblo dependency not installed/available) endif diff --git a/dpf b/dpf index 8d6748c5..03a7dbf4 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 8d6748c502d8facf9dba71f1af2247f85dc938a3 +Subproject commit 03a7dbf4ef748ad76bc5b8845d9adb348645689f From b08e689812cd499c36f08af46d677dbb84cf3119 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 18:39:40 +0000 Subject: [PATCH 234/451] Set mini category as mod:ControlVoltagePlugin, hide gui params Signed-off-by: falkTX --- dpf | 2 +- src/CardinalMini/DistrhoPluginInfo.h | 2 +- src/CardinalPlugin.cpp | 46 +++++++++++++++++++++++++--- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/dpf b/dpf index 03a7dbf4..54e1fb84 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 03a7dbf4ef748ad76bc5b8845d9adb348645689f +Subproject commit 54e1fb847d046f97b23b94d9c002efe29b3a4240 diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index 786c9fe1..f72f8724 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -49,7 +49,7 @@ #define DISTRHO_PLUGIN_WANT_FULL_STATE 1 #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 -#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" +#define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" // #ifdef __MOD_DEVICES__ diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 7afcd2aa..4ec5896e 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -438,10 +438,6 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol += String(index + 1); parameter.unit = "v"; parameter.hints = kParameterIsAutomatable; - #if CARDINAL_VARIANT_MINI - // TODO is hidden - // parameter.hints |= kParameterIsAutomatable; - #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 10.0f; @@ -463,6 +459,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Show tooltips"; parameter.symbol = "tooltips"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 1.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; @@ -472,6 +471,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "cableOpacity"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 50.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; @@ -481,6 +483,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "cableTension"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 75.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; @@ -490,6 +495,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "rackBrightness"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 100.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; @@ -499,6 +507,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "haloBrightness"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 25.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; @@ -507,6 +518,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Knob mode"; parameter.symbol = "knobMode"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 2.0f; @@ -524,6 +538,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Scroll wheel knob control"; parameter.symbol = "knobScroll"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; @@ -532,6 +549,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Scroll wheel knob sensitivity"; parameter.symbol = "knobScrollSensitivity"; parameter.hints = kParameterIsAutomatable|kParameterIsLogarithmic; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 1.0f; parameter.ranges.min = 0.1f; parameter.ranges.max = 10.0f; @@ -540,6 +560,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Lock module positions"; parameter.symbol = "lockModules"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; @@ -548,6 +571,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Update rate limit"; parameter.symbol = "rateLimit"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 2.0f; @@ -565,6 +591,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Browser sort"; parameter.symbol = "browserSort"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 3.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 5.0f; @@ -588,6 +617,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Browser zoom"; parameter.symbol = "browserZoom"; parameter.hints = kParameterIsAutomatable; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.unit = "%"; parameter.ranges.def = 50.0f; parameter.ranges.min = 25.0f; @@ -614,6 +646,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Invert zoom"; parameter.symbol = "invertZoom"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 0.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; @@ -622,6 +657,9 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Auto-squeeze module positions"; parameter.symbol = "squeezeModules"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; + #if CARDINAL_VARIANT_MINI + parameter.hints |= kParameterIsHidden; + #endif parameter.ranges.def = 1.0f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; From 64bb7540097021a08a2b657445ca2f82031374bf Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 22:22:42 +0000 Subject: [PATCH 235/451] Tweak main variant category, fx variant modgui title Signed-off-by: falkTX --- src/Cardinal/DistrhoPluginInfo.h | 2 +- src/MOD/CardinalFX.lv2/modgui/icon.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index 42465693..6a91328b 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -53,7 +53,7 @@ #define DISTRHO_PLUGIN_WANT_FULL_STATE 1 #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 -#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" +#define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/MOD/CardinalFX.lv2/modgui/icon.html b/src/MOD/CardinalFX.lv2/modgui/icon.html index f5062704..0138ac96 100644 --- a/src/MOD/CardinalFX.lv2/modgui/icon.html +++ b/src/MOD/CardinalFX.lv2/modgui/icon.html @@ -5,7 +5,7 @@

-
DISTRHO Cardinal - Mini -
+
DISTRHO Cardinal - FX -
From a238f10eec777f2b0704d3299e226bf5129c022c Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 4 Jan 2023 22:29:45 +0000 Subject: [PATCH 236/451] Make sure OSC is enabled in MOD builds Signed-off-by: falkTX --- src/CardinalCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index f221561c..d415d572 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -47,7 +47,7 @@ # error wrong build #endif -#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI +#if (defined(STATIC_BUILD) && !defined(__MOD_DEVICES__)) || CARDINAL_VARIANT_MINI # undef CARDINAL_INIT_OSC_THREAD #endif From f02bc421cd454776005d6a01f953ea30f07fd57d Mon Sep 17 00:00:00 2001 From: Filipe Coelho Date: Tue, 10 Jan 2023 20:46:49 +0000 Subject: [PATCH 237/451] Make sure CI runs on pull requests too --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe728390..e75a862e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,11 @@ name: build on: push: + branches: + - '*' + pull_request: + branches: + - '*' env: CACHE_VERSION: 1 From 53b38f0c2d407385aa513a0889bd9ab34f725a30 Mon Sep 17 00:00:00 2001 From: dreamer <1185977+dromer@users.noreply.github.com> Date: Thu, 12 Jan 2023 00:46:11 +0100 Subject: [PATCH 238/451] update Grande commit and add new modules (#479) --- plugins/GrandeModular | 2 +- plugins/plugins.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/GrandeModular b/plugins/GrandeModular index 3d652432..bc7ef815 160000 --- a/plugins/GrandeModular +++ b/plugins/GrandeModular @@ -1 +1 @@ -Subproject commit 3d6524320ce33569e3553a53571c45425ba5d078 +Subproject commit bc7ef8157f6ad1284d7c4706eb89132f59555ca1 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 318c9f73..c8e778a8 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -1990,6 +1990,7 @@ static void initStatic__GrandeModular() if (spl.ok()) { p->addModel(modelClip); + p->addModel(modelCompare3); p->addModel(modelLFO3); p->addModel(modelLFO4); p->addModel(modelLogic); @@ -2009,6 +2010,7 @@ static void initStatic__GrandeModular() p->addModel(modelScale); p->addModel(modelSplit8); p->addModel(modelTails); + p->addModel(modelTails4); p->addModel(modelVarSampleDelays); p->addModel(modelVCA3); p->addModel(modelVCA4); From 8d5bd3dd5b54e9410ec9aa0deba0d68c89b81cd8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 13:40:40 +0100 Subject: [PATCH 239/451] Mini: Add Fundamental MidSide and Sum, replace Braids with Ripples Signed-off-by: falkTX --- dpf | 2 +- plugins/Makefile | 18 ++++++++++-------- plugins/plugins-mini.cpp | 10 +++++----- plugins/todo.txt | 10 ---------- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/dpf b/dpf index 54e1fb84..b4b0c7c6 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 54e1fb847d046f97b23b94d9c002efe29b3a4240 +Subproject commit b4b0c7c67e48d5ca48a7d0d6a4d05b17e6c1d707 diff --git a/plugins/Makefile b/plugins/Makefile index 909b36dc..63545025 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -314,11 +314,13 @@ PLUGIN_FILES += Fundamental/src/dr_wav.c MINIPLUGIN_FILES += Fundamental/src/ADSR.cpp MINIPLUGIN_FILES += Fundamental/src/LFO.cpp MINIPLUGIN_FILES += Fundamental/src/Merge.cpp +MINIPLUGIN_FILES += Fundamental/src/MidSide.cpp MINIPLUGIN_FILES += Fundamental/src/Noise.cpp MINIPLUGIN_FILES += Fundamental/src/Quantizer.cpp MINIPLUGIN_FILES += Fundamental/src/Random.cpp MINIPLUGIN_FILES += Fundamental/src/Scope.cpp MINIPLUGIN_FILES += Fundamental/src/Split.cpp +MINIPLUGIN_FILES += Fundamental/src/Sum.cpp MINIPLUGIN_FILES += Fundamental/src/VCA-1.cpp MINIPLUGIN_FILES += Fundamental/src/VCF.cpp MINIPLUGIN_FILES += Fundamental/src/VCMixer.cpp @@ -535,13 +537,13 @@ PLUGIN_FILES += AudibleInstruments/eurorack/streams/svf.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/vactrol.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/compressor.cc -MINIPLUGIN_FILES += AudibleInstruments/src/Braids.cpp MINIPLUGIN_FILES += AudibleInstruments/src/Plaits.cpp -MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/macro_oscillator.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/analog_oscillator.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/digital_oscillator.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/quantizer.cc -MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/resources.cc +MINIPLUGIN_FILES += AudibleInstruments/src/Ripples.cpp +# MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/macro_oscillator.cc +# MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/analog_oscillator.cc +# MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/digital_oscillator.cc +# MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/quantizer.cc +# MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/resources.cc MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/*.cc) MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/engine/*.cc) MINIPLUGIN_FILES += $(wildcard AudibleInstruments/eurorack/plaits/dsp/speech/*.cc) @@ -1514,9 +1516,9 @@ MINIRESOURCE_FILES += AriaModules/res/faceplates/Spleet.svg MINIRESOURCE_FILES += AriaModules/res/faceplates/Swerge.svg MINIRESOURCE_FILES += AriaModules/res/signature/signature.svg -MINIRESOURCE_FILES += AudibleInstruments/res/Braids.svg MINIRESOURCE_FILES += AudibleInstruments/res/Plaits.svg -MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf +MINIRESOURCE_FILES += AudibleInstruments/res/Ripples.svg +# MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf # MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/AD.svg diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 8f7dabec..1540cc00 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -230,11 +230,13 @@ static void initStatic__Fundamental() p->addModel(modelADSR); p->addModel(modelLFO); p->addModel(modelMerge); + p->addModel(modelMidSide); p->addModel(modelNoise); p->addModel(modelQuantizer); p->addModel(modelRandom); p->addModel(modelScope); p->addModel(modelSplit); + p->addModel(modelSum); p->addModel(modelVCA_1); p->addModel(modelVCF); p->addModel(modelVCMixer); @@ -242,7 +244,6 @@ static void initStatic__Fundamental() spl.removeModule("8vert"); spl.removeModule("Delay"); spl.removeModule("LFO2"); - spl.removeModule("MidSide"); spl.removeModule("Mixer"); spl.removeModule("Mutes"); spl.removeModule("Octave"); @@ -250,7 +251,6 @@ static void initStatic__Fundamental() spl.removeModule("SEQ3"); spl.removeModule("SequentialSwitch1"); spl.removeModule("SequentialSwitch2"); - spl.removeModule("Sum"); spl.removeModule("VCA"); spl.removeModule("VCO2"); } @@ -299,10 +299,11 @@ static void initStatic__AudibleInstruments() const StaticPluginLoader spl(p, "AudibleInstruments"); if (spl.ok()) { - p->addModel(modelBraids); p->addModel(modelPlaits); + p->addModel(modelRipples); spl.removeModule("Blinds"); + spl.removeModule("Braids"); spl.removeModule("Branches"); spl.removeModule("Clouds"); spl.removeModule("Elements"); @@ -311,7 +312,6 @@ static void initStatic__AudibleInstruments() spl.removeModule("Links"); spl.removeModule("Marbles"); spl.removeModule("Rings"); - spl.removeModule("Ripples"); spl.removeModule("Shades"); spl.removeModule("Shelves"); spl.removeModule("Stages"); diff --git a/plugins/todo.txt b/plugins/todo.txt index 2735250f..a2e8434a 100644 --- a/plugins/todo.txt +++ b/plugins/todo.txt @@ -8,15 +8,9 @@ VultModulesFree 61804.0 (not opensource?) NYSTHI 58494.0 (not opensource?) -ML_modules 55847.0 -https://github.com/martin-lueders/ML_modules/ - FrozenWasteland 53690.0 (GPL-3.0-only) https://github.com/almostEric/FrozenWasteland/ -ArableInstruments 48756.0 -https://github.com/adbrant/ArableInstruments/ - squinkylabs-plug1 48682.0 https://github.com/squinkylabs/SquinkyVCV @@ -28,14 +22,12 @@ https://github.com/MarcBoule/Geodesics Alikins 41798.0 https://github.com/alikins/Alikins-rack-plugins -dBiz 40849.0 RJModules 39972.0 DHE-Modules 39582.0 AlrightDevices 38307.0 SynthKit 38228.0 SubmarineFree 38146.0 Hora-treasureFree 37847.0 -ParableInstruments 37781.0 CountModula 37759.0 MSM 37337.0 CharredDesert 36813.0 @@ -45,10 +37,8 @@ Autinn 34990.0 trowaSoft 34946.0 Hora-VCO_VCF_VCA_Free 34770.0 moDllz 34368.0 -21kHz 34172.0 Ohmer 33950.0 modular80 33447.0 -Autodafe-DrumKit 33143.0 Koralfx-Modules 33035.0 alto777_LFSR 32872.0 StellareModular 32526.0 From e62710867f80ec61f8feb4580df0b1d48b796446 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 15:17:47 +0100 Subject: [PATCH 240/451] Mini: forgot to add MidSide and Sum svgs, empty svgs for MOD Signed-off-by: falkTX --- plugins/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 63545025..3a402797 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1794,11 +1794,13 @@ MINIRESOURCE_FILES += Fundamental/presets MINIRESOURCE_FILES += Fundamental/res/ADSR.svg MINIRESOURCE_FILES += Fundamental/res/LFO.svg MINIRESOURCE_FILES += Fundamental/res/Merge.svg +MINIRESOURCE_FILES += Fundamental/res/MidSide.svg MINIRESOURCE_FILES += Fundamental/res/Noise.svg MINIRESOURCE_FILES += Fundamental/res/Quantizer.svg MINIRESOURCE_FILES += Fundamental/res/Random.svg MINIRESOURCE_FILES += Fundamental/res/Scope.svg MINIRESOURCE_FILES += Fundamental/res/Split.svg +MINIRESOURCE_FILES += Fundamental/res/Sum.svg MINIRESOURCE_FILES += Fundamental/res/VCA-1.svg MINIRESOURCE_FILES += Fundamental/res/VCF.svg MINIRESOURCE_FILES += Fundamental/res/VCMixer.svg @@ -1988,6 +1990,10 @@ ifeq ($(MOD_BUILD),true) ../bin/CardinalFX.lv2/resources/%.svg: %.svg ../deps/svg2stub.py -@mkdir -p "$(shell dirname $@)" $(SILENT)python3 ../deps/svg2stub.py $< $@ + +../bin/CardinalMini.lv2/resources/%.svg: %.svg ../deps/svg2stub.py + -@mkdir -p "$(shell dirname $@)" + $(SILENT)python3 ../deps/svg2stub.py $< $@ endif ../bin/Cardinal.lv2/resources/PluginManifests/%.json: %/plugin.json From ca7b3cfd28e0669af62f12592a159e7a089f7651 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 16:47:48 +0100 Subject: [PATCH 241/451] Set surgext libs for linking before others, needed in some systems Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 2f8c7b5d..b5d208fe 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -117,7 +117,7 @@ FILES_UI += distrho.rc endif # -------------------------------------------------------------- -# Extra libraries to link against +# Rack and plugin libs ifeq ($(HEADLESS),true) TARGET_SUFFIX = -headless @@ -137,24 +137,9 @@ else RACK_EXTRA_LIBS += ../rack$(TARGET_SUFFIX).a endif -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libquickjs.a - -ifneq ($(SYSDEPS),true) -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libjansson.a -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libsamplerate.a -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libspeexdsp.a -ifeq ($(WINDOWS),true) -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libarchive_static.a -else -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libarchive.a -endif -RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libzstd.a -endif - # -------------------------------------------------------------- # surgext libraries -ifneq ($(CARDINAL_VARIANT),mini) ifneq ($(NOPLUGINS),true) SURGE_DEP_PATH = $(abspath ../../deps/surge-build) RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libsurge-common.a @@ -174,6 +159,26 @@ endif RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a endif + +# -------------------------------------------------------------- +# Extra libraries to link against + +ifneq ($(CARDINAL_VARIANT),mini) +ifneq ($(NOPLUGINS),true) +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libquickjs.a +endif +endif + +ifneq ($(SYSDEPS),true) +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libjansson.a +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libsamplerate.a +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libspeexdsp.a +ifeq ($(WINDOWS),true) +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libarchive_static.a +else +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libarchive.a +endif +RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libzstd.a endif # -------------------------------------------------------------- @@ -188,11 +193,13 @@ endif EXTRA_DSP_DEPENDENCIES = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) EXTRA_DSP_LIBS = $(RACK_EXTRA_LIBS) $(CARLA_EXTRA_LIBS) $(STATIC_CARLA_PLUGIN_LIBS) +ifneq ($(CARDINAL_VARIANT),mini) ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) EXTRA_DSP_DEPENDENCIES += ../../deps/aubio/libaubio.a EXTRA_DSP_LIBS += ../../deps/aubio/libaubio.a EXTRA_DSP_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) endif +endif ifneq ($(NOPLUGINS),true) ifeq ($(MACOS),true) From 5c7025b7fefc3008c46498ab84914e79a7357e25 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 16:57:23 +0100 Subject: [PATCH 242/451] Add some Mockba to mini, test surgext stuff too Signed-off-by: falkTX --- plugins/Makefile | 353 ++++++++++++++++++++++++--------------- plugins/plugins-mini.cpp | 175 +++++++++++++++++++ 2 files changed, 389 insertions(+), 139 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 3a402797..f58fc29c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -572,6 +572,8 @@ PLUGIN_FILES += $(filter-out BaconPlugs/src/BaconPlugs.cpp,$(wildcard BaconPlugs PLUGIN_FILES += $(wildcard BaconPlugs/libs/midifile/src/*.cpp) PLUGIN_FILES += $(wildcard BaconPlugs/libs/open303-code/Source/DSPCode/*.cpp) +MINIPLUGIN_FILES += BaconPlugs/src/Style.cpp + # -------------------------------------------------------------- # Befaco @@ -885,6 +887,14 @@ PLUGIN_FILES += $(filter-out MockbaModular/src/plugin.cpp MockbaModular/src/Mock # modules/types which are present in other plugins MOCKBAMODULAR_CUSTOM = Blank Comparator +MINIPLUGIN_FILES += MockbaModular/src/CZOsc.cpp +MINIPLUGIN_FILES += MockbaModular/src/Filtah.cpp +MINIPLUGIN_FILES += MockbaModular/src/MaugOsc.cpp +MINIPLUGIN_FILES += MockbaModular/src/Mixah.cpp +MINIPLUGIN_FILES += MockbaModular/src/Pannah.cpp +MINIPLUGIN_FILES += MockbaModular/src/ReVoltah.cpp +MINIPLUGIN_FILES += MockbaModular/src/Shapah.cpp + # -------------------------------------------------------------- # Mog @@ -1077,6 +1087,12 @@ SURGEXT_FLAGS += -DSURGE_RACK_BASE_VERSION=XT1-0-1 SURGEXT_FLAGS += -DSURGE_RACK_PLUG_VERSION=Cardinal SURGEXT_FLAGS += -DSURGE_RACK_SURGE_VERSION=Cardinal +MINIPLUGIN_FILES += surgext/src/VCO.cpp +MINIPLUGIN_FILES += surgext/src/XTModule.cpp +MINIPLUGIN_FILES += surgext/src/XTModuleWidget.cpp +MINIPLUGIN_FILES += surgext/src/XTStyle.cpp +MINIPLUGIN_FILES += surgext-helper/surgext-helper.cpp + # -------------------------------------------------------------- # unless_modules @@ -1157,57 +1173,57 @@ PLUGIN_BINARIES += ValleyAudio/src/VOICE_6.bin PLUGIN_BINARIES += ValleyAudio/src/VOX_MACH.bin PLUGIN_BINARIES += ValleyAudio/src/XFADE.bin -MINIPLUGIN_FILES += ValleyAudio/src/PlainText.cpp -MINIPLUGIN_FILES += ValleyAudio/src/SteppedSlider.cpp -MINIPLUGIN_FILES += ValleyAudio/src/ValleyChoiceMenu.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/FreqLUT.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/Utilities.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/DSP/OnePoleFilters.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/DSP/OTAFilter.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/QuadOsc.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecLoopingADSR.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecOnePoleFilters.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecOTAFilter.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Dexter/Dexter.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Dexter/DexterRoutingMatrix.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Dexter/Osc4Core_SIMD.cpp -MINIPLUGIN_FILES += ValleyAudio/src/Interzone/Interzone.cpp - -MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_BANK1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SAW.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SINE.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SQR.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/ALTOSAX.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/AM_HARM.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/BASIC.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/BITCRUSH1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/BITCRUSH2.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/BI_PULSE.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/CELLO_1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/CELLO_2.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/CHIP_1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/CHIP_2.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/OBOE.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/OPAL.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/OVERTONE1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/OVERTONE2.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/PIANO.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/PLUCK.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/PWM.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/SAW_GAP1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/SAW_GAP2.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/SINE_HARM.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/SWEEPHARM.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/SYMMETRY.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/TEE_EKS.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/THEREMIN.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VIDEOGAME.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VIOLIN.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_1.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_2.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_3.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_4.bin -MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_5.bin +# MINIPLUGIN_FILES += ValleyAudio/src/PlainText.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/SteppedSlider.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/ValleyChoiceMenu.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/FreqLUT.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/Utilities.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/DSP/OnePoleFilters.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/DSP/OTAFilter.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/QuadOsc.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecLoopingADSR.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecOnePoleFilters.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Common/SIMD/VecOTAFilter.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Dexter/Dexter.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Dexter/DexterRoutingMatrix.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Dexter/Osc4Core_SIMD.cpp +# MINIPLUGIN_FILES += ValleyAudio/src/Interzone/Interzone.cpp + +# MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_BANK1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SAW.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SINE.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/ADD_SQR.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/ALTOSAX.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/AM_HARM.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/BASIC.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/BITCRUSH1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/BITCRUSH2.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/BI_PULSE.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/CELLO_1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/CELLO_2.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/CHIP_1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/CHIP_2.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/OBOE.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/OPAL.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/OVERTONE1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/OVERTONE2.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/PIANO.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/PLUCK.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/PWM.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/SAW_GAP1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/SAW_GAP2.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/SINE_HARM.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/SWEEPHARM.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/SYMMETRY.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/TEE_EKS.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/THEREMIN.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VIDEOGAME.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VIOLIN.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_1.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_2.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_3.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_4.bin +# MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_5.bin # modules/types which are present in other plugins VALLEYAUDIO_CUSTOM = $(DRWAV) DigitalDisplay @@ -1505,7 +1521,14 @@ endif RESOURCE_FILES += Cardinal/res/Miku/Miku.png -MINIPLUGIN_LIST = AriaModules AudibleInstruments BogaudioModules Cardinal Fundamental ValleyAudio +MINIPLUGIN_LIST = Cardinal +MINIPLUGIN_LIST += AriaModules +MINIPLUGIN_LIST += AudibleInstruments +MINIPLUGIN_LIST += BogaudioModules +MINIPLUGIN_LIST += Fundamental +MINIPLUGIN_LIST += MockbaModular +MINIPLUGIN_LIST += surgext +# MINIPLUGIN_LIST += ValleyAudio MINIRESOURCE_FILES = AriaModules/res/components/jack-transparent.svg MINIRESOURCE_FILES += AriaModules/res/components/pushbutton-500-off.svg @@ -1816,93 +1839,145 @@ MINIRESOURCE_FILES += Fundamental/res/components/port.svg MINIRESOURCE_FILES += Fundamental/res/components/Quantizer-keyboard.svg MINIRESOURCE_FILES += Fundamental/res/components/Scope-bg.svg -MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg -MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelLight.svg -MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg -MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelLight.svg -MINIRESOURCE_FILES += ValleyAudio/res/LightLEDButton80.svg -MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmallOut.svg -MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo0.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo1.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo2.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo3.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo4.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo5.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo6.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo7.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo8.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo9.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo10.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo11.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo12.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo13.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo14.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo15.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo16.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo17.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo18.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo19.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo20.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo21.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo22.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo0Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo1Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo2Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo3Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo4Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo5Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo6Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo7Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo8Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo9Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo10Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo11Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo12Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo13Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo14Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo15Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo16Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo17Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo18Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo19Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo20Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo21Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/algo22Dark.svg -MINIRESOURCE_FILES += ValleyAudio/res/din1451alt.ttf -MINIRESOURCE_FILES += ValleyAudio/res/sliderBlue.svg -MINIRESOURCE_FILES += ValleyAudio/res/sliderGreen.svg -MINIRESOURCE_FILES += ValleyAudio/res/sliderRed.svg -MINIRESOURCE_FILES += ValleyAudio/res/sliderOrange.svg -MINIRESOURCE_FILES += ValleyAudio/res/sliderYellow.svg -MINIRESOURCE_FILES += ValleyAudio/res/valleySliderBackground.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMed.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMed-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMedSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMedSmall-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSMed-bg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSMedSmall-bg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSGreenMed.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSGreenMed-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSOrangeMed.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSOrangeMed-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSRedMed.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSRedMed-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSPurpleMed.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSPurpleMed-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSSmall-bg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSBlueSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSBlueSmall-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSOrangeSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSOrangeSmall-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSGreenSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSGreenSmall-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSRedSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSRedSmall-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSMustardSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSMustardSmall-fg.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSPurpleSmall.svg -MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSPurpleSmall-fg.svg +MINIRESOURCE_FILES += MockbaModular/res/CZOsc.svg +MINIRESOURCE_FILES += MockbaModular/res/Empty_gray.svg +MINIRESOURCE_FILES += MockbaModular/res/Empty_light.svg +MINIRESOURCE_FILES += MockbaModular/res/Filtah.svg +# MINIRESOURCE_FILES += MockbaModular/res/HSW_0.svg +# MINIRESOURCE_FILES += MockbaModular/res/HSW_1.svg +# MINIRESOURCE_FILES += MockbaModular/res/HSW_2.svg +MINIRESOURCE_FILES += MockbaModular/res/knob.svg +MINIRESOURCE_FILES += MockbaModular/res/MaugOsc.svg +MINIRESOURCE_FILES += MockbaModular/res/Mixah.svg +MINIRESOURCE_FILES += MockbaModular/res/Pannah.svg +MINIRESOURCE_FILES += MockbaModular/res/port.svg +MINIRESOURCE_FILES += MockbaModular/res/ReVoltah.svg +MINIRESOURCE_FILES += MockbaModular/res/screw.svg +MINIRESOURCE_FILES += MockbaModular/res/selector.svg +MINIRESOURCE_FILES += MockbaModular/res/Shapah.svg + +MINIRESOURCE_FILES += surgext/res/xt/mid/components/fader_bg_25.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/fader_bg.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/fader_handle.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-12.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-14.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-16.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-9.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-12.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-14.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-16.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-9.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/mod-button.svg +MINIRESOURCE_FILES += surgext/res/xt/mid/components/port.svg +MINIRESOURCE_FILES += surgext/res/xt/light/String.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg_25.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_handle.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-12.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-14.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-16.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-9.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-12.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-14.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-16.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-9.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/mod-button.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/port.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/fx/BlankNoDisplay.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/blank6hp.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/EGLFO.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/Matrix.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/Mixer.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/TotalBlank.svg +MINIRESOURCE_FILES += surgext/res/xt/light/panels/vco/BlankVCO.svg + +# MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelLight.svg +# MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelLight.svg +# MINIRESOURCE_FILES += ValleyAudio/res/LightLEDButton80.svg +# MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmallOut.svg +# MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo0.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo1.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo2.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo3.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo4.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo5.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo6.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo7.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo8.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo9.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo10.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo11.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo12.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo13.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo14.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo15.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo16.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo17.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo18.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo19.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo20.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo21.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo22.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo0Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo1Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo2Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo3Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo4Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo5Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo6Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo7Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo8Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo9Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo10Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo11Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo12Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo13Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo14Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo15Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo16Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo17Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo18Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo19Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo20Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo21Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/algo22Dark.svg +# MINIRESOURCE_FILES += ValleyAudio/res/din1451alt.ttf +# MINIRESOURCE_FILES += ValleyAudio/res/sliderBlue.svg +# MINIRESOURCE_FILES += ValleyAudio/res/sliderGreen.svg +# MINIRESOURCE_FILES += ValleyAudio/res/sliderRed.svg +# MINIRESOURCE_FILES += ValleyAudio/res/sliderOrange.svg +# MINIRESOURCE_FILES += ValleyAudio/res/sliderYellow.svg +# MINIRESOURCE_FILES += ValleyAudio/res/valleySliderBackground.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMed.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMed-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMedSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSBlueMedSmall-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSMed-bg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSMedSmall-bg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSGreenMed.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSGreenMed-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSOrangeMed.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSOrangeMed-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSRedMed.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSRedMed-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSPurpleMed.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Med/Rogan1PSPurpleMed-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSSmall-bg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSBlueSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSBlueSmall-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSOrangeSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSOrangeSmall-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSGreenSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSGreenSmall-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSRedSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSRedSmall-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSMustardSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSMustardSmall-fg.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSPurpleSmall.svg +# MINIRESOURCE_FILES += ValleyAudio/res/v2/Small/Rogan1PSPurpleSmall-fg.svg # MOD builds only have LV2 main and FX variant ifeq ($(MOD_BUILD),true) diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 1540cc00..0f1b66ab 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -55,6 +55,22 @@ extern Model* modelSwitch; extern Model* modelSwitch18; extern Model* modelUnison; +// MockbaModular +#include "MockbaModular/src/plugin.hpp" +#include "MockbaModular/src/MockbaModular.hpp" +#undef min +#define saveBack ignoreMockbaModular1 +#define loadBack ignoreMockbaModular2 +#include "MockbaModular/src/MockbaModular.cpp" +#undef saveBack +#undef loadBack +std::string loadBack(int) { return "res/Empty_gray.svg"; } + +// surgext +#include "surgext/src/SurgeXT.h" +void surgext_rack_initialize(); +void surgext_rack_update_theme(); + // ValleyAudio #include "ValleyAudio/src/Valley.hpp" @@ -67,6 +83,8 @@ Plugin* pluginInstance__Fundamental; Plugin* pluginInstance__Aria; Plugin* pluginInstance__AudibleInstruments; Plugin* pluginInstance__BogaudioModules; +Plugin* pluginInstance__MockbaModular; +Plugin* pluginInstance__surgext; Plugin* pluginInstance__ValleyAudio; namespace rack { @@ -451,6 +469,154 @@ static void initStatic__BogaudioModules() } } +static void initStatic__MockbaModular() +{ + Plugin* const p = new Plugin; + pluginInstance__MockbaModular = p; + + const StaticPluginLoader spl(p, "MockbaModular"); + if (spl.ok()) + { + p->addModel(modelCZOsc); + p->addModel(modelFiltah); + p->addModel(modelMaugOsc); + p->addModel(modelMixah); + p->addModel(modelPannah); + p->addModel(modelReVoltah); + p->addModel(modelShapah); + + spl.removeModule("Blank"); + spl.removeModule("Comparator"); + spl.removeModule("Countah"); + spl.removeModule("CZDblSine"); + spl.removeModule("CZPulse"); + spl.removeModule("CZReso1"); + spl.removeModule("CZReso2"); + spl.removeModule("CZReso3"); + spl.removeModule("CZSaw"); + spl.removeModule("CZSawPulse"); + spl.removeModule("CZSquare"); + spl.removeModule("Dividah"); + spl.removeModule("DualBUFFER"); + spl.removeModule("DualNOT"); + spl.removeModule("DualOR"); + spl.removeModule("DualNOR"); + spl.removeModule("DualAND"); + spl.removeModule("DualNAND"); + spl.removeModule("DualXOR"); + spl.removeModule("DualXNOR"); + spl.removeModule("Feidah"); + spl.removeModule("FeidahS"); + spl.removeModule("Holdah"); + spl.removeModule("MaugSaw"); + spl.removeModule("MaugSaw2"); + spl.removeModule("MaugShark"); + spl.removeModule("MaugSquare"); + spl.removeModule("MaugSquare2"); + spl.removeModule("MaugSquare3"); + spl.removeModule("MaugTriangle"); + spl.removeModule("Mixah3"); + spl.removeModule("PSelectah"); + spl.removeModule("Selectah"); + spl.removeModule("UDPClockMaster"); + spl.removeModule("UDPClockSlave"); + } +} + +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); + spl.removeModule("SurgeXTOSCModern"); + spl.removeModule("SurgeXTOSCWavetable"); + spl.removeModule("SurgeXTOSCWindow"); + spl.removeModule("SurgeXTOSCSine"); + spl.removeModule("SurgeXTOSCFM2"); + spl.removeModule("SurgeXTOSCFM3"); + spl.removeModule("SurgeXTOSCSHNoise"); + spl.removeModule("SurgeXTOSCAlias"); + spl.removeModule("SurgeXTOSCString"); + spl.removeModule("SurgeXTOSCTwist"); + + // 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); + spl.removeModule("SurgeXTVCF"); + spl.removeModule("SurgeXTDelay"); + spl.removeModule("SurgeXTDelayLineByFreq"); + spl.removeModule("SurgeXTWaveshaper"); + spl.removeModule("SurgeXTLFO"); + spl.removeModule("SurgeXTMixer"); + spl.removeModule("SurgeXTModMatrix"); + +// 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); + spl.removeModule("SurgeXTFXChorus"); + spl.removeModule("SurgeXTFXChow"); + spl.removeModule("SurgeXTFXCombulator"); + spl.removeModule("SurgeXTFXDistortion"); + spl.removeModule("SurgeXTFXExciter"); + spl.removeModule("SurgeXTFXEnsemble"); + spl.removeModule("SurgeXTFXFlanger"); + spl.removeModule("SurgeXTFXFrequencyShifter"); + spl.removeModule("SurgeXTFXNeuron"); + spl.removeModule("SurgeXTFXPhaser"); + spl.removeModule("SurgeXTFXResonator"); + spl.removeModule("SurgeXTFXReverb"); + spl.removeModule("SurgeXTFXReverb2"); + spl.removeModule("SurgeXTFXRingMod"); + spl.removeModule("SurgeXTFXRotarySpeaker"); + spl.removeModule("SurgeXTFXSpringReverb"); + spl.removeModule("SurgeXTFXTreeMonster"); + spl.removeModule("SurgeXTFXVocoder"); + + /* v2.1 modules + p->addModel(modelEGxVCA); + p->addModel(modelQuadAD); + p->addModel(modelQuadLFO); + */ + + surgext_rack_initialize(); + } +} + +/* static void initStatic__ValleyAudio() { Plugin* const p = new Plugin; @@ -470,6 +636,7 @@ static void initStatic__ValleyAudio() spl.removeModule("uGraph"); } } +*/ void initStaticPlugins() { @@ -478,7 +645,11 @@ void initStaticPlugins() initStatic__Aria(); initStatic__AudibleInstruments(); initStatic__BogaudioModules(); + initStatic__MockbaModular(); + initStatic__surgext(); + /* initStatic__ValleyAudio(); + */ } void destroyStaticPlugins() @@ -501,6 +672,10 @@ void updateStaticPluginsDarkMode() listener->defaultSkinChanged(skins._default); } } + // surgext + { + surgext_rack_update_theme(); + } } } From 69ab3c2de7a4c84984c53612b13fd4648a36543e Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 17:43:09 +0100 Subject: [PATCH 243/451] Tweaks to mini modules, add a few more surgext ones Signed-off-by: falkTX --- plugins/Makefile | 57 ++++++++++++++++++------------ plugins/plugins-mini.cpp | 75 ++++++++++++++-------------------------- 2 files changed, 60 insertions(+), 72 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index f58fc29c..f9e79b8c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1087,7 +1087,11 @@ SURGEXT_FLAGS += -DSURGE_RACK_BASE_VERSION=XT1-0-1 SURGEXT_FLAGS += -DSURGE_RACK_PLUG_VERSION=Cardinal SURGEXT_FLAGS += -DSURGE_RACK_SURGE_VERSION=Cardinal +MINIPLUGIN_FILES += surgext/src/LFO.cpp +MINIPLUGIN_FILES += surgext/src/Mixer.cpp +MINIPLUGIN_FILES += surgext/src/ModMatrix.cpp MINIPLUGIN_FILES += surgext/src/VCO.cpp +MINIPLUGIN_FILES += surgext/src/Waveshaper.cpp MINIPLUGIN_FILES += surgext/src/XTModule.cpp MINIPLUGIN_FILES += surgext/src/XTModuleWidget.cpp MINIPLUGIN_FILES += surgext/src/XTStyle.cpp @@ -1843,9 +1847,9 @@ MINIRESOURCE_FILES += MockbaModular/res/CZOsc.svg MINIRESOURCE_FILES += MockbaModular/res/Empty_gray.svg MINIRESOURCE_FILES += MockbaModular/res/Empty_light.svg MINIRESOURCE_FILES += MockbaModular/res/Filtah.svg -# MINIRESOURCE_FILES += MockbaModular/res/HSW_0.svg -# MINIRESOURCE_FILES += MockbaModular/res/HSW_1.svg -# MINIRESOURCE_FILES += MockbaModular/res/HSW_2.svg +MINIRESOURCE_FILES += MockbaModular/res/HSW_0.svg +MINIRESOURCE_FILES += MockbaModular/res/HSW_1.svg +MINIRESOURCE_FILES += MockbaModular/res/HSW_2.svg MINIRESOURCE_FILES += MockbaModular/res/knob.svg MINIRESOURCE_FILES += MockbaModular/res/MaugOsc.svg MINIRESOURCE_FILES += MockbaModular/res/Mixah.svg @@ -1856,41 +1860,48 @@ MINIRESOURCE_FILES += MockbaModular/res/screw.svg MINIRESOURCE_FILES += MockbaModular/res/selector.svg MINIRESOURCE_FILES += MockbaModular/res/Shapah.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/fader_bg_25.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/fader_bg.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/fader_handle.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-12.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-14.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-16.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-9.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-12.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-14.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-16.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/knob-pointer-9.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/mod-button.svg -MINIRESOURCE_FILES += surgext/res/xt/mid/components/port.svg -MINIRESOURCE_FILES += surgext/res/xt/light/String.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg_25.svg +MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Regular.ttf +MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Bold.ttf +MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg_25.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_handle.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-9.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-12.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-14.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-16.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-9.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/components/knob-pointer-12.svg +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/other/EGLFO.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Matrix.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/panels/other/Mixer.svg +MINIRESOURCE_FILES += surgext/res/xt/dark/panels/vco/BlankVCO.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg_25.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_handle.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-9.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-12.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-14.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-16.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-9.svg +MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-9.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-12.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-14.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-16.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-9.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/mod-button.svg MINIRESOURCE_FILES += surgext/res/xt/light/components/port.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/fx/BlankNoDisplay.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/blank6hp.svg +# MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/blank6hp.svg MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/EGLFO.svg MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/Matrix.svg MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/Mixer.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/TotalBlank.svg +# MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/TotalBlank.svg MINIRESOURCE_FILES += surgext/res/xt/light/panels/vco/BlankVCO.svg +MINIRESOURCE_FILES += surgext/build/surge-data/configuration.xml +MINIRESOURCE_FILES += surgext/build/surge-data/windows.wt + # MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg # MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelLight.svg # MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 0f1b66ab..598b5378 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -532,61 +532,38 @@ static void initStatic__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); - spl.removeModule("SurgeXTOSCModern"); - spl.removeModule("SurgeXTOSCWavetable"); - spl.removeModule("SurgeXTOSCWindow"); - spl.removeModule("SurgeXTOSCSine"); + p->addModel(modelVCOModern); + p->addModel(modelVCOSHNoise); + p->addModel(modelVCOSine); + p->addModel(modelVCOString); + p->addModel(modelVCOTwist); + /* + p->addModel(modelVCOAlias); + p->addModel(modelVCOFM2); + p->addModel(modelVCOFM3); + p->addModel(modelVCOWavetable); + p->addModel(modelVCOWindow); + */ + spl.removeModule("SurgeXTOSCAlias"); spl.removeModule("SurgeXTOSCFM2"); spl.removeModule("SurgeXTOSCFM3"); - spl.removeModule("SurgeXTOSCSHNoise"); - spl.removeModule("SurgeXTOSCAlias"); - spl.removeModule("SurgeXTOSCString"); - spl.removeModule("SurgeXTOSCTwist"); + spl.removeModule("SurgeXTOSCWavetable"); + spl.removeModule("SurgeXTOSCWindow"); // 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); - spl.removeModule("SurgeXTVCF"); + p->addModel(modelSurgeLFO); + p->addModel(modelSurgeMixer); + p->addModel(modelSurgeModMatrix); + p->addModel(modelSurgeWaveshaper); + /* + p->addModel(modelSurgeDelay); + p->addModel(modelSurgeDelayLineByFreq); + p->addModel(modelSurgeVCF); + */ spl.removeModule("SurgeXTDelay"); spl.removeModule("SurgeXTDelayLineByFreq"); - spl.removeModule("SurgeXTWaveshaper"); - spl.removeModule("SurgeXTLFO"); - spl.removeModule("SurgeXTMixer"); - spl.removeModule("SurgeXTModMatrix"); - -// 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); + spl.removeModule("SurgeXTVCF"); + spl.removeModule("SurgeXTFXChorus"); spl.removeModule("SurgeXTFXChow"); spl.removeModule("SurgeXTFXCombulator"); From 9f2cada14fff089cd28d79653c867c2e67836f60 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 17:53:55 +0100 Subject: [PATCH 244/451] Skip light mode panels on mini variant Signed-off-by: falkTX --- plugins/Makefile | 153 ----------------------------------------------- 1 file changed, 153 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index f9e79b8c..48b82a7b 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1548,29 +1548,17 @@ MINIRESOURCE_FILES += AudibleInstruments/res/Ripples.svg # MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf # MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AD.svg # MINIRESOURCE_FILES += BogaudioModules/res/Additator-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Additator.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX.svg # MINIRESOURCE_FILES += BogaudioModules/res/ADSR-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/ADSR.svg # MINIRESOURCE_FILES += BogaudioModules/res/AMRM-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/AMRM.svg # MINIRESOURCE_FILES += BogaudioModules/res/Analyzer-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Analyzer.svg # MINIRESOURCE_FILES += BogaudioModules/res/AnalyzerXL.svg # MINIRESOURCE_FILES += BogaudioModules/res/Arp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Arp.svg # MINIRESOURCE_FILES += BogaudioModules/res/ASR-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/ASR.svg # MINIRESOURCE_FILES += BogaudioModules/res/Assign-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Assign.svg # MINIRESOURCE_FILES += BogaudioModules/res/Bool-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Bool.svg MINIRESOURCE_FILES += BogaudioModules/res/button_18px_0.svg MINIRESOURCE_FILES += BogaudioModules/res/button_18px_1_green.svg MINIRESOURCE_FILES += BogaudioModules/res/button_18px_1_orange.svg @@ -1579,233 +1567,114 @@ MINIRESOURCE_FILES += BogaudioModules/res/button_9px_0.svg MINIRESOURCE_FILES += BogaudioModules/res/button_9px_1_green.svg MINIRESOURCE_FILES += BogaudioModules/res/button_9px_1.svg # MINIRESOURCE_FILES += BogaudioModules/res/Chirp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Chirp.svg # MINIRESOURCE_FILES += BogaudioModules/res/Clpr-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Clpr.svg # MINIRESOURCE_FILES += BogaudioModules/res/Cmp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Cmp.svg # MINIRESOURCE_FILES += BogaudioModules/res/CmpDist-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/CmpDist.svg # MINIRESOURCE_FILES += BogaudioModules/res/CVD-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/CVD.svg # MINIRESOURCE_FILES += BogaudioModules/res/DADSRH-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DADSRH.svg # MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DADSRHPlus.svg # MINIRESOURCE_FILES += BogaudioModules/res/Detune-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Detune.svg # MINIRESOURCE_FILES += BogaudioModules/res/DGate-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/DGate.svg # MINIRESOURCE_FILES += BogaudioModules/res/Edge-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Edge.svg # MINIRESOURCE_FILES += BogaudioModules/res/EightFO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EightFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/EightOne-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EightOne.svg # MINIRESOURCE_FILES += BogaudioModules/res/EQ-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/EQS-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EQS.svg -# MINIRESOURCE_FILES += BogaudioModules/res/EQ.svg # MINIRESOURCE_FILES += BogaudioModules/res/FFB-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FFB.svg # MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FlipFlop.svg # MINIRESOURCE_FILES += BogaudioModules/res/FMOp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FMOp.svg # MINIRESOURCE_FILES += BogaudioModules/res/Follow-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Follow.svg # MINIRESOURCE_FILES += BogaudioModules/res/FourFO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FourFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/FourMan-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/FourMan.svg # MINIRESOURCE_FILES += BogaudioModules/res/Inv-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Inv.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_16px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_16px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_19px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_19px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_26px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_26px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_29px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_29px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_38px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_38px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_45px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_45px.svg MINIRESOURCE_FILES += BogaudioModules/res/knob_68px-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/knob_68px.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lag-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Lag.svg MINIRESOURCE_FILES += BogaudioModules/res/LFO-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/LFO-latif.svg -MINIRESOURCE_FILES += BogaudioModules/res/LFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lgsw-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Lgsw.svg # MINIRESOURCE_FILES += BogaudioModules/res/LLFO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LLFO.svg # MINIRESOURCE_FILES += BogaudioModules/res/LLPG-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LLPG.svg # MINIRESOURCE_FILES += BogaudioModules/res/Lmtr-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Lmtr.svg # MINIRESOURCE_FILES += BogaudioModules/res/LPG-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LPG.svg # MINIRESOURCE_FILES += BogaudioModules/res/LVCF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LVCF.svg # MINIRESOURCE_FILES += BogaudioModules/res/LVCO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/LVCO.svg # MINIRESOURCE_FILES += BogaudioModules/res/Manual-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Manual.svg # MINIRESOURCE_FILES += BogaudioModules/res/MegaGate-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/MegaGate.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix1-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix1-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix1.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix2-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix2-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix2.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix4-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix4.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix4x.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix8-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix8.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mix8x.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mono-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mono.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mult-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mult.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mumix-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mumix.svg # MINIRESOURCE_FILES += BogaudioModules/res/Mute8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Mute8.svg MINIRESOURCE_FILES += BogaudioModules/res/Noise-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Noise.svg # MINIRESOURCE_FILES += BogaudioModules/res/Nsgt-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Nsgt.svg MINIRESOURCE_FILES += BogaudioModules/res/Offset-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Offset-latif.svg -MINIRESOURCE_FILES += BogaudioModules/res/Offset-lowcontrast.svg -MINIRESOURCE_FILES += BogaudioModules/res/Offset.svg # MINIRESOURCE_FILES += BogaudioModules/res/OneEight-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/OneEight.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pan-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pan.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XF.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XR.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ14XV.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ6-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ6XF.svg # MINIRESOURCE_FILES += BogaudioModules/res/PEQ-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PEQ.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pgmr-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pgmr.svg # MINIRESOURCE_FILES += BogaudioModules/res/PgmrX-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PgmrX.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon16.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyCon8.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyMult-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyMult.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff16.svg # MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/PolyOff8.svg MINIRESOURCE_FILES += BogaudioModules/res/port-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/port.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pressor-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pressor.svg # MINIRESOURCE_FILES += BogaudioModules/res/Pulse-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Pulse.svg # MINIRESOURCE_FILES += BogaudioModules/res/Ranalyzer.svg # MINIRESOURCE_FILES += BogaudioModules/res/Reftone-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Reftone.svg # MINIRESOURCE_FILES += BogaudioModules/res/RGate-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/RGate.svg MINIRESOURCE_FILES += BogaudioModules/res/SampleHold-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/SampleHold.svg # MINIRESOURCE_FILES += BogaudioModules/res/Shaper-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Shaper.svg # MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/ShaperPlus.svg # MINIRESOURCE_FILES += BogaudioModules/res/Sine-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Sine.svg # MINIRESOURCE_FILES += BogaudioModules/res/Slew-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Slew.svg MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_0.svg MINIRESOURCE_FILES += BogaudioModules/res/slider_switch_2_14px_1.svg # MINIRESOURCE_FILES += BogaudioModules/res/Stack-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Stack.svg # MINIRESOURCE_FILES += BogaudioModules/res/Sums-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Sums.svg MINIRESOURCE_FILES += BogaudioModules/res/Switch-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Switch.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch1616-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch1616.svg MINIRESOURCE_FILES += BogaudioModules/res/Switch18-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Switch18.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch44-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch44.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch81-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch81.svg # MINIRESOURCE_FILES += BogaudioModules/res/Switch88-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Switch88.svg # MINIRESOURCE_FILES += BogaudioModules/res/Test-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Test.svg # MINIRESOURCE_FILES += BogaudioModules/res/Test2-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Test2.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderBase.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestExpanderExtension.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestGl-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestGl.svg # MINIRESOURCE_FILES += BogaudioModules/res/TestVCF-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/TestVCF.svg # MINIRESOURCE_FILES += BogaudioModules/res/UMix-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/UMix.svg MINIRESOURCE_FILES += BogaudioModules/res/Unison-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/Unison.svg MINIRESOURCE_FILES += BogaudioModules/res/VCA-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCA.svg # MINIRESOURCE_FILES += BogaudioModules/res/VCAmp-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/VCAmp.svg MINIRESOURCE_FILES += BogaudioModules/res/VCF-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCF.svg # MINIRESOURCE_FILES += BogaudioModules/res/VCM-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/VCM.svg MINIRESOURCE_FILES += BogaudioModules/res/VCO-dark.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCO-latif.svg -MINIRESOURCE_FILES += BogaudioModules/res/VCO.svg # MINIRESOURCE_FILES += BogaudioModules/res/Velo-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Velo.svg # MINIRESOURCE_FILES += BogaudioModules/res/Vish-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Vish.svg # MINIRESOURCE_FILES += BogaudioModules/res/VU-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/VU.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk2-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Walk2-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Walk2.svg # MINIRESOURCE_FILES += BogaudioModules/res/Walk-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Walk-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/Walk.svg # MINIRESOURCE_FILES += BogaudioModules/res/XCO-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/XCO-latif.svg -# MINIRESOURCE_FILES += BogaudioModules/res/XCO.svg # MINIRESOURCE_FILES += BogaudioModules/res/XFade-dark.svg -# MINIRESOURCE_FILES += BogaudioModules/res/XFade.svg MINIRESOURCE_FILES += Cardinal/res/HostAudio.svg MINIRESOURCE_FILES += Cardinal/res/HostCV.svg @@ -1845,7 +1714,6 @@ MINIRESOURCE_FILES += Fundamental/res/components/Scope-bg.svg MINIRESOURCE_FILES += MockbaModular/res/CZOsc.svg MINIRESOURCE_FILES += MockbaModular/res/Empty_gray.svg -MINIRESOURCE_FILES += MockbaModular/res/Empty_light.svg MINIRESOURCE_FILES += MockbaModular/res/Filtah.svg MINIRESOURCE_FILES += MockbaModular/res/HSW_0.svg MINIRESOURCE_FILES += MockbaModular/res/HSW_1.svg @@ -1879,33 +1747,12 @@ 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 MINIRESOURCE_FILES += surgext/res/xt/dark/panels/vco/BlankVCO.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_bg_25.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/fader_handle.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-9.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-12.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-14.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-16.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-9.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-12.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-14.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/knob-pointer-16.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/mod-button.svg -MINIRESOURCE_FILES += surgext/res/xt/light/components/port.svg -# MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/blank6hp.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/EGLFO.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/Matrix.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/Mixer.svg -# MINIRESOURCE_FILES += surgext/res/xt/light/panels/other/TotalBlank.svg -MINIRESOURCE_FILES += surgext/res/xt/light/panels/vco/BlankVCO.svg MINIRESOURCE_FILES += surgext/build/surge-data/configuration.xml MINIRESOURCE_FILES += surgext/build/surge-data/windows.wt # MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg -# MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelLight.svg # MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg -# MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelLight.svg # MINIRESOURCE_FILES += ValleyAudio/res/LightLEDButton80.svg # MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmallOut.svg # MINIRESOURCE_FILES += ValleyAudio/res/PJ301MDarkSmall.svg From d38b7213e70c1e288fbaee64c909f197260223ef Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 26 Jan 2023 18:09:13 +0100 Subject: [PATCH 245/451] Mini: Tweak available surge modules Signed-off-by: falkTX --- plugins/Makefile | 13 ++++++++++--- plugins/plugins-mini.cpp | 9 ++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 48b82a7b..7e420893 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1728,6 +1728,8 @@ MINIRESOURCE_FILES += MockbaModular/res/screw.svg MINIRESOURCE_FILES += MockbaModular/res/selector.svg MINIRESOURCE_FILES += MockbaModular/res/Shapah.svg +MINIRESOURCE_FILES += surgext/build/surge-data/configuration.xml +MINIRESOURCE_FILES += surgext/build/surge-data/windows.wt MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Regular.ttf MINIRESOURCE_FILES += surgext/res/xt/fonts/quicksand/Quicksand-Bold.ttf MINIRESOURCE_FILES += surgext/res/xt/dark/components/fader_bg.svg @@ -1747,9 +1749,14 @@ 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 MINIRESOURCE_FILES += surgext/res/xt/dark/panels/vco/BlankVCO.svg - -MINIRESOURCE_FILES += surgext/build/surge-data/configuration.xml -MINIRESOURCE_FILES += surgext/build/surge-data/windows.wt +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_0.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_1.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_2.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_3.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_4.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_5.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_6.svg +MINIRESOURCE_FILES += surgext/res/xt/glyphs/lt_7.svg # MINIRESOURCE_FILES += ValleyAudio/res/DexterPanelDark.svg # MINIRESOURCE_FILES += ValleyAudio/res/InterzonePanelDark.svg diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 598b5378..bbe4ba76 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -531,22 +531,25 @@ static void initStatic__surgext() const StaticPluginLoader spl(p, "surgext"); if (spl.ok()) { - p->addModel(modelVCOClassic); p->addModel(modelVCOModern); - p->addModel(modelVCOSHNoise); p->addModel(modelVCOSine); p->addModel(modelVCOString); - p->addModel(modelVCOTwist); /* p->addModel(modelVCOAlias); + p->addModel(modelVCOClassic); p->addModel(modelVCOFM2); p->addModel(modelVCOFM3); + p->addModel(modelVCOSHNoise); + p->addModel(modelVCOTwist); p->addModel(modelVCOWavetable); p->addModel(modelVCOWindow); */ spl.removeModule("SurgeXTOSCAlias"); + spl.removeModule("SurgeXTOSCClassic"); spl.removeModule("SurgeXTOSCFM2"); spl.removeModule("SurgeXTOSCFM3"); + spl.removeModule("SurgeXTOSCSHNoise"); + spl.removeModule("SurgeXTOSCTwist"); spl.removeModule("SurgeXTOSCWavetable"); spl.removeModule("SurgeXTOSCWindow"); From 855bc448a0b9c6e82f001e02b5253a11e09e744e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 27 Jan 2023 10:04:51 +0100 Subject: [PATCH 246/451] Surge String VCO is a bit too heavy, take it out Signed-off-by: falkTX --- plugins/plugins-mini.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index bbe4ba76..ef935b7d 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -533,13 +533,13 @@ static void initStatic__surgext() { p->addModel(modelVCOModern); p->addModel(modelVCOSine); - p->addModel(modelVCOString); /* p->addModel(modelVCOAlias); p->addModel(modelVCOClassic); p->addModel(modelVCOFM2); p->addModel(modelVCOFM3); p->addModel(modelVCOSHNoise); + p->addModel(modelVCOString); p->addModel(modelVCOTwist); p->addModel(modelVCOWavetable); p->addModel(modelVCOWindow); @@ -549,6 +549,7 @@ static void initStatic__surgext() spl.removeModule("SurgeXTOSCFM2"); spl.removeModule("SurgeXTOSCFM3"); spl.removeModule("SurgeXTOSCSHNoise"); + spl.removeModule("SurgeXTOSCString"); spl.removeModule("SurgeXTOSCTwist"); spl.removeModule("SurgeXTOSCWavetable"); spl.removeModule("SurgeXTOSCWindow"); From 26bd1886ee1548d0c275f55e7c6be4a0ee04afe7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 27 Jan 2023 10:13:56 +0100 Subject: [PATCH 247/451] Also skip Ripples, a bit too cpu expensive Signed-off-by: falkTX --- plugins/Makefile | 2 -- plugins/plugins-mini.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 7e420893..86eb5d08 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -538,7 +538,6 @@ PLUGIN_FILES += AudibleInstruments/eurorack/streams/vactrol.cc PLUGIN_FILES += AudibleInstruments/eurorack/streams/compressor.cc MINIPLUGIN_FILES += AudibleInstruments/src/Plaits.cpp -MINIPLUGIN_FILES += AudibleInstruments/src/Ripples.cpp # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/macro_oscillator.cc # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/analog_oscillator.cc # MINIPLUGIN_FILES += AudibleInstruments/eurorack/braids/digital_oscillator.cc @@ -1544,7 +1543,6 @@ MINIRESOURCE_FILES += AriaModules/res/faceplates/Swerge.svg MINIRESOURCE_FILES += AriaModules/res/signature/signature.svg MINIRESOURCE_FILES += AudibleInstruments/res/Plaits.svg -MINIRESOURCE_FILES += AudibleInstruments/res/Ripples.svg # MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf # MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index ef935b7d..35f10a7c 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -318,7 +318,6 @@ static void initStatic__AudibleInstruments() if (spl.ok()) { p->addModel(modelPlaits); - p->addModel(modelRipples); spl.removeModule("Blinds"); spl.removeModule("Braids"); @@ -330,6 +329,7 @@ static void initStatic__AudibleInstruments() spl.removeModule("Links"); spl.removeModule("Marbles"); spl.removeModule("Rings"); + spl.removeModule("Ripples"); spl.removeModule("Shades"); spl.removeModule("Shelves"); spl.removeModule("Stages"); From 0c9ca1ef08e0fa37fdb72916c5e73bd2ab992547 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 30 Jan 2023 14:00:45 +0100 Subject: [PATCH 248/451] Update dpf, fixes bufsize/srate callbacks on some formats Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index b4b0c7c6..5a69a71b 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit b4b0c7c67e48d5ca48a7d0d6a4d05b17e6c1d707 +Subproject commit 5a69a71bdf773c582b94fba62f56af286c5f7333 From a1d2dbc67fdc29185969b9c8ca3042ea950c38a4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 8 Feb 2023 20:36:17 +0100 Subject: [PATCH 249/451] Test build for forcely disabling denormals Signed-off-by: falkTX --- dpf | 2 +- src/CardinalPlugin.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dpf b/dpf index 5a69a71b..0057b194 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 5a69a71bdf773c582b94fba62f56af286c5f7333 +Subproject commit 0057b1940c84e7ecbfd192fe02bf03c557f1ee93 diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 4ec5896e..f359b977 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -1192,6 +1192,24 @@ class CardinalPlugin : public CardinalBasePlugin void run(const float** const inputs, float** const outputs, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) override { + // TESTING make this revert itself if proven to work + #if defined(__SSE2_MATH__) + _mm_setcsr(_mm_getcsr() | 0x8040); + #elif defined(__aarch64__) + uint64_t c; + __asm__ __volatile__("mrs %0, fpcr \n" + "orr %0, %0, #0x1000000\n" + "msr fpcr, %0 \n" + "isb \n" + : "=r"(c) :: "memory"); + #elif defined(__arm__) && !defined(__SOFTFP__) + uint32_t c; + __asm__ __volatile__("vmrs %0, fpscr \n" + "orr %0, %0, #0x1000000\n" + "vmsr fpscr, %0 \n" + : "=r"(c) :: "memory"); + #endif + rack::contextSet(context); const bool bypassed = context->bypassed; From 68c94903e392417fa88887fe4d84fd60850b137f Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 9 Feb 2023 11:13:33 +0100 Subject: [PATCH 250/451] Use new ScopedDenormalDisable class Signed-off-by: falkTX --- dpf | 2 +- src/CardinalPlugin.cpp | 19 ++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/dpf b/dpf index 0057b194..ed3bc5f8 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 0057b1940c84e7ecbfd192fe02bf03c557f1ee93 +Subproject commit ed3bc5f869874c5fd862fd0fd58bd52f3c0c2d54 diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index f359b977..ed3d444d 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -45,6 +45,7 @@ #include "DistrhoPluginUtils.hpp" #include "PluginContext.hpp" #include "extra/Base64.hpp" +#include "extra/ScopedDenormalDisable.hpp" #include "extra/ScopedSafeLocale.hpp" #ifdef DISTRHO_OS_WASM @@ -1192,23 +1193,7 @@ class CardinalPlugin : public CardinalBasePlugin void run(const float** const inputs, float** const outputs, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) override { - // TESTING make this revert itself if proven to work - #if defined(__SSE2_MATH__) - _mm_setcsr(_mm_getcsr() | 0x8040); - #elif defined(__aarch64__) - uint64_t c; - __asm__ __volatile__("mrs %0, fpcr \n" - "orr %0, %0, #0x1000000\n" - "msr fpcr, %0 \n" - "isb \n" - : "=r"(c) :: "memory"); - #elif defined(__arm__) && !defined(__SOFTFP__) - uint32_t c; - __asm__ __volatile__("vmrs %0, fpscr \n" - "orr %0, %0, #0x1000000\n" - "vmsr fpscr, %0 \n" - : "=r"(c) :: "memory"); - #endif + const ScopedDenormalDisable sdd; rack::contextSet(context); From 0ac2736dfa9216562855b6fec3f01256e873d996 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 10 Feb 2023 22:16:22 +0000 Subject: [PATCH 251/451] Switch to custom juce from carla, update surge --- carla | 2 +- deps/Makefile | 5 +++-- plugins/Makefile | 10 ++++++++++ plugins/plugins-mini.cpp | 7 ++++++- plugins/plugins.cpp | 3 +-- plugins/surgext | 2 +- src/Makefile.cardinal.mk | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) diff --git a/carla b/carla index aa400535..8e37c71b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit aa400535b31c67f4b6c1b28e6e20e4d4f82111a3 +Subproject commit 8e37c71bfbe7dd70d3212b5d09a69ff4ff62b520 diff --git a/deps/Makefile b/deps/Makefile index 19d5a14a..39e58473 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -321,8 +321,8 @@ ifeq ($(CPU_I386),true) SURGE_CXX_FLAGS += -D__sigemptyset=sigemptyset endif -# unwanted in this build -SURGE_CXX_FLAGS += -DJUCE_DSP_ENABLE_SNAP_TO_ZERO=0 +# use custom JUCE from DISTRHO and Carla +SURGE_CXX_FLAGS += -I$(abspath ../carla/source/modules) # SIMD must always be enabled, even in debug builds ifeq ($(NOSIMD),true) @@ -374,6 +374,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) \ $(SURGE_SRC_PATH) # -------------------------------------------------------------- diff --git a/plugins/Makefile b/plugins/Makefile index 86eb5d08..bc3c7f47 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1086,10 +1086,20 @@ SURGEXT_FLAGS += -DSURGE_RACK_BASE_VERSION=XT1-0-1 SURGEXT_FLAGS += -DSURGE_RACK_PLUG_VERSION=Cardinal SURGEXT_FLAGS += -DSURGE_RACK_SURGE_VERSION=Cardinal +SURGEXT_FLAGS += -I$(abspath ../carla/source/modules) + +MINIPLUGIN_FILES += surgext/src/Delay.cpp +MINIPLUGIN_FILES += surgext/src/DelayLineByFreq.cpp +MINIPLUGIN_FILES += surgext/src/DelayLineByFreqExpanded.cpp +MINIPLUGIN_FILES += surgext/src/EGxVCA.cpp +MINIPLUGIN_FILES += surgext/src/FX.cpp MINIPLUGIN_FILES += surgext/src/LFO.cpp MINIPLUGIN_FILES += surgext/src/Mixer.cpp MINIPLUGIN_FILES += surgext/src/ModMatrix.cpp +MINIPLUGIN_FILES += surgext/src/QuadAD.cpp +MINIPLUGIN_FILES += surgext/src/QuadLFO.cpp MINIPLUGIN_FILES += surgext/src/VCO.cpp +MINIPLUGIN_FILES += surgext/src/VCF.cpp MINIPLUGIN_FILES += surgext/src/Waveshaper.cpp MINIPLUGIN_FILES += surgext/src/XTModule.cpp MINIPLUGIN_FILES += surgext/src/XTModuleWidget.cpp diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 35f10a7c..7e9ebfb7 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -562,10 +562,12 @@ static void initStatic__surgext() /* p->addModel(modelSurgeDelay); p->addModel(modelSurgeDelayLineByFreq); + p->addModel(modelSurgeDelayLineByFreqExpanded); p->addModel(modelSurgeVCF); */ spl.removeModule("SurgeXTDelay"); spl.removeModule("SurgeXTDelayLineByFreq"); + spl.removeModule("SurgeXTDelayLineByFreqExpanded"); spl.removeModule("SurgeXTVCF"); spl.removeModule("SurgeXTFXChorus"); @@ -587,11 +589,14 @@ static void initStatic__surgext() spl.removeModule("SurgeXTFXTreeMonster"); spl.removeModule("SurgeXTFXVocoder"); - /* v2.1 modules + /* p->addModel(modelEGxVCA); p->addModel(modelQuadAD); p->addModel(modelQuadLFO); */ + spl.removeModule("SurgeXTEGxVCA"); + spl.removeModule("SurgeXTQuadAD"); + spl.removeModule("SurgeXTQuadLFO"); surgext_rack_initialize(); } diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index c8e778a8..9e2b2aaf 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -2883,6 +2883,7 @@ static void initStatic__surgext() p->addModel(modelSurgeVCF); p->addModel(modelSurgeDelay); p->addModel(modelSurgeDelayLineByFreq); + p->addModel(modelSurgeDelayLineByFreqExpanded); p->addModel(modelSurgeWaveshaper); p->addModel(modelSurgeLFO); p->addModel(modelSurgeMixer); @@ -2907,11 +2908,9 @@ static void initStatic__surgext() p->addModel(modelFXSpringReverb); p->addModel(modelFXTreeMonster); - /* v2.1 modules p->addModel(modelEGxVCA); p->addModel(modelQuadAD); p->addModel(modelQuadLFO); - */ surgext_rack_initialize(); } diff --git a/plugins/surgext b/plugins/surgext index 41c4ce88..62a20dce 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 41c4ce883f877a1f3d7cabc2cad943f34fde431f +Subproject commit 62a20dce687169bd074be552d09a5b299b446380 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index b5d208fe..f2da9971 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -203,7 +203,7 @@ endif ifneq ($(NOPLUGINS),true) ifeq ($(MACOS),true) -EXTRA_DSP_LIBS += -framework Accelerate +EXTRA_DSP_LIBS += -framework Accelerate -framework AppKit endif endif From c83ce00561f39b3845df7f866e66a9d737df6b51 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 11 Feb 2023 11:39:50 +0000 Subject: [PATCH 252/451] A few build fixes --- carla | 2 +- plugins/surgext | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 8e37c71b..79888513 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 8e37c71bfbe7dd70d3212b5d09a69ff4ff62b520 +Subproject commit 798885136a73062efb5a1fa8630d3f4b126d5d02 diff --git a/plugins/surgext b/plugins/surgext index 62a20dce..1f5a2ebc 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 62a20dce687169bd074be552d09a5b299b446380 +Subproject commit 1f5a2ebc4542d96e601024bf820dfa784c9a97bd From 458b34b369c3686e87e487825cc69bb73762c787 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 11 Feb 2023 13:59:18 +0100 Subject: [PATCH 253/451] Even more build fixes --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 79888513..515af8ac 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 798885136a73062efb5a1fa8630d3f4b126d5d02 +Subproject commit 515af8ac30ac64deed8ae2fb89038266f0845da9 diff --git a/dpf b/dpf index ed3bc5f8..1eba48d4 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit ed3bc5f869874c5fd862fd0fd58bd52f3c0c2d54 +Subproject commit 1eba48d4d237521376097b3233ce7a299b4544ea From f7a919f206df33d69da7c14fb8fa15b87e53e887 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 11 Feb 2023 17:44:36 +0100 Subject: [PATCH 254/451] Fix windows build Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index f2da9971..0b7c36ea 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -204,6 +204,8 @@ endif ifneq ($(NOPLUGINS),true) ifeq ($(MACOS),true) EXTRA_DSP_LIBS += -framework Accelerate -framework AppKit +else ifeq ($(WINDOWS),true) +EXTRA_DSP_LIBS += -lole32 -lshlwapi -luuid -lversion endif endif From 10545938d8faf09ad2a0bd5a0eee7f33bd62d629 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 12 Feb 2023 17:24:45 +0100 Subject: [PATCH 255/451] Tweak build in preparation for surge update Signed-off-by: falkTX --- Makefile | 2 +- carla | 2 +- plugins/Makefile | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d12c8d05..2df94724 100644 --- a/Makefile +++ b/Makefile @@ -261,7 +261,7 @@ clean: $(MAKE) clean -C dpf/utils/lv2-ttl-generator $(MAKE) clean -C plugins $(MAKE) clean -C src - rm -rf bin build + rm -rf bin build build-headless # -------------------------------------------------------------- # Install step diff --git a/carla b/carla index 515af8ac..4c29367b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 515af8ac30ac64deed8ae2fb89038266f0845da9 +Subproject commit 4c29367b6e6f82e75746b9ee3a01f9d205c0beae diff --git a/plugins/Makefile b/plugins/Makefile index bc3c7f47..e772a92a 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1041,7 +1041,9 @@ SURGEXT_FLAGS = $(filter-out -fsingle-precision-constant,$(filter-out -std=gnu+ SURGEXT_FLAGS += $(NOFINITE_FLAGS) SURGEXT_FLAGS += -std=gnu++17 SURGEXT_FLAGS += -DTIXML_USE_STL=1 -SURGEXT_FLAGS += -Isurgext/surge/src/common \ +SURGEXT_FLAGS += \ + -Isurgext/libs/sst/sst-basic-blocks/include \ + -Isurgext/surge/src/common \ -Isurgext/surge/src/common/dsp \ -Isurgext/surge/src/common/dsp/filters \ -Isurgext/surge/src/common/dsp/vembertech \ From e0ff27ebb434e8add09adacadf16385ce8170e6c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 12 Feb 2023 19:33:32 +0100 Subject: [PATCH 256/451] Make surgext build flags match the cmake side Signed-off-by: falkTX --- plugins/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Makefile b/plugins/Makefile index e772a92a..c548609f 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1064,7 +1064,11 @@ SURGEXT_FLAGS += \ -Isurgext/surge/libs/tuning-library/include \ -I../deps/surge-build/libs/sst/sst-plugininfra/libs/filesystem/include \ -include limits \ - -DSURGE_COMPILE_BLOCK_SIZE=8 + -DSURGE_COMPILE_BLOCK_SIZE=8 \ + -DSURGE_SKIP_ODDSOUND_MTS \ + -DHAS_LUA=0 \ + -DHAS_JUCE=0 \ + -DSKIP_JUCE=1 ifneq ($(DEBUG),true) SURGEXT_FLAGS += -DRELEASE=1 From 46ce8784350f52d78b2c7681f665b8da5d1d0d0a Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 14 Feb 2023 11:16:49 +0100 Subject: [PATCH 257/451] Update surge to stable tag Signed-off-by: falkTX --- plugins/surgext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/surgext b/plugins/surgext index 1f5a2ebc..8067c8aa 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 1f5a2ebc4542d96e601024bf820dfa784c9a97bd +Subproject commit 8067c8aaac6af47c52aa3492a91d84e556bf08af From 605cb05604453bbdc74bacd9dd39c54b3eed9a26 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 14 Feb 2023 11:27:18 +0100 Subject: [PATCH 258/451] Bump version Signed-off-by: falkTX --- Makefile | 2 +- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 4 ++-- src/CardinalPlugin.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2df94724..a3a98e5e 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 22.12 +VERSION = 23.02 # -------------------------------------------------------------- # Import base definitions diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 18ece469..148e17de 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 22.12) +project(Cardinal VERSION 23.02) add_subdirectory(JUCE) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index d415d572..64182cd2 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -98,7 +98,7 @@ void destroyStaticPlugins(); } } -const std::string CARDINAL_VERSION = "22.12"; +const std::string CARDINAL_VERSION = "23.02"; START_NAMESPACE_DISTRHO diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index ed3d444d..f0bfb9be 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -357,7 +357,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 22, 12); + return d_version(0, 23, 2); } int64_t getUniqueId() const override From 37860418bf1d1ebf1a838c9aabbf01db0be9d307 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 16 Feb 2023 15:28:21 +0100 Subject: [PATCH 259/451] Enable CardinalMIDI variant for AU Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 114 +++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 6 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 148e17de..5fec6cdb 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -179,9 +179,9 @@ target_compile_definitions(Cardinal JUCE_USE_OGGVORBIS=0 JUCE_USE_XINERAMA=0 JUCE_VST3_CAN_REPLACE_VST2=0 - JUCE_ALSA=1 + JUCE_ALSA=0 JUCE_DIRECTSOUND=0 - JUCE_JACK=1 + JUCE_JACK=0 JUCE_WASAPI=0 JUCE_WEB_BROWSER=0) @@ -282,9 +282,9 @@ target_compile_definitions(CardinalFX JUCE_USE_OGGVORBIS=0 JUCE_USE_XINERAMA=0 JUCE_VST3_CAN_REPLACE_VST2=0 - JUCE_ALSA=1 + JUCE_ALSA=0 JUCE_DIRECTSOUND=0 - JUCE_JACK=1 + JUCE_JACK=0 JUCE_WASAPI=0 JUCE_WEB_BROWSER=0) @@ -343,6 +343,108 @@ target_link_libraries(CardinalFX juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) +# MIDI variant + +juce_add_plugin(CardinalMIDI + AU_MAIN_TYPE kAudioUnitType_MIDIProcessor + COMPANY_COPYRIGHT "GPL-3.0-or-later" + COMPANY_NAME "DISTRHO" + COMPANY_WEBSITE "https://github.com/DISTRHO/Cardinal" + DESCRIPTION "Virtual modular synthesizer plugin" + EDITOR_WANTS_KEYBOARD_FOCUS FALSE + FORMATS ${PLUGIN_FORMATS} + IS_MIDI_EFFECT TRUE + IS_SYNTH FALSE + NEEDS_MIDI_INPUT TRUE + NEEDS_MIDI_OUTPUT TRUE + PLUGIN_CODE DcnM + PLUGIN_MANUFACTURER_CODE Dstr + PRODUCT_NAME "CardinalMIDI") + +target_sources(CardinalMIDI + PRIVATE + CardinalWrapper.cpp) + +target_include_directories(CardinalMIDI + PRIVATE + ../dpf/distrho + ../src/CardinalFX) + +target_compile_definitions(CardinalMIDI + PUBLIC + DISTRHO_NAMESPACE=CardinalDISTRHO + DGL_NAMESPACE=CardinalDGL + JucePlugin_PreferredChannelConfigurations=2,2 + JUCE_CHECK_MEMORY_LEAKS=0 + JUCE_DISABLE_NATIVE_FILECHOOSERS=1 + JUCE_DISPLAY_SPLASH_SCREEN=0 + JUCE_MODAL_LOOPS_PERMITTED=0 + JUCE_USE_CURL=0 + JUCE_USE_FLAC=0 + JUCE_USE_OGGVORBIS=0 + JUCE_USE_XINERAMA=0 + JUCE_VST3_CAN_REPLACE_VST2=0 + JUCE_ALSA=0 + JUCE_DIRECTSOUND=0 + JUCE_JACK=0 + JUCE_WASAPI=0 + JUCE_WEB_BROWSER=0) + +target_link_libraries(CardinalMIDI + PRIVATE + juce::juce_audio_utils + ${STATIC_LIBS_START} + sPlugins + sCardinalFX + sRack + carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + ysfx + zita_resampler + dgl + surgedep01 + surgedep02 + surgedep03 + surgedep04 + surgedep05 + surgedep06 + surgedep07 + surgedep08 + surgedep09 + surgedep10 + libaubio + libarchive + libjansson + libquickjs + libsamplerate + libspeexdsp + libzstd + ${STATIC_LIBS_END} + ${GL_LIBRARIES} + ${DBUS_LIBRARIES} + -L${LIBLO_LIBRARY_DIRS} + ${FFTW3F_LIBRARIES} + ${LIBLO_LIBRARIES} + ${SNDFILE_LIBRARIES} + ${X11_LIBRARIES} + ${XCURSOR_LIBRARIES} + ${XEXT_LIBRARIES} + ${XRANDR_LIBRARIES} + ${EXTRA_LIBS} + -lmagic + PUBLIC + juce::juce_recommended_config_flags + juce::juce_recommended_lto_flags + juce::juce_recommended_warning_flags) + # Synth variant juce_add_plugin(CardinalSynth @@ -384,9 +486,9 @@ target_compile_definitions(CardinalSynth JUCE_USE_OGGVORBIS=0 JUCE_USE_XINERAMA=0 JUCE_VST3_CAN_REPLACE_VST2=0 - JUCE_ALSA=1 + JUCE_ALSA=0 JUCE_DIRECTSOUND=0 - JUCE_JACK=1 + JUCE_JACK=0 JUCE_WASAPI=0 JUCE_WEB_BROWSER=0) From 11007fb9481d6219e650444fcfda3b810d7c3345 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 16 Feb 2023 17:10:32 +0100 Subject: [PATCH 260/451] Add mini moogy patch Signed-off-by: falkTX --- patches/mini/falkTX_-_Moogy.vcv | 643 ++++++++++++++++++++++++++++++++ 1 file changed, 643 insertions(+) create mode 100644 patches/mini/falkTX_-_Moogy.vcv diff --git a/patches/mini/falkTX_-_Moogy.vcv b/patches/mini/falkTX_-_Moogy.vcv new file mode 100644 index 00000000..5b6978e7 --- /dev/null +++ b/patches/mini/falkTX_-_Moogy.vcv @@ -0,0 +1,643 @@ +{ + "version": "2.1.2", + "zoom": 1.0, + "gridOffset": [ + -7, + -0.05 + ], + "modules": [ + { + "id": 7797650034473482, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "leftModuleId": 7219430607288126, + "data": { + "filepath": "", + "lang": "None", + "etext": "\n\nThis section spreads\n\nthe unison sound\n\nacross 4 stereo outs\n\n\n\n\n\n", + "width": 14 + }, + "pos": [ + 31, + 1 + ] + }, + { + "id": 8869926954268675, + "plugin": "Bogaudio", + "model": "Bogaudio-Unison", + "version": "2.0", + "params": [ + { + "value": 8.0, + "id": 0 + }, + { + "value": 4.7590360641479492, + "id": 1 + } + ], + "data": {}, + "pos": [ + 4, + 0 + ] + }, + { + "id": 5726895899473528, + "plugin": "Fundamental", + "model": "ADSR", + "version": "2.0", + "params": [ + { + "value": 0.28500017523765564, + "id": 0 + }, + { + "value": 0.50499969720840454, + "id": 1 + }, + { + "value": 0.49999982118606567, + "id": 2 + }, + { + "value": 0.5, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + } + ], + "pos": [ + 8, + 0 + ] + }, + { + "id": 4655444792904207, + "plugin": "MockbaModular", + "model": "CZOsc", + "version": "2.0", + "params": [ + { + "value": 7.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + } + ], + "leftModuleId": 1312836734148177, + "pos": [ + 21, + 0 + ] + }, + { + "id": 1416017514237263, + "plugin": "MockbaModular", + "model": "Filtah", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 79.999984741210938, + "id": 1 + }, + { + "value": 1.348394960132282e-7, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "leftModuleId": 1223772688968402, + "pos": [ + 27, + 0 + ] + }, + { + "id": 1312836734148177, + "plugin": "MockbaModular", + "model": "MaugOsc", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "rightModuleId": 4655444792904207, + "pos": [ + 19, + 0 + ] + }, + { + "id": 1223772688968402, + "plugin": "MockbaModular", + "model": "Filtah", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 79.999984741210938, + "id": 1 + }, + { + "value": 1.348394960132282e-7, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + } + ], + "rightModuleId": 1416017514237263, + "pos": [ + 25, + 0 + ] + }, + { + "id": 4038801811482009, + "plugin": "MockbaModular", + "model": "Mixah", + "version": "2.0", + "params": [ + { + "value": 0.55000019073486328, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + } + ], + "pos": [ + 31, + 0 + ] + }, + { + "id": 7219430607288126, + "plugin": "Fundamental", + "model": "Split", + "version": "2.0", + "params": [], + "leftModuleId": 1, + "rightModuleId": 7797650034473482, + "pos": [ + 26, + 1 + ] + }, + { + "id": 1079059256177472, + "plugin": "Cardinal", + "model": "TextEditor", + "version": "2.0", + "params": [], + "leftModuleId": 32755851899487, + "data": { + "filepath": "", + "lang": "None", + "etext": "\n\n1 - LP Filter\n2 - Resonance\n3 - OSC 1 <> 2\n4 - Attack\n5 - Decay\n6 - Sustain\n\n\n\n\n", + "width": 11 + }, + "pos": [ + 48, + 0 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.66632837057113647, + "id": 0 + } + ], + "leftModuleId": 3932369330543212, + "rightModuleId": 7219430607288126, + "data": { + "dcFilter": true + }, + "pos": [ + 18, + 1 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + -6, + 0 + ] + }, + { + "id": 3932369330543212, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.66632837057113647, + "id": 0 + } + ], + "leftModuleId": 1952123403145454, + "rightModuleId": 1, + "data": { + "dcFilter": true + }, + "pos": [ + 10, + 1 + ] + }, + { + "id": 1952123403145454, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.66632837057113647, + "id": 0 + } + ], + "leftModuleId": 3890811893602150, + "rightModuleId": 3932369330543212, + "data": { + "dcFilter": true + }, + "pos": [ + 2, + 1 + ] + }, + { + "id": 3890811893602150, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.66632837057113647, + "id": 0 + } + ], + "rightModuleId": 1952123403145454, + "data": { + "dcFilter": true + }, + "pos": [ + -6, + 1 + ] + }, + { + "id": 32755851899487, + "plugin": "Cardinal", + "model": "HostParametersMap", + "version": "2.0", + "params": [], + "rightModuleId": 1079059256177472, + "data": { + "maps": [ + { + "hostParamId": 255, + "inverted": false, + "smooth": true, + "moduleId": -1, + "paramId": 0 + }, + { + "hostParamId": 255, + "inverted": false, + "smooth": true, + "moduleId": -1, + "paramId": 0 + }, + { + "hostParamId": 0, + "inverted": false, + "smooth": true, + "moduleId": 1223772688968402, + "paramId": 1 + }, + { + "hostParamId": 0, + "inverted": false, + "smooth": true, + "moduleId": 1416017514237263, + "paramId": 1 + }, + { + "hostParamId": 1, + "inverted": false, + "smooth": true, + "moduleId": 1223772688968402, + "paramId": 2 + }, + { + "hostParamId": 1, + "inverted": false, + "smooth": true, + "moduleId": 1416017514237263, + "paramId": 2 + }, + { + "hostParamId": 2, + "inverted": false, + "smooth": true, + "moduleId": 4038801811482009, + "paramId": 0 + }, + { + "hostParamId": 3, + "inverted": false, + "smooth": true, + "moduleId": 5726895899473528, + "paramId": 0 + }, + { + "hostParamId": 4, + "inverted": false, + "smooth": true, + "moduleId": 5726895899473528, + "paramId": 1 + }, + { + "hostParamId": 5, + "inverted": false, + "smooth": true, + "moduleId": 5726895899473528, + "paramId": 2 + }, + { + "hostParamId": 255, + "inverted": false, + "smooth": true, + "moduleId": -1, + "paramId": 0 + } + ] + }, + "pos": [ + 37, + 0 + ] + } + ], + "cables": [ + { + "id": 8182356705718260, + "outputModuleId": 1312836734148177, + "outputId": 0, + "inputModuleId": 1223772688968402, + "inputId": 2, + "color": "#a8ff52" + }, + { + "id": 5472993478872985, + "outputModuleId": 5726895899473528, + "outputId": 0, + "inputModuleId": 1223772688968402, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 5127890094838131, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 8869926954268675, + "inputId": 2, + "color": "#ff5252" + }, + { + "id": 4024923731736886, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 8869926954268675, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 2334907509933159, + "outputModuleId": 8869926954268675, + "outputId": 0, + "inputModuleId": 1312836734148177, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 3002878830249735, + "outputModuleId": 8869926954268675, + "outputId": 1, + "inputModuleId": 5726895899473528, + "inputId": 4, + "color": "#ff5252" + }, + { + "id": 3630780656969299, + "outputModuleId": 7219430607288126, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#e952ff" + }, + { + "id": 2252461163745874, + "outputModuleId": 7219430607288126, + "outputId": 2, + "inputModuleId": 1, + "inputId": 1, + "color": "#e952ff" + }, + { + "id": 285917638623769, + "outputModuleId": 7219430607288126, + "outputId": 3, + "inputModuleId": 3932369330543212, + "inputId": 1, + "color": "#e952ff" + }, + { + "id": 8064030762561300, + "outputModuleId": 7219430607288126, + "outputId": 7, + "inputModuleId": 3890811893602150, + "inputId": 1, + "color": "#e952ff" + }, + { + "id": 5150351568049518, + "outputModuleId": 7219430607288126, + "outputId": 5, + "inputModuleId": 1952123403145454, + "inputId": 1, + "color": "#e952ff" + }, + { + "id": 1530942990840499, + "outputModuleId": 7219430607288126, + "outputId": 6, + "inputModuleId": 3890811893602150, + "inputId": 0, + "color": "#e952ff" + }, + { + "id": 6358946006960973, + "outputModuleId": 7219430607288126, + "outputId": 4, + "inputModuleId": 1952123403145454, + "inputId": 0, + "color": "#e952ff" + }, + { + "id": 6965224767727040, + "outputModuleId": 7219430607288126, + "outputId": 1, + "inputModuleId": 3932369330543212, + "inputId": 0, + "color": "#e952ff" + }, + { + "id": 5380295368493604, + "outputModuleId": 4655444792904207, + "outputId": 0, + "inputModuleId": 1416017514237263, + "inputId": 2, + "color": "#a8ff52" + }, + { + "id": 2435962983629702, + "outputModuleId": 1223772688968402, + "outputId": 0, + "inputModuleId": 4038801811482009, + "inputId": 2, + "color": "#e952ff" + }, + { + "id": 8984394551942722, + "outputModuleId": 1416017514237263, + "outputId": 0, + "inputModuleId": 4038801811482009, + "inputId": 3, + "color": "#e952ff" + }, + { + "id": 8445580184820759, + "outputModuleId": 5726895899473528, + "outputId": 0, + "inputModuleId": 1416017514237263, + "inputId": 0, + "color": "#e8ff52" + }, + { + "id": 7727190565279635, + "outputModuleId": 8869926954268675, + "outputId": 0, + "inputModuleId": 4655444792904207, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 6359733527436216, + "outputModuleId": 5726895899473528, + "outputId": 0, + "inputModuleId": 4038801811482009, + "inputId": 1, + "color": "#e8ff52" + }, + { + "id": 8765471407154125, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 5726895899473528, + "inputId": 5, + "color": "#ff9352" + }, + { + "id": 8605661946106678, + "outputModuleId": 4038801811482009, + "outputId": 0, + "inputModuleId": 7219430607288126, + "inputId": 0, + "color": "#e952ff" + } + ] +} From eb2953a17e7f3ddd00e6d5dbe1d2b1d6eea8f154 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 16 Feb 2023 17:51:55 +0100 Subject: [PATCH 261/451] Make surgext deps simde build flags match main build Signed-off-by: falkTX --- deps/Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 39e58473..4bb66042 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -338,13 +338,12 @@ endif endif # same flags as applied to main build -# SURGE_CXX_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 -# SURGE_CXX_FLAGS += -DSIMDE_ENABLE_NATIVE_ALIASES -# SURGE_CXX_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE -# SURGE_CXX_FLAGS += -DSIMDE_FAST_MATH -# SURGE_CXX_FLAGS += -DSIMDE_FAST_NANS -# SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_MODE -# SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_TIES +SURGE_CXX_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 +SURGE_CXX_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE +SURGE_CXX_FLAGS += -DSIMDE_FAST_MATH +SURGE_CXX_FLAGS += -DSIMDE_FAST_NANS +SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_MODE +SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_TIES # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) From 3e9da0b4024da85a3494994e1e3021ecef10f86b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 15:33:14 +0100 Subject: [PATCH 262/451] Make surge use included simde Signed-off-by: falkTX --- deps/Makefile | 1 + plugins/surgext | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index 4bb66042..74f2981c 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -374,6 +374,7 @@ $(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt -DSURGE_SKIP_LUA=TRUE \ -DSURGE_SKIP_ODDSOUND_MTS=TRUE \ -DSURGE_JUCE_PATH=$(abspath ../carla/source) \ + -DSURGE_SIMDE_PATH=$(abspath ../include/simde) \ $(SURGE_SRC_PATH) # -------------------------------------------------------------- diff --git a/plugins/surgext b/plugins/surgext index 8067c8aa..6e4d8642 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 8067c8aaac6af47c52aa3492a91d84e556bf08af +Subproject commit 6e4d86421f9405a4d9d669b1e75b8adf85ce4865 From 5a2f79b7a9f8b395e24991590f6ca58173e32b6a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 18:46:10 +0100 Subject: [PATCH 263/451] CI: Use ubuntu-22.04 for linux-armhf builds Signed-off-by: falkTX --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e75a862e..2704e041 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,7 +100,7 @@ jobs: *.tar.gz linux-armhf: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: @@ -125,15 +125,16 @@ jobs: run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get install -yqq --allow-downgrades libgd3/jammy + sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture armhf sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list - echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list - echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list - echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list + echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list + echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list + echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf qemu-user-static sudo apt-get clean From 5f3ce7471f79953667c57a3bedc138207c657e7c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 19:09:54 +0100 Subject: [PATCH 264/451] Update surge to get simde fix again Signed-off-by: falkTX --- dpf | 2 +- plugins/surgext | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dpf b/dpf index 1eba48d4..27e75763 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 1eba48d4d237521376097b3233ce7a299b4544ea +Subproject commit 27e75763a6d736453e803778288841a2b0ed7bd9 diff --git a/plugins/surgext b/plugins/surgext index 6e4d8642..8ae3236e 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 6e4d86421f9405a4d9d669b1e75b8adf85ce4865 +Subproject commit 8ae3236e5c638a5f4eaa7edf9d87c7ed3c5d0543 From 30941542d3d20d411132ee58859ddc0d148aedab Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 19:25:57 +0100 Subject: [PATCH 265/451] Fix a few details of mini version, show mini demo patches Signed-off-by: falkTX --- src/CardinalUI.cpp | 4 ++-- src/override/MenuBar.cpp | 10 ++++------ src/override/Scene.cpp | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 764cf0ef..87957eed 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -347,8 +347,6 @@ class CardinalUI : public CardinalBaseUI, rack::contextSet(context); #if CARDINAL_VARIANT_MINI - DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); - // create unique temporary path for this instance try { char uidBuf[24]; @@ -403,6 +401,8 @@ class CardinalUI : public CardinalBaseUI, context->patch->loadTemplate(); context->scene->rackScroll->reset(); + DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); + Engine_setRemoteDetails(context->engine, remoteDetails); #endif diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index a390a348..70bb3efe 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -101,15 +101,16 @@ struct MenuButton : ui::Button { struct FileButton : MenuButton { const bool isStandalone; -#if ! CARDINAL_VARIANT_MINI std::vector demoPatches; -#endif FileButton(const bool standalone) : MenuButton(), isStandalone(standalone) { -#if ! CARDINAL_VARIANT_MINI +#if CARDINAL_VARIANT_MINI + const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "mini"; +#else const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples"; +#endif if (system::isDirectory(patchesDir)) { @@ -118,7 +119,6 @@ struct FileButton : MenuButton { return string::lowercase(a) < string::lowercase(b); }); } -#endif } void onAction(const ActionEvent& e) override { @@ -211,7 +211,6 @@ struct FileButton : MenuButton { #endif #endif -#if ! CARDINAL_VARIANT_MINI if (!demoPatches.empty()) { menu->addChild(new ui::MenuSeparator); @@ -237,7 +236,6 @@ struct FileButton : MenuButton { })); })); } -#endif #ifndef DISTRHO_OS_WASM if (isStandalone) { diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index e8f1e77c..a6802a9c 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -218,7 +218,7 @@ void Scene::step() { const std::string& name(APP->history->actions[actionIndex - 1]->name); static const std::vector ignoredNames = { "move knob", - "move module", + "move modules", "move switch", }; if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) { From a0a9be87cbe215b50616d747f3d783c53a38bd79 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 19:32:21 +0100 Subject: [PATCH 266/451] Revert "CI: Use ubuntu-22.04 for linux-armhf builds" This reverts commit 5a2f79b7a9f8b395e24991590f6ca58173e32b6a. --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2704e041..e75a862e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,7 +100,7 @@ jobs: *.tar.gz linux-armhf: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: @@ -125,16 +125,15 @@ jobs: run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libgd3/jammy - sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget + sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal sudo apt-get clean - name: Set up dependencies run: | sudo dpkg --add-architecture armhf sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list - echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list - echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list - echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list + echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list + echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list + echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf qemu-user-static sudo apt-get clean From 31dcf9ec6f2262780a6a32e3a5f39f3b8b558be2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 19:38:04 +0100 Subject: [PATCH 267/451] Make remote name more generic Signed-off-by: falkTX --- src/override/MenuBar.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 70bb3efe..e73e0d07 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -173,16 +173,21 @@ struct FileButton : MenuButton { }, APP->patch->path.empty())); #if defined(HAVE_LIBLO) || CARDINAL_VARIANT_MINI +#ifdef __MOD_DEVICES__ +#define REMOTE_NAME "MOD" +#else +#define REMOTE_NAME "Remote" +#endif menu->addChild(new ui::MenuSeparator); remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); if (remoteDetails != nullptr && remoteDetails->connected) { - menu->addChild(createMenuItem("Deploy to MOD", "F7", [remoteDetails]() { + menu->addChild(createMenuItem("Deploy to " REMOTE_NAME, "F7", [remoteDetails]() { remoteUtils::sendFullPatchToRemote(remoteDetails); })); - menu->addChild(createCheckMenuItem("Auto deploy to MOD", "", + menu->addChild(createCheckMenuItem("Auto deploy to " REMOTE_NAME, "", [remoteDetails]() {return remoteDetails->autoDeploy;}, [remoteDetails]() { remoteDetails->autoDeploy = !remoteDetails->autoDeploy; @@ -190,7 +195,7 @@ struct FileButton : MenuButton { } )); } else { - menu->addChild(createMenuItem("Connect to MOD", "", []() { + menu->addChild(createMenuItem("Connect to " REMOTE_NAME, "", []() { DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); })); } From 5376573d09025a61d79355a3c8bdd321701a6677 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 19:41:26 +0100 Subject: [PATCH 268/451] Remove the noplugins build Signed-off-by: falkTX --- docs/BUILDING.md | 1 - plugins/Makefile | 41 ---------------------------------------- src/Makefile | 2 -- src/Makefile.cardinal.mk | 10 ---------- 4 files changed, 54 deletions(-) diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 13de9ccd..f5a9ff99 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -22,7 +22,6 @@ Use them as `make SOMEOPTION=SOMEVALUE` syntax. You can specify as many options Developer related options: * `DEBUG=true` build non-stripped debug binaries (terrible performance, only useful for developers) -* `NOPLUGINS=true` build only the Cardinal Core plugins (not recommended, only useful for developers) * `NOSIMD=true` build without SIMD (not recommended, only useful for developers) Packaging related options: diff --git a/plugins/Makefile b/plugins/Makefile index c548609f..e8d52880 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -231,12 +231,7 @@ DRWAV += drwav_write_raw # -------------------------------------------------------------- # Files to build -ifeq ($(NOPLUGINS),true) -PLUGIN_FILES = noplugins.cpp -else PLUGIN_FILES = plugins.cpp -endif - MINIPLUGIN_FILES = plugins-mini.cpp # -------------------------------------------------------------- @@ -334,12 +329,6 @@ FUNDAMENTAL_CUSTOM = $(DRWAV) # PLUGIN_FILES += $(wildcard ZamAudio/src/*.cpp) -# -------------------------------------------------------------- -# noplugins build - -NOPLUGIN_FILES = $(PLUGIN_FILES:%=%) - -ifneq ($(NOPLUGINS),true) # -------------------------------------------------------------- # 21kHz @@ -1277,10 +1266,6 @@ PLUGIN_FILES += $(filter-out ZZC/src/ZZC.cpp ZZC/src/WavetablePlayer.cpp,$(wildc # modules/types which are present in other plugins ZZC_CUSTOM = Clock LowFrequencyOscillator -# -------------------------------------------------------------- - -endif # !NOPLUGINS - # -------------------------------------------------------------- # Build setup @@ -1374,10 +1359,6 @@ BASE_FLAGS += -I../include/mingw-compat BASE_FLAGS += -I../include/mingw-std-threads endif -ifeq ($(NOPLUGINS),true) -BASE_FLAGS += -DNOPLUGINS -endif - ifeq ($(USE_GLES2),true) BASE_FLAGS += -DNANOVG_GLES2_FORCED else ifeq ($(USE_GLES3),true) @@ -1454,11 +1435,7 @@ ifeq ($(HEADLESS),true) TARGET_SUFFIX = -headless endif -ifeq ($(NOPLUGINS),true) -TARGETS = noplugins$(TARGET_SUFFIX).a -else TARGETS = plugins$(TARGET_SUFFIX).a plugins-mini$(TARGET_SUFFIX).a -endif all: $(TARGETS) ifneq ($(HEADLESS),true) @@ -1472,16 +1449,6 @@ clean: # -------------------------------------------------------------- -ifeq ($(NOPLUGINS),true) -PLUGIN_LIST = Cardinal Fundamental ZamAudio - -RESOURCE_FILES = \ - $(wildcard Cardinal/res/*.svg) \ - $(wildcard Fundamental/res/*.svg) \ - $(wildcard Fundamental/res/components/*.svg) \ - Fundamental/presets -# $(wildcard ZamAudio/res/*.svg) -else PLUGIN_LIST = $(subst /plugin.json,,$(wildcard */plugin.json)) UNWANTED_FILES = HetrickCV/res/illustrator - deprecated/MyModule.svg @@ -1536,7 +1503,6 @@ 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 @@ -2078,8 +2044,6 @@ PLUGIN_OBJS += $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.o) MINIPLUGIN_OBJS = $(MINIPLUGIN_FILES:%=$(BUILD_DIR)/%.o) MINIPLUGIN_OBJS += $(MINIPLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.o) -NOPLUGIN_OBJS = $(NOPLUGIN_FILES:%=$(BUILD_DIR)/%.o) - .PRECIOUS: $(PLUGIN_BINARIES:%=$(BUILD_DIR)/%.bin.c) # function for custom module names macro @@ -2096,11 +2060,6 @@ plugins-mini$(TARGET_SUFFIX).a: $(MINIPLUGIN_OBJS) $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ -noplugins$(TARGET_SUFFIX).a: $(NOPLUGIN_OBJS) - @echo "Creating $@" $(NOPLUGIN_OBJS) - $(SILENT)rm -f $@ - $(SILENT)$(AR) crs $@ $^ - $(BUILD_DIR)/%.bin.c: % ../deps/res2c.py -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Generating $*.bin.c" diff --git a/src/Makefile b/src/Makefile index a0398e3f..d888d600 100644 --- a/src/Makefile +++ b/src/Makefile @@ -249,9 +249,7 @@ else ifeq ($(WASM),true) $(MAKE) -C CardinalNative else $(MAKE) -C Cardinal -ifneq ($(NOPLUGINS),true) $(MAKE) -C CardinalMini -endif $(MAKE) -C CardinalNative $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 0b7c36ea..ed782d9c 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -125,8 +125,6 @@ endif ifeq ($(CARDINAL_VARIANT),mini) RACK_EXTRA_LIBS = ../../plugins/plugins-mini-headless.a -else ifeq ($(NOPLUGINS),true) -RACK_EXTRA_LIBS = ../../plugins/noplugins$(TARGET_SUFFIX).a else RACK_EXTRA_LIBS = ../../plugins/plugins$(TARGET_SUFFIX).a endif @@ -140,7 +138,6 @@ endif # -------------------------------------------------------------- # surgext libraries -ifneq ($(NOPLUGINS),true) SURGE_DEP_PATH = $(abspath ../../deps/surge-build) RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libsurge-common.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/src/common/libjuce_dsp_rack_sub.a @@ -158,16 +155,13 @@ RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/filesystem/li endif RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a -endif # -------------------------------------------------------------- # Extra libraries to link against ifneq ($(CARDINAL_VARIANT),mini) -ifneq ($(NOPLUGINS),true) RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libquickjs.a endif -endif ifneq ($(SYSDEPS),true) RACK_EXTRA_LIBS += $(DEP_LIB_PATH)/libjansson.a @@ -201,13 +195,11 @@ EXTRA_DSP_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) endif endif -ifneq ($(NOPLUGINS),true) ifeq ($(MACOS),true) EXTRA_DSP_LIBS += -framework Accelerate -framework AppKit else ifeq ($(WINDOWS),true) EXTRA_DSP_LIBS += -lole32 -lshlwapi -luuid -lversion endif -endif # -------------------------------------------------------------- # Setup resources @@ -413,7 +405,6 @@ endif # find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort SYMLINKED_DIRS_RESOURCES = Fundamental/presets ifneq ($(CARDINAL_VARIANT),mini) -ifneq ($(NOPLUGINS),true) SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/chopin SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/debussy SYMLINKED_DIRS_RESOURCES += BaconPlugs/res/midi/goldberg @@ -436,7 +427,6 @@ SYMLINKED_DIRS_RESOURCES += surgext/build/surge-data/wavetables SYMLINKED_DIRS_RESOURCES += surgext/patches SYMLINKED_DIRS_RESOURCES += surgext/presets endif -endif LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) else ifeq ($(HAIKU),true) From ca5bfd6270cd4ad42fa5e22bebb7d152f9c67f7d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 20:34:20 +0100 Subject: [PATCH 269/451] Tweak mini variant build to allow standalone Signed-off-by: falkTX --- .github/workflows/build.yml | 80 +------------------ src/CardinalMini/CardinalCommon.cpp | 20 +---- src/CardinalMini/DistrhoPluginInfo.h | 6 +- src/CardinalMini/Makefile | 1 - .../CardinalCommon-UI.cpp | 0 src/CardinalMiniSep/CardinalCommon.cpp | 19 +++++ src/CardinalMiniSep/CardinalPlugin.cpp | 1 + src/CardinalMiniSep/CardinalRemote.cpp | 1 + src/CardinalMiniSep/CardinalUI.cpp | 1 + src/CardinalMiniSep/DistrhoPluginInfo.h | 56 +++++++++++++ src/CardinalMiniSep/Makefile | 11 +++ src/CardinalMiniSep/MenuBar.cpp | 1 + src/CardinalMiniSep/RemoteNanoVG.cpp | 1 + src/CardinalMiniSep/RemoteWindow.cpp | 1 + src/CardinalMiniSep/Window.cpp | 1 + src/CardinalMiniSep/common.cpp | 1 + src/CardinalMiniSep/glfw.cpp | 1 + src/CardinalPlugin.cpp | 60 +++++++------- src/CardinalRemote.cpp | 12 +-- src/CardinalUI.cpp | 14 ++-- src/Makefile | 6 +- src/Makefile.cardinal.mk | 29 +++---- src/PluginContext.hpp | 2 + src/override/MenuBar.cpp | 10 +-- src/override/Scene.cpp | 4 +- 25 files changed, 171 insertions(+), 168 deletions(-) mode change 100644 => 120000 src/CardinalMini/CardinalCommon.cpp rename src/{CardinalMini => CardinalMiniSep}/CardinalCommon-UI.cpp (100%) create mode 100644 src/CardinalMiniSep/CardinalCommon.cpp create mode 120000 src/CardinalMiniSep/CardinalPlugin.cpp create mode 120000 src/CardinalMiniSep/CardinalRemote.cpp create mode 120000 src/CardinalMiniSep/CardinalUI.cpp create mode 100644 src/CardinalMiniSep/DistrhoPluginInfo.h create mode 100644 src/CardinalMiniSep/Makefile create mode 120000 src/CardinalMiniSep/MenuBar.cpp create mode 120000 src/CardinalMiniSep/RemoteNanoVG.cpp create mode 120000 src/CardinalMiniSep/RemoteWindow.cpp create mode 120000 src/CardinalMiniSep/Window.cpp create mode 120000 src/CardinalMiniSep/common.cpp create mode 120000 src/CardinalMiniSep/glfw.cpp diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e75a862e..ce85c4fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -814,7 +814,11 @@ jobs: run: | VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') cd bin + sed -i "s/CardinalMini\./CardinalMini-v${VERSION}\./g" *.html *.js sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js + mv CardinalMini.data CardinalMini-v${VERSION}.data + mv CardinalMini.js CardinalMini-v${VERSION}.js + mv CardinalMini.wasm CardinalMini-v${VERSION}.wasm mv CardinalNative.data CardinalNative-v${VERSION}.data mv CardinalNative.js CardinalNative-v${VERSION}.js mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm @@ -844,82 +848,6 @@ jobs: files: | *.zip - wasm-mini: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/emsdk - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: wasm-mini-v${{ env.CACHE_VERSION }} - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -yqq brotli - sudo apt-get clean - [ -e ~/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/emsdk - cd ~/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} - - name: Build wasm-mini cross-compiled - env: - AR: emar - CC: emcc - CXX: em++ - NM: emnm - RANLIB: emranlib - STRIP: emstrip - WITH_LTO: false - run: | - source ~/emsdk/emsdk_env.sh - make features - make CIBUILD=true NOPLUGINS=true NOOPT=true NOSIMD=true STATIC_BUILD=true USE_GLES2=true -j $(nproc) - - name: Make wasm versioned and compress - run: | - VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') - cd bin - rm -r *.lv2 - sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js - mv CardinalNative.data CardinalNative-v${VERSION}.data - mv CardinalNative.js CardinalNative-v${VERSION}.js - mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm - brotli -k -q 11 *.data *.html *.js *.wasm - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.zip - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.zip - win32: runs-on: ubuntu-22.04 steps: diff --git a/src/CardinalMini/CardinalCommon.cpp b/src/CardinalMini/CardinalCommon.cpp deleted file mode 100644 index 24dffcde..00000000 --- a/src/CardinalMini/CardinalCommon.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho - * - * 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. - */ - -#define CARDINAL_COMMON_DSP_ONLY -#include "../CardinalCommon.cpp" diff --git a/src/CardinalMini/CardinalCommon.cpp b/src/CardinalMini/CardinalCommon.cpp new file mode 120000 index 00000000..76b4b5f3 --- /dev/null +++ b/src/CardinalMini/CardinalCommon.cpp @@ -0,0 +1 @@ +../CardinalCommon.cpp \ No newline at end of file diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index f72f8724..c98736aa 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -35,7 +35,7 @@ #define DISTRHO_PLUGIN_LABEL "CardinalMini" #define DISTRHO_PLUGIN_HAS_UI 1 -#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1 #define DISTRHO_UI_FILE_BROWSER 1 #define DISTRHO_UI_USE_NANOVG 1 #define DISTRHO_UI_USER_RESIZABLE 1 @@ -52,8 +52,4 @@ #define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" -// #ifdef __MOD_DEVICES__ -# define DISTRHO_PLUGIN_USES_MODGUI 1 -// #endif - #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalMini/Makefile b/src/CardinalMini/Makefile index a616d22f..24e50436 100644 --- a/src/CardinalMini/Makefile +++ b/src/CardinalMini/Makefile @@ -5,5 +5,4 @@ # NAME = CardinalMini -MODGUI_CLASS_NAME = distrho_cardinal_mini include ../Makefile.cardinal.mk diff --git a/src/CardinalMini/CardinalCommon-UI.cpp b/src/CardinalMiniSep/CardinalCommon-UI.cpp similarity index 100% rename from src/CardinalMini/CardinalCommon-UI.cpp rename to src/CardinalMiniSep/CardinalCommon-UI.cpp diff --git a/src/CardinalMiniSep/CardinalCommon.cpp b/src/CardinalMiniSep/CardinalCommon.cpp new file mode 100644 index 00000000..24dffcde --- /dev/null +++ b/src/CardinalMiniSep/CardinalCommon.cpp @@ -0,0 +1,19 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#define CARDINAL_COMMON_DSP_ONLY +#include "../CardinalCommon.cpp" diff --git a/src/CardinalMiniSep/CardinalPlugin.cpp b/src/CardinalMiniSep/CardinalPlugin.cpp new file mode 120000 index 00000000..c0c7e71e --- /dev/null +++ b/src/CardinalMiniSep/CardinalPlugin.cpp @@ -0,0 +1 @@ +../CardinalPlugin.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/CardinalRemote.cpp b/src/CardinalMiniSep/CardinalRemote.cpp new file mode 120000 index 00000000..23838232 --- /dev/null +++ b/src/CardinalMiniSep/CardinalRemote.cpp @@ -0,0 +1 @@ +../CardinalRemote.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/CardinalUI.cpp b/src/CardinalMiniSep/CardinalUI.cpp new file mode 120000 index 00000000..5558256b --- /dev/null +++ b/src/CardinalMiniSep/CardinalUI.cpp @@ -0,0 +1 @@ +../CardinalUI.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/DistrhoPluginInfo.h b/src/CardinalMiniSep/DistrhoPluginInfo.h new file mode 100644 index 00000000..5023a181 --- /dev/null +++ b/src/CardinalMiniSep/DistrhoPluginInfo.h @@ -0,0 +1,56 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * 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. + */ + +#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED +#define DISTRHO_PLUGIN_INFO_H_INCLUDED + +#define CARDINAL_VARIANT_MAIN 0 +#define CARDINAL_VARIANT_MINI 1 +#define CARDINAL_VARIANT_FX 0 +#define CARDINAL_VARIANT_NATIVE 0 +#define CARDINAL_VARIANT_SYNTH 0 + +#define CARDINAL_NUM_AUDIO_INPUTS 2 +#define CARDINAL_NUM_AUDIO_OUTPUTS 2 + +#define DISTRHO_PLUGIN_BRAND "DISTRHO" +#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#mini" + +#define DISTRHO_PLUGIN_NAME "Cardinal Mini" +#define DISTRHO_PLUGIN_LABEL "CardinalMini" + +#define DISTRHO_PLUGIN_HAS_UI 1 +#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 +#define DISTRHO_UI_FILE_BROWSER 1 +#define DISTRHO_UI_USE_NANOVG 1 +#define DISTRHO_UI_USER_RESIZABLE 1 +#define DISTRHO_UI_DEFAULT_WIDTH 1000 +#define DISTRHO_UI_DEFAULT_HEIGHT 600 +#define DISTRHO_PLUGIN_IS_SYNTH 0 +#define DISTRHO_PLUGIN_NUM_INPUTS CARDINAL_NUM_AUDIO_INPUTS + 5 +#define DISTRHO_PLUGIN_NUM_OUTPUTS CARDINAL_NUM_AUDIO_OUTPUTS + 5 +#define DISTRHO_PLUGIN_WANT_MIDI_INPUT 1 +#define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 1 +#define DISTRHO_PLUGIN_WANT_FULL_STATE 1 +#define DISTRHO_PLUGIN_WANT_STATE 1 +#define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +#define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" + +#define DISTRHO_PLUGIN_USES_MODGUI 1 +#define DISTRHO_PLUGIN_USES_CUSTOM_MODGUI 1 + +#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalMiniSep/Makefile b/src/CardinalMiniSep/Makefile new file mode 100644 index 00000000..1a97ebd7 --- /dev/null +++ b/src/CardinalMiniSep/Makefile @@ -0,0 +1,11 @@ +#!/usr/bin/make -f +# Makefile for DISTRHO Plugins # +# ---------------------------- # +# Created by falkTX +# + +NAME = CardinalMini +DPF_BUILD_DIR = ../../build/$(NAME)-sep +DSP_UI_SPLIT = true +MODGUI_CLASS_NAME = distrho_cardinal_mini +include ../Makefile.cardinal.mk diff --git a/src/CardinalMiniSep/MenuBar.cpp b/src/CardinalMiniSep/MenuBar.cpp new file mode 120000 index 00000000..8d1a35a5 --- /dev/null +++ b/src/CardinalMiniSep/MenuBar.cpp @@ -0,0 +1 @@ +../override/MenuBar.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/RemoteNanoVG.cpp b/src/CardinalMiniSep/RemoteNanoVG.cpp new file mode 120000 index 00000000..a6394af3 --- /dev/null +++ b/src/CardinalMiniSep/RemoteNanoVG.cpp @@ -0,0 +1 @@ +../custom/RemoteNanoVG.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/RemoteWindow.cpp b/src/CardinalMiniSep/RemoteWindow.cpp new file mode 120000 index 00000000..7e00fed5 --- /dev/null +++ b/src/CardinalMiniSep/RemoteWindow.cpp @@ -0,0 +1 @@ +../custom/RemoteWindow.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/Window.cpp b/src/CardinalMiniSep/Window.cpp new file mode 120000 index 00000000..759f2728 --- /dev/null +++ b/src/CardinalMiniSep/Window.cpp @@ -0,0 +1 @@ +../override/Window.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/common.cpp b/src/CardinalMiniSep/common.cpp new file mode 120000 index 00000000..915948e3 --- /dev/null +++ b/src/CardinalMiniSep/common.cpp @@ -0,0 +1 @@ +../override/common.cpp \ No newline at end of file diff --git a/src/CardinalMiniSep/glfw.cpp b/src/CardinalMiniSep/glfw.cpp new file mode 120000 index 00000000..8c6a6e44 --- /dev/null +++ b/src/CardinalMiniSep/glfw.cpp @@ -0,0 +1 @@ +../custom/glfw.cpp \ No newline at end of file diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index f0bfb9be..3a32d444 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -61,7 +61,7 @@ extern const std::string CARDINAL_VERSION; namespace rack { -#if CARDINAL_VARIANT_MINI || defined(HEADLESS) +#if (CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS) || defined(HEADLESS) namespace app { rack::widget::Widget* createMenuBar() { return new rack::widget::Widget; } } @@ -179,7 +179,7 @@ class CardinalPlugin : public CardinalBasePlugin // real values, not VCV interpreted ones float fWindowParameters[kWindowParameterCount]; #endif - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS float fMiniReportValues[kCardinalParameterCountAtMini - kCardinalParameterStartMini]; #endif @@ -213,7 +213,7 @@ class CardinalPlugin : public CardinalBasePlugin fWindowParameters[kWindowParameterInvertZoom] = 0.0f; fWindowParameters[kWindowParameterSqueezeModulePositions] = 1.0f; #endif - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS std::memset(fMiniReportValues, 0, sizeof(fMiniReportValues)); fMiniReportValues[kCardinalParameterMiniTimeBar - kCardinalParameterStartMini] = 1; fMiniReportValues[kCardinalParameterMiniTimeBeat - kCardinalParameterStartMini] = 1; @@ -460,7 +460,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Show tooltips"; parameter.symbol = "tooltips"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 1.0f; @@ -472,7 +472,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "cableOpacity"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 50.0f; @@ -484,7 +484,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "cableTension"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 75.0f; @@ -496,7 +496,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "rackBrightness"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 100.0f; @@ -508,7 +508,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.symbol = "haloBrightness"; parameter.unit = "%"; parameter.hints = kParameterIsAutomatable; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 25.0f; @@ -519,7 +519,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Knob mode"; parameter.symbol = "knobMode"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 0.0f; @@ -539,7 +539,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Scroll wheel knob control"; parameter.symbol = "knobScroll"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 0.0f; @@ -550,7 +550,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Scroll wheel knob sensitivity"; parameter.symbol = "knobScrollSensitivity"; parameter.hints = kParameterIsAutomatable|kParameterIsLogarithmic; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 1.0f; @@ -561,7 +561,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Lock module positions"; parameter.symbol = "lockModules"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 0.0f; @@ -572,7 +572,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Update rate limit"; parameter.symbol = "rateLimit"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 0.0f; @@ -592,7 +592,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Browser sort"; parameter.symbol = "browserSort"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 3.0f; @@ -618,7 +618,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Browser zoom"; parameter.symbol = "browserZoom"; parameter.hints = kParameterIsAutomatable; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.unit = "%"; @@ -647,7 +647,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Invert zoom"; parameter.symbol = "invertZoom"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 0.0f; @@ -658,7 +658,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.name = "Auto-squeeze module positions"; parameter.symbol = "squeezeModules"; parameter.hints = kParameterIsAutomatable|kParameterIsInteger|kParameterIsBoolean; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif parameter.ranges.def = 1.0f; @@ -669,7 +669,7 @@ class CardinalPlugin : public CardinalBasePlugin } #endif - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS switch (index) { case kCardinalParameterMiniAudioIn1: @@ -817,7 +817,7 @@ class CardinalPlugin : public CardinalBasePlugin switch (index) { case kCardinalStatePatch: - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS state.hints = kStateIsHostReadable; #else state.hints = kStateIsOnlyForDSP | kStateIsBase64Blob; @@ -833,7 +833,7 @@ class CardinalPlugin : public CardinalBasePlugin if (std::fread(fileContent, fileSize, 1, f) == 1) { fileContent[fileSize] = '\0'; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS state.defaultValue = fileContent; #else state.defaultValue = String::asBase64(fileContent, fileSize); @@ -859,7 +859,7 @@ class CardinalPlugin : public CardinalBasePlugin break; #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) case kCardinalStateModuleInfos: - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS state.hints = kStateIsHostReadable; #else state.hints = kStateIsOnlyForDSP; @@ -875,7 +875,7 @@ class CardinalPlugin : public CardinalBasePlugin state.label = "Window size"; break; #endif - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS case kCardinalStateParamChange: state.hints = kStateIsHostReadable | kStateIsOnlyForDSP; state.key = "param"; @@ -903,7 +903,7 @@ class CardinalPlugin : public CardinalBasePlugin return fWindowParameters[index - kCardinalParameterStartWindow]; #endif - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS if (index < kCardinalParameterCountAtMini) return fMiniReportValues[index - kCardinalParameterStartMini]; #endif @@ -1006,7 +1006,7 @@ class CardinalPlugin : public CardinalBasePlugin context->patch->cleanAutosave(); // context->history->setSaved(); - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS FILE* const f = std::fopen(rack::system::join(context->patch->autosavePath, "patch.json").c_str(), "r"); DISTRHO_SAFE_ASSERT_RETURN(f != nullptr, String()); @@ -1037,7 +1037,7 @@ class CardinalPlugin : public CardinalBasePlugin void setState(const char* const key, const char* const value) override { - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS if (std::strcmp(key, "param") == 0) { long long moduleId = 0; @@ -1115,7 +1115,7 @@ class CardinalPlugin : public CardinalBasePlugin if (fAutosavePath.empty()) return; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS rack::system::removeRecursively(fAutosavePath); rack::system::createDirectories(fAutosavePath); @@ -1228,7 +1228,7 @@ class CardinalPlugin : public CardinalBasePlugin context->ticksPerClock = timePos.bbt.ticksPerBeat / timePos.bbt.beatType; context->ticksPerFrame = 1.0 / samplesPerTick; context->tickClock = std::fmod(timePos.bbt.tick, context->ticksPerClock); - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS fMiniReportValues[kCardinalParameterMiniTimeBar - kCardinalParameterStartMini] = timePos.bbt.bar; fMiniReportValues[kCardinalParameterMiniTimeBeat - kCardinalParameterStartMini] = timePos.bbt.beat; fMiniReportValues[kCardinalParameterMiniTimeBeatsPerBar - kCardinalParameterStartMini] = timePos.bbt.beatsPerBar; @@ -1243,7 +1243,7 @@ class CardinalPlugin : public CardinalBasePlugin context->reset = reset; fNextExpectedFrame = timePos.playing ? timePos.frame + frames : 0; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS const int flags = (timePos.playing ? 0x1 : 0x0) | (timePos.bbt.valid ? 0x2 : 0x0) | (reset ? 0x4 : 0x0); @@ -1286,10 +1286,10 @@ class CardinalPlugin : public CardinalBasePlugin std::memset(outputs[i], 0, sizeof(float)*frames); } - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS for (int i=0; idataIns[i][0]; - #endif + #endif if (bypassed) { diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index 9f5e48be..d27f16b2 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -28,11 +28,11 @@ #include "extra/Base64.hpp" #include "extra/ScopedSafeLocale.hpp" -#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI +#if defined(STATIC_BUILD) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS # undef HAVE_LIBLO #endif -#if (CARDINAL_VARIANT_MINI || defined(HAVE_LIBLO)) && !defined(HEADLESS) +#if (defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS) && !defined(HEADLESS) # define CARDINAL_REMOTE_ENABLED #endif @@ -88,7 +88,7 @@ bool connectToRemote() RemoteDetails* remoteDetails = ui->remoteDetails; - #if CARDINAL_VARIANT_MINI + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS if (remoteDetails == nullptr) { ui->remoteDetails = remoteDetails = new RemoteDetails; @@ -148,7 +148,7 @@ void idleRemote(RemoteDetails* const remote) void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int paramId, float value) { #ifdef CARDINAL_REMOTE_ENABLED -#if CARDINAL_VARIANT_MINI +#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS char paramBuf[512] = {}; { const ScopedSafeLocale cssl; @@ -179,7 +179,7 @@ void sendFullPatchToRemote(RemoteDetails* const remote) std::vector data; using namespace rack::system; - #if CARDINAL_VARIANT_MINI + #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS FILE* const f = std::fopen(join(context->patch->autosavePath, "patch.json").c_str(), "r"); DISTRHO_SAFE_ASSERT_RETURN(f != nullptr,); @@ -221,7 +221,7 @@ void sendFullPatchToRemote(RemoteDetails* const remote) void sendScreenshotToRemote(RemoteDetails*, const char* const screenshot) { -#if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI +#if defined(HAVE_LIBLO) && DISTRHO_PLUGIN_WANT_DIRECT_ACCESS const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 87957eed..9e584ecd 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -346,7 +346,7 @@ class CardinalUI : public CardinalBaseUI, { rack::contextSet(context); - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS // create unique temporary path for this instance try { char uidBuf[24]; @@ -490,7 +490,7 @@ class CardinalUI : public CardinalBaseUI, context->tlw = nullptr; context->ui = nullptr; - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS { const ScopedContext sc(this); context->patch->clear(); @@ -620,7 +620,7 @@ class CardinalUI : public CardinalBaseUI, filebrowserhandle = nullptr; } - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS { const ScopedContext sc(this); for (uint32_t i=0; iparameters[index] = value; #endif return; @@ -735,7 +735,7 @@ class CardinalUI : public CardinalBaseUI, // bypass if (index == kCardinalParameterBypass) { - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS context->bypassed = value > 0.5f; #endif return; @@ -829,7 +829,7 @@ class CardinalUI : public CardinalBaseUI, return; } - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS if (index < kCardinalParameterCountAtMiniBuffers) { float* const buffer = *const_cast(&context->dataIns[index - kCardinalParameterStartMiniBuffers]); @@ -886,7 +886,7 @@ class CardinalUI : public CardinalBaseUI, void stateChanged(const char* const key, const char* const value) override { - #if CARDINAL_VARIANT_MINI + #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS if (std::strcmp(key, "patch") == 0) { if (fAutosavePath.empty()) diff --git a/src/Makefile b/src/Makefile index d888d600..ff4ba7be 100644 --- a/src/Makefile +++ b/src/Makefile @@ -244,12 +244,14 @@ all: $(TARGETS) ifeq ($(MOD_BUILD),true) $(MAKE) -C Cardinal lv2 $(MAKE) -C CardinalFX lv2 - $(MAKE) -C CardinalMini lv2_sep + $(MAKE) -C CardinalMiniSep lv2_sep else ifeq ($(WASM),true) $(MAKE) -C CardinalNative + $(MAKE) -C CardinalMini else $(MAKE) -C Cardinal $(MAKE) -C CardinalMini + $(MAKE) -C CardinalMiniSep $(MAKE) -C CardinalNative $(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) -C CardinalSynth $(CARDINAL_SYNTH_ARGS) @@ -265,7 +267,7 @@ lv2: $(TARGETS) $(MAKE) lv2 -C Cardinal $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) $(MAKE) lv2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS) - $(MAKE) lv2_sep -C CardinalMini + $(MAKE) lv2_sep -C CardinalMiniSep vst2: $(TARGETS) $(MAKE) vst2 -C CardinalFX $(CARDINAL_FX_ARGS) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index ed782d9c..c025dfeb 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -67,7 +67,7 @@ WASM_EXCEPTIONS = true ifeq ($(CARDINAL_VARIANT),main) # main variant should not use rtaudio/sdl2 fallback (it has CV ports) SKIP_NATIVE_AUDIO_FALLBACK = true -else +else ifneq ($(CARDINAL_VARIANT),mini) # other variants should only use rtaudio/sdl2 fallbacks FORCE_NATIVE_AUDIO_FALLBACK = true endif @@ -99,7 +99,7 @@ FILES_DSP += CardinalCommon.cpp FILES_DSP += CardinalRemote.cpp FILES_DSP += common.cpp -ifeq ($(CARDINAL_VARIANT),mini) +ifeq ($(DSP_UI_SPLIT),true) FILES_DSP += RemoteNanoVG.cpp FILES_DSP += RemoteWindow.cpp else ifeq ($(HEADLESS),true) @@ -119,18 +119,20 @@ endif # -------------------------------------------------------------- # Rack and plugin libs -ifeq ($(HEADLESS),true) +ifeq ($(DSP_UI_SPLIT),true) +TARGET_SUFFIX = -headless +else ifeq ($(HEADLESS),true) TARGET_SUFFIX = -headless endif ifeq ($(CARDINAL_VARIANT),mini) -RACK_EXTRA_LIBS = ../../plugins/plugins-mini-headless.a +RACK_EXTRA_LIBS = ../../plugins/plugins-mini$(TARGET_SUFFIX).a else RACK_EXTRA_LIBS = ../../plugins/plugins$(TARGET_SUFFIX).a endif ifeq ($(CARDINAL_VARIANT),mini) -RACK_EXTRA_LIBS += ../rack-headless.a +RACK_EXTRA_LIBS += ../rack$(TARGET_SUFFIX).a else RACK_EXTRA_LIBS += ../rack$(TARGET_SUFFIX).a endif @@ -255,7 +257,7 @@ endif # -------------------------------------------------------------- # mini variant UI -ifeq ($(CARDINAL_VARIANT),mini) +ifeq ($(DSP_UI_SPLIT),true) ifneq ($(HEADLESS),true) FILES_UI = CardinalUI.cpp FILES_UI += CardinalCommon-UI.cpp @@ -324,13 +326,10 @@ endif ifeq ($(MOD_BUILD),true) BASE_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 -ifeq ($(CARDINAL_VARIANT),mini) -BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=0 -else -BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=1 -endif BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp LINK_FLAGS += -fopenmp +else ifeq ($(CARDINAL_VARIANT),mini) +BUILD_CXX_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff endif ifneq ($(WASM),true) @@ -362,10 +361,6 @@ BUILD_CXX_FLAGS += -std=gnu++17 endif endif -ifeq ($(CARDINAL_VARIANT),mini) -BUILD_CXX_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff -endif - # Rack code is not tested for this flag, unset it BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS @@ -504,8 +499,10 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"' ifeq ($(CARDINAL_VARIANT),main) TARGETS = jack lv2 vst3 clap -else ifeq ($(CARDINAL_VARIANT),mini) +else ifeq ($(DSP_UI_SPLIT),true) TARGETS = lv2_sep +else ifeq ($(CARDINAL_VARIANT),mini) +TARGETS = jack else ifeq ($(CARDINAL_VARIANT),native) TARGETS = jack else diff --git a/src/PluginContext.hpp b/src/PluginContext.hpp index 6a4db834..86d3f538 100644 --- a/src/PluginContext.hpp +++ b/src/PluginContext.hpp @@ -205,7 +205,9 @@ struct CardinalPluginContext : rack::Context { // ----------------------------------------------------------------------------------------------------------- +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS CardinalPluginContext* getRackContextFromPlugin(void* ptr); +#endif class CardinalBasePlugin : public Plugin { public: diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index e73e0d07..7304d62e 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -135,7 +135,7 @@ struct FileButton : MenuButton { patchUtils::loadTemplateDialog(); })); -#if ! CARDINAL_VARIANT_MINI +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifndef DISTRHO_OS_WASM menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { patchUtils::loadDialog(); @@ -172,7 +172,7 @@ struct FileButton : MenuButton { patchUtils::revertDialog(); }, APP->patch->path.empty())); -#if defined(HAVE_LIBLO) || CARDINAL_VARIANT_MINI +#if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifdef __MOD_DEVICES__ #define REMOTE_NAME "MOD" #else @@ -201,7 +201,7 @@ struct FileButton : MenuButton { } #endif -#if ! CARDINAL_VARIANT_MINI +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); @@ -768,7 +768,7 @@ struct MeterLabel : ui::Label { // uiLastTime = time; // } -#if CARDINAL_VARIANT_MINI +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS text = string::f("%.1f fps", 1.0 / frameDurationAvg); #else double meterAverage = APP->engine->getMeterAverage(); @@ -807,7 +807,7 @@ struct MenuBar : widget::OpaqueWidget { viewButton->text = "View"; layout->addChild(viewButton); -#if ! CARDINAL_VARIANT_MINI +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS EngineButton* engineButton = new EngineButton; engineButton->text = "Engine"; layout->addChild(engineButton); diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index a6802a9c..58dd32e1 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -330,8 +330,10 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { } if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) { if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + { remoteUtils::sendFullPatchToRemote(remoteDetails); - window::generateScreenshot(); + window::generateScreenshot(); + } e.consume(this); } if (e.key == GLFW_KEY_F9 && (e.mods & RACK_MOD_MASK) == 0) { From df5b687265277df7b9a72a1b226ccc324da502e4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Feb 2023 21:30:46 +0100 Subject: [PATCH 270/451] Fix mod build Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- src/Cardinal/DistrhoPluginInfo.h | 1 + src/CardinalFX/DistrhoPluginInfo.h | 1 + src/CardinalMiniSep/DistrhoPluginInfo.h | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce85c4fb..05028c8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -808,7 +808,7 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMini modgui + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index 6a91328b..cacce3e1 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -53,6 +53,7 @@ #define DISTRHO_PLUGIN_WANT_FULL_STATE 1 #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +#define DISTRHO_PLUGIN_USES_CUSTOM_MODGUI 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index 48d6c840..906bbc6b 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -54,6 +54,7 @@ #define DISTRHO_PLUGIN_WANT_FULL_STATE 1 #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +#define DISTRHO_PLUGIN_USES_CUSTOM_MODGUI 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" diff --git a/src/CardinalMiniSep/DistrhoPluginInfo.h b/src/CardinalMiniSep/DistrhoPluginInfo.h index 5023a181..3593730e 100644 --- a/src/CardinalMiniSep/DistrhoPluginInfo.h +++ b/src/CardinalMiniSep/DistrhoPluginInfo.h @@ -48,9 +48,9 @@ #define DISTRHO_PLUGIN_WANT_FULL_STATE 1 #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +#define DISTRHO_PLUGIN_USES_CUSTOM_MODGUI 0 #define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" #define DISTRHO_PLUGIN_USES_MODGUI 1 -#define DISTRHO_PLUGIN_USES_CUSTOM_MODGUI 1 #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED From b9279fc2b3946760f5cf03ba2af4b08c44d8865c Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 20 Feb 2023 00:07:29 +0100 Subject: [PATCH 271/451] Cleanup Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- src/custom/RemoteNanoVG.cpp | 22 +--------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05028c8c..b03767ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1121,7 +1121,7 @@ jobs: WITH_LTO: false run: | make features - make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources dpf/utils/lv2_ttl_generator -j $(nproc) + make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc) # single job for final build stage, otherwise we might get killed due to OOM - name: Build Cardinal (final build stage) env: @@ -1131,7 +1131,7 @@ jobs: WITH_LTO: false run: | make features - make NOOPT=true SKIP_STRIPPING=true -C src jack lv2 vst2 vst3 clap -j 1 + make NOOPT=true SKIP_STRIPPING=true -j 1 ./dpf/utils/generate-ttl.sh - name: Run Cardinal self-tests run: | diff --git a/src/custom/RemoteNanoVG.cpp b/src/custom/RemoteNanoVG.cpp index d96e6c7b..59aab3dc 100644 --- a/src/custom/RemoteNanoVG.cpp +++ b/src/custom/RemoteNanoVG.cpp @@ -20,31 +20,16 @@ #ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS # error wrong build 1 #endif -#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS && !defined(HEADLESS) # error wrong build 2 #endif -// #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -// # define HEADLESS -// #endif -// -// #ifndef HEADLESS -// # include "OpenGL.hpp" -// #endif - #include "nanovg.h" -// #ifdef HEADLESS struct NVGLUframebuffer; void nvgluBindFramebuffer(NVGLUframebuffer* fb) {} NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int w, int h, int imageFlags) { return nullptr; } void nvgluDeleteFramebuffer(NVGLUframebuffer* fb) {} -// #else -// # define NANOVG_GLES2_IMPLEMENTATION -// # define NANOVG_FBO_VALID 1 -// # include "nanovg_gl.h" -// # include "nanovg_gl_utils.h" -// #endif #if defined(__GNUC__) && (__GNUC__ >= 6) # pragma GCC diagnostic push @@ -74,8 +59,3 @@ GLFWAPI int glfwGetKeyScancode(int) { return 0; } GLFWAPI double glfwGetTime(void) { return 0.0; } } - -// #ifndef HEADLESS -// # define STB_IMAGE_WRITE_IMPLEMENTATION -// # include "../src/Rack/dep/glfw/deps/stb_image_write.h" -// #endif From b4b7f78fde47c74e329b1ed9fd3b6f33aa94fc0c Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 20 Feb 2023 11:02:31 +0100 Subject: [PATCH 272/451] Use custom wasm shell for mini variant too Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 14 +- src/emscripten/CardinalMini.html | 201 ++++++++++++++++++ .../{shell.html => CardinalNative.html} | 0 src/emscripten/htaccess | 17 +- 4 files changed, 217 insertions(+), 15 deletions(-) create mode 100644 src/emscripten/CardinalMini.html rename src/emscripten/{shell.html => CardinalNative.html} (100%) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index c025dfeb..8d2f687c 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -247,7 +247,7 @@ endif ifeq ($(WASM),true) WASM_RESOURCES = $(LV2_RESOURCES) -ifneq ($(STATIC_BUILD),true) +ifneq ($(CARDINAL_VARIANT),mini) WASM_RESOURCES += $(CURDIR)/lv2/fomp.lv2/manifest.ttl endif @@ -384,17 +384,15 @@ LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 ifeq ($(CARDINAL_VARIANT),mini) +LINK_FLAGS += --shell-file=../emscripten/CardinalMini.html LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources -# LINK_FLAGS += -sEXPORTED_RUNTIME_METHODS=FS,cwrap else -LINK_FLAGS += --shell-file=../emscripten/shell.html -ifneq ($(STATIC_BUILD),true) -LINK_FLAGS += --use-preload-cache -LINK_FLAGS += --use-preload-plugins +LINK_FLAGS += --shell-file=../emscripten/CardinalNative.html +LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources LINK_FLAGS += --preload-file=./jsfx LINK_FLAGS += --preload-file=./lv2 -endif -LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources +LINK_FLAGS += --use-preload-cache +LINK_FLAGS += --use-preload-plugins endif # find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort diff --git a/src/emscripten/CardinalMini.html b/src/emscripten/CardinalMini.html new file mode 100644 index 00000000..2de614a2 --- /dev/null +++ b/src/emscripten/CardinalMini.html @@ -0,0 +1,201 @@ + + + + + + + + + Cardinal Mini + + + +
+
+
Cardinal Mini
+
+
+
Downloading...
+
+ +
+
+ + +
+ + + {{{ SCRIPT }}} + + diff --git a/src/emscripten/shell.html b/src/emscripten/CardinalNative.html similarity index 100% rename from src/emscripten/shell.html rename to src/emscripten/CardinalNative.html diff --git a/src/emscripten/htaccess b/src/emscripten/htaccess index b47b6ab4..408eeffa 100644 --- a/src/emscripten/htaccess +++ b/src/emscripten/htaccess @@ -1,13 +1,16 @@ +AddType application/octet-stream .data +AddType application/wasm .wasm + RewriteEngine on -RewriteCond %{HTTP:Accept-Encoding} gzip +RewriteCond %{HTTP:Accept-Encoding} br RewriteCond %{REQUEST_URI} .*\.(data|js|wasm) #RewriteCond %{REQUEST_FILENAME}.gz -s -RewriteRule ^(.+) $1.gz -RewriteRule "\.data\.gz$" "-" [T=application/octet-stream,E=no-brotli,E=no-gzip] -RewriteRule "\.js\.gz$" "-" [T=application/javascript,E=no-brotli,E=no-gzip] -RewriteRule "\.wasm\.gz$" "-" [T=application/wasm,E=no-brotli,E=no-gzip] +RewriteRule ^(.+) $1.br +RewriteRule "\.data\.br$" "-" [T=application/octet-stream,E=no-brotli,E=no-gzip] +RewriteRule "\.js\.br$" "-" [T=application/javascript,E=no-brotli,E=no-gzip] +RewriteRule "\.wasm\.br$" "-" [T=application/wasm,E=no-brotli,E=no-gzip] - - Header set Content-Encoding gzip + + Header set Content-Encoding br Header append Vary Accept-Encoding From caa4797a7eb92cf66eec88db0c7d0311530e1ac6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 20 Feb 2023 11:05:08 +0100 Subject: [PATCH 273/451] Fix initial/welcome wasm mini patch Signed-off-by: falkTX --- src/CardinalCommon.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index cf2db536..a93b20c8 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -22,7 +22,7 @@ #include #ifdef DISTRHO_OS_WASM -# ifdef STATIC_BUILD +# if CARDINAL_VARIANT_MINI # define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm-mini.vcv" # else # define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm.vcv" From 047424fe3aa9e288a7ad52e964a71d921e715d73 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 20 Feb 2023 12:28:56 +0100 Subject: [PATCH 274/451] Add wasm-noopt CI build Signed-off-by: falkTX --- .github/workflows/build.yml | 88 ++++++++++++++++++++++++++++++++++++- deps/PawPaw | 2 +- 2 files changed, 87 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b03767ae..d58ebc8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -808,7 +808,6 @@ jobs: pushd deps/PawPaw; source local.env wasm; popd make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | @@ -832,7 +831,7 @@ jobs: - name: Pack binaries if: steps.cache.outputs.cache-hit == 'true' run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) CardinalMini.lv2/modgui + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }} @@ -848,6 +847,91 @@ jobs: files: | *.zip + wasm-noopt: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up cache + id: cache + uses: actions/cache@v3 + with: + path: | + ~/PawPawBuilds + src/Rack/dep/bin + src/Rack/dep/include + src/Rack/dep/lib + src/Rack/dep/share + src/Rack/dep/jansson-2.12 + src/Rack/dep/libarchive-3.4.3 + src/Rack/dep/libsamplerate-0.1.9 + src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + src/Rack/dep/zstd-1.4.5 + key: wasm-noopt-v${{ env.CACHE_VERSION }} + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -yqq brotli gperf + sudo apt-get clean + [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk + cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} + - name: Build extra dependencies + env: + PAWPAW_NOSIMD: 1 + run: | + source ~/PawPawBuilds/emsdk/emsdk_env.sh + ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm + - name: Build wasm-noopt cross-compiled + if: steps.cache.outputs.cache-hit == 'true' + env: + NOSIMD: true + WITH_LTO: false + run: | + source ~/PawPawBuilds/emsdk/emsdk_env.sh + pushd deps/PawPaw; source local.env wasm; popd + make features + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui + - name: Make wasm-noopt versioned and compress + if: steps.cache.outputs.cache-hit == 'true' + run: | + VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') + cd bin + sed -i "s/CardinalMini\./CardinalMini-noopt-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalNative\./CardinalNative-noopt-v${VERSION}\./g" *.html *.js + mv CardinalMini.data CardinalMini-noopt-v${VERSION}.data + mv CardinalMini.js CardinalMini-noopt-v${VERSION}.js + mv CardinalMini.wasm CardinalMini-noopt-v${VERSION}.wasm + mv CardinalNative.data CardinalNative-noopt-v${VERSION}.data + mv CardinalNative.js CardinalNative-noopt-v${VERSION}.js + mv CardinalNative.wasm CardinalNative-noopt-v${VERSION}.wasm + brotli -k -q 11 *.data *.html *.js *.wasm + - name: Set sha8 (non-release) + if: startsWith(github.ref, 'refs/tags/') != true + run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV + - name: Set sha8 (release) + if: startsWith(github.ref, 'refs/tags/') + run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV + - name: Pack binaries + if: steps.cache.outputs.cache-hit == 'true' + run: | + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm-noopt) CardinalMini.lv2/modgui + - uses: actions/upload-artifact@v3 + with: + name: ${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }} + path: | + *.zip + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: false + prerelease: false + files: | + *.zip + win32: runs-on: ubuntu-22.04 steps: diff --git a/deps/PawPaw b/deps/PawPaw index 63bf2d8e..1658398a 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 63bf2d8e954cc7838f5d9df9b14e4d460abca942 +Subproject commit 1658398aa4d2b9c02dfe5602c9dd3eca18260503 From bda79d525d96e9b82a7f712c48e5339bea8b19e8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 20 Feb 2023 23:46:22 +0100 Subject: [PATCH 275/451] Rebuild CI cache Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d58ebc8d..2944582b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: - '*' env: - CACHE_VERSION: 1 + CACHE_VERSION: 2 CARDINAL_UNDER_WINE: 1 EMSCRIPTEN_VERSION: 3.1.27 DEBIAN_FRONTEND: noninteractive From 1632dc88d3ef4df20d3ad0e61b0f71618b03b954 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 21 Feb 2023 10:34:24 +0100 Subject: [PATCH 276/451] CI: only skip stripping of standalone Signed-off-by: falkTX --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2944582b..f0376299 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1215,7 +1215,8 @@ jobs: WITH_LTO: false run: | make features - make NOOPT=true SKIP_STRIPPING=true -j 1 + make NOOPT=true SKIP_STRIPPING=true -j 1 -C src jack + make NOOPT=true -j 1 ./dpf/utils/generate-ttl.sh - name: Run Cardinal self-tests run: | From 1f2f14589ee1382d12e8cfd05d8cce864551d98c Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 24 Feb 2023 14:15:48 +0100 Subject: [PATCH 277/451] Fix wasm-noopt build Signed-off-by: falkTX --- .github/workflows/build.yml | 1 + carla | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0376299..928883e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -885,6 +885,7 @@ jobs: - name: Build wasm-noopt cross-compiled if: steps.cache.outputs.cache-hit == 'true' env: + PAWPAW_NOSIMD: 1 NOSIMD: true WITH_LTO: false run: | diff --git a/carla b/carla index 4c29367b..33a142f4 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 4c29367b6e6f82e75746b9ee3a01f9d205c0beae +Subproject commit 33a142f447925f55d00532933a1f28e9745c13eb From 76d0cd31aaae5d1cbed54a1ea8a5baa270209c29 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 24 Feb 2023 15:16:58 +0100 Subject: [PATCH 278/451] Assume wasm mini never needs simd, and main one does Signed-off-by: falkTX --- src/emscripten/CardinalMini.html | 6 ------ src/emscripten/CardinalNative.html | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/emscripten/CardinalMini.html b/src/emscripten/CardinalMini.html index 2de614a2..ee0ed28b 100644 --- a/src/emscripten/CardinalMini.html +++ b/src/emscripten/CardinalMini.html @@ -118,15 +118,9 @@ if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]))) { wasmErrors.push('Bulk Memory Operations unsupported'); } - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]))) { - wasmErrors.push('Exception handling unsupported'); - } if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { wasmErrors.push('Importable/Exportable mutable globals unsupported'); } - if (window.location.host !== "minicardinal.kx.studio" && !WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { - wasmErrors.push('Fixed-Width SIMD unsupported'); - } } if (wasmErrors.length !== 0) { diff --git a/src/emscripten/CardinalNative.html b/src/emscripten/CardinalNative.html index d941f50c..c82a928f 100644 --- a/src/emscripten/CardinalNative.html +++ b/src/emscripten/CardinalNative.html @@ -118,13 +118,10 @@ if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]))) { wasmErrors.push('Bulk Memory Operations unsupported'); } - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]))) { - wasmErrors.push('Exception handling unsupported'); - } if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { wasmErrors.push('Importable/Exportable mutable globals unsupported'); } - if (window.location.host !== "minicardinal.kx.studio" && !WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { + if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { wasmErrors.push('Fixed-Width SIMD unsupported'); } } From 61796c31797b2fdaf0ca6f26bc8dc1fdffff9a31 Mon Sep 17 00:00:00 2001 From: Stephane Alnet Date: Thu, 9 Feb 2023 22:06:16 +0100 Subject: [PATCH 279/451] Add support for setting host parameters in OSC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is meant to be used by e.g. small electronic widgets providing live values from potentiometers, switches, … --- src/CardinalCommon.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 64182cd2..f08a597d 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -310,6 +310,32 @@ static int osc_param_handler(const char*, const char* types, lo_arg** argv, int return 0; } +static int osc_host_param_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) +{ + d_debug("osc_host_param_handler()"); + DISTRHO_SAFE_ASSERT_RETURN(argc == 2, 0); + DISTRHO_SAFE_ASSERT_RETURN(types != nullptr, 0); + DISTRHO_SAFE_ASSERT_RETURN(types[0] == 'i', 0); + DISTRHO_SAFE_ASSERT_RETURN(types[1] == 'f', 0); + + if (CardinalBasePlugin* const plugin = static_cast(self)->remotePluginInstance) + { + CardinalPluginContext* const context = plugin->context; + + const int paramId = argv[0]->i; + DISTRHO_SAFE_ASSERT_RETURN(paramId >= 0, 0); + + const uint uparamId = static_cast(paramId); + DISTRHO_SAFE_ASSERT_UINT2_RETURN(uparamId < kModuleParameterCount, uparamId, kModuleParameterCount, 0); + + const float paramValue = argv[1]->f; + + context->parameters[uparamId] = paramValue; + } + + return 0; +} + static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, int argc, const lo_message m, void* const self) { d_debug("osc_screenshot_handler()"); @@ -483,6 +509,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB DISTRHO_SAFE_ASSERT_RETURN(oscServerThread != nullptr,); lo_server_thread_add_method(oscServerThread, "/hello", "", osc_hello_handler, this); + lo_server_thread_add_method(oscServerThread, "/host-param", "if", osc_host_param_handler, this); lo_server_thread_add_method(oscServerThread, "/load", "b", osc_load_handler, this); lo_server_thread_add_method(oscServerThread, "/param", "hif", osc_param_handler, this); lo_server_thread_add_method(oscServerThread, "/screenshot", "b", osc_screenshot_handler, this); From 78e2b8af59e85df9a56fbe93ae198b89657afe46 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 24 Feb 2023 19:58:17 +0100 Subject: [PATCH 280/451] Another wasm-noopt fix Signed-off-by: falkTX --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 928883e7..94a5b2dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -891,6 +891,8 @@ jobs: run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd + # FIXME send patch upstream, assuming this works.. + sed -i -e 's/defined(__riscv)/defined(__riscv) || defined(__EMSCRIPTEN__)/' plugins/surgext/surge/src/common/globals.h make features make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui From c568a695c875e1e17bf75a0083b1858dacdc5053 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 24 Feb 2023 22:54:31 +0100 Subject: [PATCH 281/451] Fixup initial wasm mini welcome patch, remove old PoC Signed-off-by: falkTX --- patches/mini/JTB_-_Proof-Of-Concept.vcv | 2299 ----------------------- patches/welcome-wasm-mini.vcv | 43 +- src/CardinalCommon.cpp | 8 + src/CardinalCommon.hpp | 8 - 4 files changed, 37 insertions(+), 2321 deletions(-) delete mode 100644 patches/mini/JTB_-_Proof-Of-Concept.vcv diff --git a/patches/mini/JTB_-_Proof-Of-Concept.vcv b/patches/mini/JTB_-_Proof-Of-Concept.vcv deleted file mode 100644 index 9cedef0f..00000000 --- a/patches/mini/JTB_-_Proof-Of-Concept.vcv +++ /dev/null @@ -1,2299 +0,0 @@ -{ - "version": "2.1.2", - "zoom": 0.8264508843421936, - "modules": [ - { - "id": 5726895899473528, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.59999996423721313, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.60722893476486206, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 3146744790938462, - "rightModuleId": 1394719894730985, - "pos": [ - 30, - 0 - ] - }, - { - "id": 4828178296911509, - "plugin": "Fundamental", - "model": "VCA-1", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - } - ], - "leftModuleId": 1133100648267642, - "rightModuleId": 8394463014211348, - "pos": [ - 64, - 0 - ] - }, - { - "id": 8601159184541723, - "plugin": "Fundamental", - "model": "VCO", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - } - ], - "leftModuleId": 8418253494908594, - "rightModuleId": 1647649757935413, - "pos": [ - 12, - -1 - ] - }, - { - "id": 758005564709860, - "plugin": "Fundamental", - "model": "Quantizer", - "version": "2.0", - "params": [ - { - "value": -0.22650615870952606, - "id": 0 - } - ], - "leftModuleId": 8873341177893106, - "rightModuleId": 8465489170887570, - "data": { - "enabledNotes": [ - false, - true, - false, - true, - false, - false, - true, - false, - false, - false, - true, - false - ] - }, - "pos": [ - 40, - -1 - ] - }, - { - "id": 8465489170887570, - "plugin": "Fundamental", - "model": "Quantizer", - "version": "2.0", - "params": [ - { - "value": -0.30361443758010864, - "id": 0 - } - ], - "leftModuleId": 758005564709860, - "rightModuleId": 4423007809468738, - "data": { - "enabledNotes": [ - false, - false, - false, - true, - false, - false, - true, - false, - true, - false, - false, - true - ] - }, - "pos": [ - 44, - -1 - ] - }, - { - "id": 683104811224040, - "plugin": "Fundamental", - "model": "Quantizer", - "version": "2.0", - "params": [ - { - "value": -0.17831322550773621, - "id": 0 - } - ], - "leftModuleId": 4423007809468738, - "rightModuleId": 4531725331261861, - "data": { - "enabledNotes": [ - false, - true, - false, - false, - false, - true, - false, - false, - true, - false, - true, - false - ] - }, - "pos": [ - 52, - -1 - ] - }, - { - "id": 4423007809468738, - "plugin": "Fundamental", - "model": "Quantizer", - "version": "2.0", - "params": [ - { - "value": -0.55662649869918823, - "id": 0 - } - ], - "leftModuleId": 8465489170887570, - "rightModuleId": 683104811224040, - "data": { - "enabledNotes": [ - false, - true, - false, - false, - false, - true, - true, - false, - false, - false, - true, - false - ] - }, - "pos": [ - 48, - -1 - ] - }, - { - "id": 8873341177893106, - "plugin": "Fundamental", - "model": "SequentialSwitch2", - "version": "2.0", - "params": [ - { - "value": 2.0, - "id": 0 - } - ], - "leftModuleId": 7206256653286977, - "rightModuleId": 758005564709860, - "pos": [ - 37, - -1 - ] - }, - { - "id": 5218974527740722, - "plugin": "Fundamental", - "model": "LFO", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": 0.65301215648651123, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "rightModuleId": 1035685351131893, - "pos": [ - -33, - -1 - ] - }, - { - "id": 1163131007452317, - "plugin": "Fundamental", - "model": "Octave", - "version": "2.0", - "params": [ - { - "value": -1.0, - "id": 0 - } - ], - "leftModuleId": 4531725331261861, - "rightModuleId": 891362589771903, - "pos": [ - 61, - -1 - ] - }, - { - "id": 8418253494908594, - "plugin": "Fundamental", - "model": "Random", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 1.0, - "id": 4 - }, - { - "value": 1.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - } - ], - "leftModuleId": 5395301826848558, - "rightModuleId": 8601159184541723, - "pos": [ - 3, - -1 - ] - }, - { - "id": 5395301826848558, - "plugin": "Fundamental", - "model": "LFO", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": -2.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 731196840446297, - "rightModuleId": 8418253494908594, - "pos": [ - -6, - -1 - ] - }, - { - "id": 731196840446297, - "plugin": "Fundamental", - "model": "LFO", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": 3.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 1035685351131893, - "rightModuleId": 5395301826848558, - "pos": [ - -15, - -1 - ] - }, - { - "id": 1133100648267642, - "plugin": "Fundamental", - "model": "VCF", - "version": "2.0", - "params": [ - { - "value": 0.1967989057302475, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.46144583821296692, - "id": 2 - }, - { - "value": 1.0, - "id": 3 - }, - { - "value": 0.31325310468673706, - "id": 4 - }, - { - "value": 0.433735191822052, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 1259717562922476, - "rightModuleId": 4828178296911509, - "pos": [ - 57, - 0 - ] - }, - { - "id": 1394719894730985, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.58072292804718018, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.3554217517375946, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 5726895899473528, - "rightModuleId": 1259717562922476, - "pos": [ - 39, - 0 - ] - }, - { - "id": 1259717562922476, - "plugin": "Fundamental", - "model": "VCMixer", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.74799954891204834, - "id": 1 - }, - { - "value": 0.50605034828186035, - "id": 2 - }, - { - "value": 0.7495308518409729, - "id": 3 - }, - { - "value": 1.0, - "id": 4 - }, - { - "value": 1.0, - "id": 5 - }, - { - "value": 1.0, - "id": 6 - }, - { - "value": 1.0, - "id": 7 - }, - { - "value": 1.0, - "id": 8 - }, - { - "value": 1.0, - "id": 9 - } - ], - "leftModuleId": 1394719894730985, - "rightModuleId": 1133100648267642, - "pos": [ - 48, - 0 - ] - }, - { - "id": 1647649757935413, - "plugin": "Fundamental", - "model": "8vert", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": -1.0, - "id": 5 - }, - { - "value": 0.35445797443389893, - "id": 6 - }, - { - "value": 0.19518086314201355, - "id": 7 - } - ], - "leftModuleId": 8601159184541723, - "rightModuleId": 5352206433681871, - "pos": [ - 21, - -1 - ] - }, - { - "id": 5352206433681871, - "plugin": "Fundamental", - "model": "Noise", - "version": "2.0", - "params": [], - "leftModuleId": 1647649757935413, - "rightModuleId": 7206256653286977, - "pos": [ - 29, - -1 - ] - }, - { - "id": 891362589771903, - "plugin": "Fundamental", - "model": "Octave", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - } - ], - "leftModuleId": 1163131007452317, - "rightModuleId": 5864032949729166, - "pos": [ - 64, - -1 - ] - }, - { - "id": 3146744790938462, - "plugin": "Fundamental", - "model": "LFO", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": 3.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 8016435651914356, - "rightModuleId": 5726895899473528, - "pos": [ - 21, - 0 - ] - }, - { - "id": 1691892280815347, - "plugin": "Fundamental", - "model": "Random", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.030120406299829483, - "id": 4 - }, - { - "value": 1.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 1.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - } - ], - "leftModuleId": 5864032949729166, - "rightModuleId": 6544530457999805, - "pos": [ - 76, - -1 - ] - }, - { - "id": 6544530457999805, - "plugin": "Fundamental", - "model": "Random", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 1.0, - "id": 4 - }, - { - "value": 1.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - }, - { - "value": 0.0, - "id": 9 - } - ], - "leftModuleId": 1691892280815347, - "pos": [ - 85, - -1 - ] - }, - { - "id": 1233074000424232, - "plugin": "Fundamental", - "model": "VCMixer", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.75805014371871948, - "id": 1 - }, - { - "value": 0.95399570465087891, - "id": 2 - }, - { - "value": 1.0, - "id": 3 - }, - { - "value": 1.0, - "id": 4 - }, - { - "value": 1.0, - "id": 5 - }, - { - "value": 1.0, - "id": 6 - }, - { - "value": 1.0, - "id": 7 - }, - { - "value": 1.0, - "id": 8 - }, - { - "value": 1.0, - "id": 9 - } - ], - "leftModuleId": 3385514259127415, - "rightModuleId": 1, - "pos": [ - 79, - 0 - ] - }, - { - "id": 2730774444988771, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.33253011107444763, - "id": 0 - }, - { - "value": 0.58072292804718018, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.3554217517375946, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 3201369453135267, - "rightModuleId": 7433032281179785, - "pos": [ - -28, - 0 - ] - }, - { - "id": 3201369453135267, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.32168671488761902, - "id": 0 - }, - { - "value": 0.59999996423721313, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.32409638166427612, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 5646145412017245, - "rightModuleId": 2730774444988771, - "pos": [ - -37, - 0 - ] - }, - { - "id": 5646145412017245, - "plugin": "Fundamental", - "model": "VCO", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - } - ], - "rightModuleId": 3201369453135267, - "pos": [ - -46, - 0 - ] - }, - { - "id": 2032233011372771, - "plugin": "Fundamental", - "model": "VCA-1", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - } - ], - "leftModuleId": 7382588397539714, - "rightModuleId": 8016435651914356, - "pos": [ - 9, - 0 - ] - }, - { - "id": 5418598651204386, - "plugin": "Fundamental", - "model": "VCMixer", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 0.59294706583023071, - "id": 1 - }, - { - "value": 0.29136249423027039, - "id": 2 - }, - { - "value": 0.55528944730758667, - "id": 3 - }, - { - "value": 1.0, - "id": 4 - }, - { - "value": 1.0, - "id": 5 - }, - { - "value": 1.0, - "id": 6 - }, - { - "value": 1.0, - "id": 7 - }, - { - "value": 1.0, - "id": 8 - }, - { - "value": 1.0, - "id": 9 - } - ], - "leftModuleId": 2580763714379115, - "rightModuleId": 7382588397539714, - "pos": [ - -7, - 0 - ] - }, - { - "id": 7382588397539714, - "plugin": "Fundamental", - "model": "VCF", - "version": "2.0", - "params": [ - { - "value": 0.5689617395401001, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.16144582629203796, - "id": 2 - }, - { - "value": 1.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.18554241955280304, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 5418598651204386, - "rightModuleId": 2032233011372771, - "pos": [ - 2, - 0 - ] - }, - { - "id": 2580763714379115, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.3879525363445282, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 7433032281179785, - "rightModuleId": 5418598651204386, - "pos": [ - -16, - 0 - ] - }, - { - "id": 7433032281179785, - "plugin": "Fundamental", - "model": "Mixer", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - } - ], - "leftModuleId": 2730774444988771, - "rightModuleId": 2580763714379115, - "data": { - "average": false, - "invert": false - }, - "pos": [ - -19, - 0 - ] - }, - { - "id": 8016435651914356, - "plugin": "Fundamental", - "model": "Delay", - "version": "2.0", - "params": [ - { - "value": 0.7241402268409729, - "id": 0 - }, - { - "value": 0.71686756610870361, - "id": 1 - }, - { - "value": 0.5, - "id": 2 - }, - { - "value": 0.66144609451293945, - "id": 3 - }, - { - "value": 0.27951806783676147, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - } - ], - "leftModuleId": 2032233011372771, - "rightModuleId": 3146744790938462, - "pos": [ - 12, - 0 - ] - }, - { - "id": 5864032949729166, - "plugin": "Fundamental", - "model": "LFO", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": -2.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.75, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 891362589771903, - "rightModuleId": 1691892280815347, - "pos": [ - 67, - -1 - ] - }, - { - "id": 6507602521553750, - "plugin": "Fundamental", - "model": "VCO", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": -24.722892761230469, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.24337352812290192, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - } - ], - "leftModuleId": 1527334562618244, - "rightModuleId": 2378286691858201, - "pos": [ - 25, - -2 - ] - }, - { - "id": 3893327492950413, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.25903621315956116, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.3554217517375946, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "rightModuleId": 1527334562618244, - "pos": [ - 7, - -2 - ] - }, - { - "id": 1527334562618244, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.51807236671447754, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.49156633019447327, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 3893327492950413, - "rightModuleId": 6507602521553750, - "pos": [ - 16, - -2 - ] - }, - { - "id": 2378286691858201, - "plugin": "Fundamental", - "model": "VCA-1", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - } - ], - "leftModuleId": 6507602521553750, - "rightModuleId": 4455336980892018, - "pos": [ - 34, - -2 - ] - }, - { - "id": 4455336980892018, - "plugin": "Fundamental", - "model": "VCF", - "version": "2.0", - "params": [ - { - "value": 0.83173602819442749, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.053012050688266754, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 2378286691858201, - "rightModuleId": 6747341247828307, - "pos": [ - 37, - -2 - ] - }, - { - "id": 6747341247828307, - "plugin": "Fundamental", - "model": "VCF", - "version": "2.0", - "params": [ - { - "value": 0.28478816151618958, - "id": 0 - }, - { - "value": 0.0, - "id": 1 - }, - { - "value": 0.25542160868644714, - "id": 2 - }, - { - "value": 0.5951806902885437, - "id": 3 - }, - { - "value": 0.10361450910568237, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 4455336980892018, - "pos": [ - 44, - -2 - ] - }, - { - "id": 3385514259127415, - "plugin": "Fundamental", - "model": "Mixer", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - } - ], - "leftModuleId": 8394463014211348, - "rightModuleId": 1233074000424232, - "data": { - "average": false, - "invert": false - }, - "pos": [ - 76, - 0 - ] - }, - { - "id": 7206256653286977, - "plugin": "Fundamental", - "model": "Merge", - "version": "2.0", - "params": [], - "leftModuleId": 5352206433681871, - "rightModuleId": 8873341177893106, - "data": { - "channels": -1 - }, - "pos": [ - 32, - -1 - ] - }, - { - "id": 4531725331261861, - "plugin": "Fundamental", - "model": "Split", - "version": "2.0", - "params": [], - "leftModuleId": 683104811224040, - "rightModuleId": 1163131007452317, - "pos": [ - 56, - -1 - ] - }, - { - "id": 8394463014211348, - "plugin": "Fundamental", - "model": "ADSR", - "version": "2.0", - "params": [ - { - "value": 0.0, - "id": 0 - }, - { - "value": 0.63132643699645996, - "id": 1 - }, - { - "value": 0.0, - "id": 2 - }, - { - "value": 0.62530171871185303, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.0, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - }, - { - "value": 0.0, - "id": 7 - }, - { - "value": 0.0, - "id": 8 - } - ], - "leftModuleId": 4828178296911509, - "rightModuleId": 3385514259127415, - "pos": [ - 67, - 0 - ] - }, - { - "id": 1035685351131893, - "plugin": "Fundamental", - "model": "LFO", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - }, - { - "value": 1.0, - "id": 1 - }, - { - "value": 1.0, - "id": 2 - }, - { - "value": 0.0, - "id": 3 - }, - { - "value": 0.0, - "id": 4 - }, - { - "value": 0.5, - "id": 5 - }, - { - "value": 0.0, - "id": 6 - } - ], - "leftModuleId": 5218974527740722, - "rightModuleId": 731196840446297, - "pos": [ - -24, - -1 - ] - }, - { - "id": 1, - "plugin": "Cardinal", - "model": "HostAudio2", - "version": "2.0", - "params": [ - { - "value": 1.0, - "id": 0 - } - ], - "leftModuleId": 1233074000424232, - "data": { - "dcFilter": true - }, - "pos": [ - 88, - 0 - ] - } - ], - "cables": [ - { - "id": 8294316115570611, - "outputModuleId": 758005564709860, - "outputId": 0, - "inputModuleId": 8873341177893106, - "inputId": 2, - "color": "#52ffff" - }, - { - "id": 5555057650117096, - "outputModuleId": 8465489170887570, - "outputId": 0, - "inputModuleId": 8873341177893106, - "inputId": 3, - "color": "#52beff" - }, - { - "id": 3575299420836353, - "outputModuleId": 683104811224040, - "outputId": 0, - "inputModuleId": 8873341177893106, - "inputId": 5, - "color": "#6752ff" - }, - { - "id": 6673705553204462, - "outputModuleId": 1163131007452317, - "outputId": 0, - "inputModuleId": 8601159184541723, - "inputId": 0, - "color": "#a852ff" - }, - { - "id": 7936547708694047, - "outputModuleId": 731196840446297, - "outputId": 3, - "inputModuleId": 8418253494908594, - "inputId": 2, - "color": "#ffd452" - }, - { - "id": 6795587122824602, - "outputModuleId": 731196840446297, - "outputId": 3, - "inputModuleId": 5726895899473528, - "inputId": 4, - "color": "#e8ff52" - }, - { - "id": 3019680638787688, - "outputModuleId": 5395301826848558, - "outputId": 3, - "inputModuleId": 8873341177893106, - "inputId": 0, - "color": "#a8ff52" - }, - { - "id": 1666984200392735, - "outputModuleId": 5726895899473528, - "outputId": 0, - "inputModuleId": 4828178296911509, - "inputId": 0, - "color": "#e8ff52" - }, - { - "id": 8766740694668647, - "outputModuleId": 8601159184541723, - "outputId": 2, - "inputModuleId": 1133100648267642, - "inputId": 3, - "color": "#a8ff52" - }, - { - "id": 8237083691879690, - "outputModuleId": 1133100648267642, - "outputId": 0, - "inputModuleId": 4828178296911509, - "inputId": 1, - "color": "#67ff52" - }, - { - "id": 1834953772627333, - "outputModuleId": 731196840446297, - "outputId": 3, - "inputModuleId": 1394719894730985, - "inputId": 4, - "color": "#e8ff52" - }, - { - "id": 4168348114170351, - "outputModuleId": 1394719894730985, - "outputId": 0, - "inputModuleId": 1259717562922476, - "inputId": 1, - "color": "#52ff7d" - }, - { - "id": 5717596310825586, - "outputModuleId": 1259717562922476, - "outputId": 0, - "inputModuleId": 1133100648267642, - "inputId": 0, - "color": "#52ffff" - }, - { - "id": 4350563624640266, - "outputModuleId": 8601159184541723, - "outputId": 3, - "inputModuleId": 1133100648267642, - "inputId": 1, - "color": "#527dff" - }, - { - "id": 8219233151532425, - "outputModuleId": 8601159184541723, - "outputId": 3, - "inputModuleId": 1259717562922476, - "inputId": 2, - "color": "#527dff" - }, - { - "id": 4180550788448825, - "outputModuleId": 5352206433681871, - "outputId": 6, - "inputModuleId": 8418253494908594, - "inputId": 3, - "color": "#a852ff" - }, - { - "id": 2241414982743724, - "outputModuleId": 4423007809468738, - "outputId": 0, - "inputModuleId": 8873341177893106, - "inputId": 4, - "color": "#527dff" - }, - { - "id": 4401638766741046, - "outputModuleId": 3146744790938462, - "outputId": 3, - "inputModuleId": 1691892280815347, - "inputId": 2, - "color": "#ff52d4" - }, - { - "id": 4473547302936863, - "outputModuleId": 5352206433681871, - "outputId": 5, - "inputModuleId": 6544530457999805, - "inputId": 3, - "color": "#ffd452" - }, - { - "id": 2149514714768661, - "outputModuleId": 1691892280815347, - "outputId": 4, - "inputModuleId": 6544530457999805, - "inputId": 2, - "color": "#e8ff52" - }, - { - "id": 5076399399662756, - "outputModuleId": 4828178296911509, - "outputId": 0, - "inputModuleId": 1233074000424232, - "inputId": 1, - "color": "#52beff" - }, - { - "id": 7965867680638860, - "outputModuleId": 3201369453135267, - "outputId": 0, - "inputModuleId": 2032233011372771, - "inputId": 0, - "color": "#e8ff52" - }, - { - "id": 1755370288614689, - "outputModuleId": 7382588397539714, - "outputId": 0, - "inputModuleId": 2032233011372771, - "inputId": 1, - "color": "#67ff52" - }, - { - "id": 7321274404212847, - "outputModuleId": 2730774444988771, - "outputId": 0, - "inputModuleId": 5418598651204386, - "inputId": 1, - "color": "#52ff7d" - }, - { - "id": 5213022936510450, - "outputModuleId": 5418598651204386, - "outputId": 0, - "inputModuleId": 7382588397539714, - "inputId": 0, - "color": "#52ffff" - }, - { - "id": 4958477523630847, - "outputModuleId": 5646145412017245, - "outputId": 3, - "inputModuleId": 5418598651204386, - "inputId": 2, - "color": "#527dff" - }, - { - "id": 806948035554393, - "outputModuleId": 891362589771903, - "outputId": 0, - "inputModuleId": 5646145412017245, - "inputId": 0, - "color": "#52beff" - }, - { - "id": 6076414959882510, - "outputModuleId": 1691892280815347, - "outputId": 4, - "inputModuleId": 2580763714379115, - "inputId": 4, - "color": "#52ffff" - }, - { - "id": 5072464099602064, - "outputModuleId": 7433032281179785, - "outputId": 0, - "inputModuleId": 3201369453135267, - "inputId": 4, - "color": "#6752ff" - }, - { - "id": 7530722628496994, - "outputModuleId": 7433032281179785, - "outputId": 0, - "inputModuleId": 2730774444988771, - "inputId": 4, - "color": "#6752ff" - }, - { - "id": 8200608424961808, - "outputModuleId": 2580763714379115, - "outputId": 0, - "inputModuleId": 7433032281179785, - "inputId": 0, - "color": "#a852ff" - }, - { - "id": 3061807858227116, - "outputModuleId": 2580763714379115, - "outputId": 0, - "inputModuleId": 7433032281179785, - "inputId": 1, - "color": "#a852ff" - }, - { - "id": 7988697270634675, - "outputModuleId": 5646145412017245, - "outputId": 2, - "inputModuleId": 7382588397539714, - "inputId": 1, - "color": "#527dff" - }, - { - "id": 7154492867378238, - "outputModuleId": 8016435651914356, - "outputId": 0, - "inputModuleId": 1233074000424232, - "inputId": 2, - "color": "#52ffbe" - }, - { - "id": 5994859036363313, - "outputModuleId": 2032233011372771, - "outputId": 0, - "inputModuleId": 8016435651914356, - "inputId": 4, - "color": "#e952ff" - }, - { - "id": 8473185137644009, - "outputModuleId": 891362589771903, - "outputId": 0, - "inputModuleId": 5418598651204386, - "inputId": 3, - "color": "#52beff" - }, - { - "id": 8537027609635289, - "outputModuleId": 5646145412017245, - "outputId": 2, - "inputModuleId": 7382588397539714, - "inputId": 3, - "color": "#a8ff52" - }, - { - "id": 7269980652293972, - "outputModuleId": 5864032949729166, - "outputId": 3, - "inputModuleId": 1691892280815347, - "inputId": 4, - "color": "#ff5252" - }, - { - "id": 7057970615240989, - "outputModuleId": 6507602521553750, - "outputId": 0, - "inputModuleId": 2378286691858201, - "inputId": 1, - "color": "#e8ff52" - }, - { - "id": 3226519042405924, - "outputModuleId": 1527334562618244, - "outputId": 0, - "inputModuleId": 2378286691858201, - "inputId": 0, - "color": "#67ff52" - }, - { - "id": 2402945299515265, - "outputModuleId": 3893327492950413, - "outputId": 0, - "inputModuleId": 6507602521553750, - "inputId": 1, - "color": "#52ff7d" - }, - { - "id": 4244874454116090, - "outputModuleId": 1233074000424232, - "outputId": 0, - "inputModuleId": 1, - "inputId": 0, - "color": "#52ffbe" - }, - { - "id": 1193512545516727, - "outputModuleId": 2378286691858201, - "outputId": 0, - "inputModuleId": 4455336980892018, - "inputId": 3, - "color": "#52ffff" - }, - { - "id": 6386216099907021, - "outputModuleId": 6747341247828307, - "outputId": 0, - "inputModuleId": 1233074000424232, - "inputId": 3, - "color": "#a8ff52" - }, - { - "id": 3572923290268663, - "outputModuleId": 4455336980892018, - "outputId": 0, - "inputModuleId": 6747341247828307, - "inputId": 3, - "color": "#52beff" - }, - { - "id": 7653802884040555, - "outputModuleId": 3385514259127415, - "outputId": 0, - "inputModuleId": 1233074000424232, - "inputId": 5, - "color": "#6752ff" - }, - { - "id": 829864317578038, - "outputModuleId": 3385514259127415, - "outputId": 0, - "inputModuleId": 1233074000424232, - "inputId": 6, - "color": "#6752ff" - }, - { - "id": 3373678828632339, - "outputModuleId": 6544530457999805, - "outputId": 0, - "inputModuleId": 1647649757935413, - "inputId": 7, - "color": "#a8ff52" - }, - { - "id": 7351430308772461, - "outputModuleId": 8418253494908594, - "outputId": 0, - "inputModuleId": 1647649757935413, - "inputId": 6, - "color": "#e952ff" - }, - { - "id": 5057619955115593, - "outputModuleId": 7206256653286977, - "outputId": 0, - "inputModuleId": 758005564709860, - "inputId": 0, - "color": "#a8ff52" - }, - { - "id": 4853090475978388, - "outputModuleId": 7206256653286977, - "outputId": 0, - "inputModuleId": 8465489170887570, - "inputId": 0, - "color": "#a8ff52" - }, - { - "id": 4526032538453288, - "outputModuleId": 7206256653286977, - "outputId": 0, - "inputModuleId": 4423007809468738, - "inputId": 0, - "color": "#a8ff52" - }, - { - "id": 3124783542336781, - "outputModuleId": 7206256653286977, - "outputId": 0, - "inputModuleId": 683104811224040, - "inputId": 0, - "color": "#a8ff52" - }, - { - "id": 565654378994967, - "outputModuleId": 1647649757935413, - "outputId": 6, - "inputModuleId": 7206256653286977, - "inputId": 0, - "color": "#e952ff" - }, - { - "id": 3261847816183455, - "outputModuleId": 1647649757935413, - "outputId": 7, - "inputModuleId": 7206256653286977, - "inputId": 1, - "color": "#ff52d4" - }, - { - "id": 8653467738162234, - "outputModuleId": 8873341177893106, - "outputId": 0, - "inputModuleId": 4531725331261861, - "inputId": 0, - "color": "#ff9352" - }, - { - "id": 763700465340890, - "outputModuleId": 4531725331261861, - "outputId": 0, - "inputModuleId": 1163131007452317, - "inputId": 1, - "color": "#ff5293" - }, - { - "id": 8958469082437437, - "outputModuleId": 4531725331261861, - "outputId": 1, - "inputModuleId": 891362589771903, - "inputId": 1, - "color": "#ff9352" - }, - { - "id": 8462724473577648, - "outputModuleId": 1647649757935413, - "outputId": 0, - "inputModuleId": 3385514259127415, - "inputId": 0, - "color": "#e8ff52" - }, - { - "id": 2589536637508587, - "outputModuleId": 1647649757935413, - "outputId": 5, - "inputModuleId": 3385514259127415, - "inputId": 1, - "color": "#a8ff52" - }, - { - "id": 5887432763805406, - "outputModuleId": 8394463014211348, - "outputId": 0, - "inputModuleId": 1647649757935413, - "inputId": 5, - "color": "#ffd452" - }, - { - "id": 7644685380405945, - "outputModuleId": 1035685351131893, - "outputId": 3, - "inputModuleId": 8394463014211348, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 471611457647672, - "outputModuleId": 1035685351131893, - "outputId": 3, - "inputModuleId": 1527334562618244, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 8041272677194580, - "outputModuleId": 1035685351131893, - "outputId": 3, - "inputModuleId": 3893327492950413, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 6914773470225645, - "outputModuleId": 1035685351131893, - "outputId": 3, - "inputModuleId": 5864032949729166, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 1224715010483309, - "outputModuleId": 1035685351131893, - "outputId": 3, - "inputModuleId": 3146744790938462, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 2586356355502803, - "outputModuleId": 5218974527740722, - "outputId": 3, - "inputModuleId": 5395301826848558, - "inputId": 4, - "color": "#ff5293" - }, - { - "id": 8944424695894162, - "outputModuleId": 5218974527740722, - "outputId": 3, - "inputModuleId": 731196840446297, - "inputId": 4, - "color": "#ff9352" - }, - { - "id": 6554274278257604, - "outputModuleId": 5218974527740722, - "outputId": 3, - "inputModuleId": 1035685351131893, - "inputId": 4, - "color": "#ff5252" - }, - { - "id": 4008697176669096, - "outputModuleId": 1527334562618244, - "outputId": 0, - "inputModuleId": 6747341247828307, - "inputId": 0, - "color": "#67ff52" - } - ] -} diff --git a/patches/welcome-wasm-mini.vcv b/patches/welcome-wasm-mini.vcv index fe62fa02..0c6454a2 100644 --- a/patches/welcome-wasm-mini.vcv +++ b/patches/welcome-wasm-mini.vcv @@ -1,6 +1,5 @@ { - "version": "2.1.2", - "unsaved": true, + "version": "2.1.1", "zoom": 1.0, "modules": [ { @@ -9,15 +8,15 @@ "model": "TextEditor", "version": "2.0", "params": [], - "leftModuleId": 799138358763949, + "leftModuleId": 1202678850202654, "data": { "filepath": "", "lang": "None", - "etext": "Welcome to Cardinal!\n\nThis is the Web/Wasm variant\nIt has 2 audio outputs, enabled by default.\nUse Engine menu to enable input and/or MIDI.\n\nA basic VCO + ADSR + VCA is the default patch\n\n", - "width": 23 + "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio ports, 5 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nA basic VCO + ADSR + VCA is\nthe default patch\n\nHave fun!\n\n", + "width": 19 }, "pos": [ - 49, + 58, 0 ] }, @@ -151,7 +150,7 @@ } ], "leftModuleId": 4828178296911509, - "rightModuleId": 799138358763949, + "rightModuleId": 4, "data": { "dcFilter": true }, @@ -183,26 +182,42 @@ ] }, { - "id": 799138358763949, + "id": 4, "plugin": "Cardinal", - "model": "HostMIDIMap", + "model": "HostParameters", "version": "2.0", "params": [], "leftModuleId": 1, + "rightModuleId": 1202678850202654, + "data": { + "smooth": true + }, + "pos": [ + 38, + 0 + ] + }, + { + "id": 1202678850202654, + "plugin": "Cardinal", + "model": "HostParametersMap", + "version": "2.0", + "params": [], + "leftModuleId": 4, "rightModuleId": 8712245256622475, "data": { "maps": [ { - "cc": -1, + "hostParamId": 255, + "inverted": false, + "smooth": true, "moduleId": -1, "paramId": 0 } - ], - "smooth": true, - "channel": 0 + ] }, "pos": [ - 38, + 47, 0 ] } diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index f08a597d..072552da 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -87,6 +87,14 @@ # define CARDINAL_TEMPLATE_NAME "init/main.vcv" #endif +#ifdef DISTRHO_OS_WASM +# if CARDINAL_VARIANT_MINI +# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm-mini.vcv" +# else +# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm.vcv" +# endif +#endif + namespace rack { namespace asset { std::string patchesPath(); diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index a93b20c8..3b59c692 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -21,14 +21,6 @@ #include -#ifdef DISTRHO_OS_WASM -# if CARDINAL_VARIANT_MINI -# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm-mini.vcv" -# else -# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm.vcv" -# endif -#endif - extern const std::string CARDINAL_VERSION; // ----------------------------------------------------------------------------------------------------------- From 5c0b45458363b5c93da05197dbf62ca4f1231f27 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 25 Feb 2023 14:36:59 +0100 Subject: [PATCH 282/451] Fix notes module width in wasm-mini init patch Signed-off-by: falkTX --- patches/init/mini.vcv | 2 +- patches/welcome-wasm-mini.vcv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/init/mini.vcv b/patches/init/mini.vcv index 0c6454a2..aae888ef 100644 --- a/patches/init/mini.vcv +++ b/patches/init/mini.vcv @@ -13,7 +13,7 @@ "filepath": "", "lang": "None", "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio ports, 5 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nA basic VCO + ADSR + VCA is\nthe default patch\n\nHave fun!\n\n", - "width": 19 + "width": 23 }, "pos": [ 58, diff --git a/patches/welcome-wasm-mini.vcv b/patches/welcome-wasm-mini.vcv index 0c6454a2..aae888ef 100644 --- a/patches/welcome-wasm-mini.vcv +++ b/patches/welcome-wasm-mini.vcv @@ -13,7 +13,7 @@ "filepath": "", "lang": "None", "etext": "Welcome to Cardinal!\n\nThis is the mini variant\nIt has 2 audio ports, 5 CV ports, plus MIDI\n\nThe most relevant modules for host\nintegration are in this default patch\n\nA basic VCO + ADSR + VCA is\nthe default patch\n\nHave fun!\n\n", - "width": 19 + "width": 23 }, "pos": [ 58, From e9c030a0f84eefcc5952f6821eaa1393fc1a0f23 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 25 Feb 2023 15:04:00 +0100 Subject: [PATCH 283/451] Check /usr directory for existing carla tools on macOS too Closes #495 Signed-off-by: falkTX --- plugins/Cardinal/src/Carla.cpp | 31 ++++++++++++++------------- plugins/Cardinal/src/Ildaeil.cpp | 36 +++++++++++++++++--------------- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/plugins/Cardinal/src/Carla.cpp b/plugins/Cardinal/src/Carla.cpp index 30fef47f..b9122835 100644 --- a/plugins/Cardinal/src/Carla.cpp +++ b/plugins/Cardinal/src/Carla.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -132,7 +132,17 @@ struct CarlaModule : Module { const char* binaryDir = nullptr; const char* resourceDir = nullptr; -#if defined(CARLA_OS_MAC) + #if defined(CARLA_OS_WIN) + const std::string winBinaryDir = system::join(asset::systemDir, "Carla"); + + if (system::exists(winBinaryDir)) + { + winResourceDir = system::join(winBinaryDir, "resources"); + binaryDir = winBinaryDir.c_str(); + resourceDir = winResourceDir.c_str(); + } + #else // CARLA_OS_WIN + #if defined(CARLA_OS_MAC) if (system::exists("~/Applications/Carla.app")) { binaryDir = "~/Applications/Carla.app/Contents/MacOS"; @@ -143,17 +153,10 @@ struct CarlaModule : Module { binaryDir = "/Applications/Carla.app/Contents/MacOS"; resourceDir = "/Applications/Carla.app/Contents/MacOS/resources"; } -#elif defined(CARLA_OS_WIN) - const std::string winBinaryDir = system::join(asset::systemDir, "Carla"); - - if (system::exists(winBinaryDir)) - { - winResourceDir = system::join(winBinaryDir, "resources"); - binaryDir = winBinaryDir.c_str(); - resourceDir = winResourceDir.c_str(); - } -#else - if (system::exists("/usr/local/lib/carla")) + #else // CARLA_OS_MAC + if (false) {} + #endif // CARLA_OS_MAC + else if (system::exists("/usr/local/lib/carla")) { binaryDir = "/usr/local/lib/carla"; resourceDir = "/usr/local/share/carla/resources"; @@ -163,7 +166,7 @@ struct CarlaModule : Module { binaryDir = "/usr/lib/carla"; resourceDir = "/usr/share/carla/resources"; } -#endif + #endif // CARLA_OS_WIN if (binaryDir == nullptr) { diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 85690040..50fc1beb 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -244,7 +244,17 @@ struct IldaeilModule : Module { fCarlaHostHandle = carla_create_native_plugin_host_handle(fCarlaPluginDescriptor, fCarlaPluginHandle); DISTRHO_SAFE_ASSERT_RETURN(fCarlaHostHandle != nullptr,); -#if defined(CARLA_OS_MAC) + #if defined(CARLA_OS_WIN) + const std::string winBinaryDir = system::join(asset::systemDir, "Carla"); + + if (system::exists(winBinaryDir)) + { + const std::string winResourceDir = system::join(winBinaryDir, "resources"); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, winBinaryDir.c_str()); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, winResourceDir.c_str()); + } + #else // CARLA_OS_WIN + #if defined(CARLA_OS_MAC) if (system::exists("~/Applications/Carla.app")) { carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "~/Applications/Carla.app/Contents/MacOS"); @@ -255,20 +265,12 @@ struct IldaeilModule : Module { carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/Applications/Carla.app/Contents/MacOS"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/Applications/Carla.app/Contents/MacOS/resources"); } -#elif defined(CARLA_OS_WASM) - if (true) - {} -#elif defined(CARLA_OS_WIN) - const std::string winBinaryDir = system::join(asset::systemDir, "Carla"); - - if (system::exists(winBinaryDir)) - { - const std::string winResourceDir = system::join(winBinaryDir, "resources"); - carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, winBinaryDir.c_str()); - carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, winResourceDir.c_str()); - } -#else - if (system::exists("/usr/local/lib/carla")) + #elif defined(CARLA_OS_WASM) + if (true) {} + #else + if (false) {} + #endif + else if (system::exists("/usr/local/lib/carla")) { carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/usr/local/lib/carla"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/local/share/carla/resources"); @@ -278,7 +280,7 @@ struct IldaeilModule : Module { carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/usr/lib/carla"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/share/carla/resources"); } -#endif + #endif // CARLA_OS_WIN else { canUseBridges = false; From fdfe20b606791d437c4ad3a44da8bf21986dcdee Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 25 Feb 2023 15:51:08 +0100 Subject: [PATCH 284/451] Make vst3 versioning more officially compatible Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index 27e75763..c77edda5 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 27e75763a6d736453e803778288841a2b0ed7bd9 +Subproject commit c77edda5cca824ae995463654f3c7e2a46e23316 From fcbed2797c40ecbe209d96d3f443d504449e6c13 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 25 Feb 2023 16:36:58 +0100 Subject: [PATCH 285/451] Do not reset pitch when receiving all-notes-off Closes #464 Signed-off-by: falkTX --- plugins/Cardinal/src/HostMIDI.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index 7469a8ea..6d13ea3e 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -148,22 +148,27 @@ struct HostMIDI : TerminalModule { channels = 1; polyMode = ROTATE_MODE; pwRange = 0; - panic(); + panic(true); } /** Resets performance state */ - void panic() + void panic(const bool resetPitch) { for (int c = 0; c < 16; c++) { notes[c] = 60; gates[c] = false; velocities[c] = 0; aftertouches[c] = 0; - pws[c] = 8192; - mods[c] = 0; pwFilters[c].reset(); modFilters[c].reset(); } + if (resetPitch) { + for (int c = 0; c < 16; c++) { + notes[c] = 60; + pws[c] = 8192; + mods[c] = 0; + } + } pedal = false; rotateIndex = -1; heldNotes.clear(); @@ -374,7 +379,7 @@ struct HostMIDI : TerminalModule { // all notes off (panic) case 0x7b: { if (msg.getValue() == 0) { - panic(); + panic(false); } } break; default: break; @@ -529,7 +534,7 @@ struct HostMIDI : TerminalModule { if (channels == this->channels) return; this->channels = channels; - panic(); + panic(true); } void setPolyMode(const PolyMode polyMode) @@ -537,7 +542,7 @@ struct HostMIDI : TerminalModule { if (polyMode == this->polyMode) return; this->polyMode = polyMode; - panic(); + panic(true); } } midiInput; @@ -886,7 +891,7 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { menu->addChild(createMenuLabel("MIDI Input & Output")); menu->addChild(createMenuItem("Panic", "", - [=]() { module->midiInput.panic(); module->midiOutput.panic(); } + [=]() { module->midiInput.panic(true); module->midiOutput.panic(); } )); } }; From 83c3ae888d917883e7a8a2c400b6aa614f099c8b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 25 Feb 2023 17:04:25 +0100 Subject: [PATCH 286/451] Enable LTO in preparation for release Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94a5b2dd..2f9ca2d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: true - WITH_LTO: false + WITH_LTO: true jobs: linux-arm64: From 6cc696d91157449acde90fa4ab4ff2c376799cd0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 26 Feb 2023 11:09:30 +0100 Subject: [PATCH 287/451] Force built-in carla juce symbols into custom namespace Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index 33a142f4..adc55af8 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 33a142f447925f55d00532933a1f28e9745c13eb +Subproject commit adc55af80cf797b7dd245a6f66a99bce65193937 From 6e17e452b17f3f685562e00f987b3c96507d885d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 26 Feb 2023 19:15:22 +0100 Subject: [PATCH 288/451] Fix mini standalone under non-jack systems Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index c77edda5..18f3fa38 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit c77edda5cca824ae995463654f3c7e2a46e23316 +Subproject commit 18f3fa38cb6f2b23166614a7b8aa0a88005d7f0d From 06d61a55a2e0943a842b491eca2e291f2fae48a7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 27 Feb 2023 19:41:27 +0100 Subject: [PATCH 289/451] Add another mini patch Signed-off-by: falkTX --- dpf | 2 +- patches/mini/falkTX_-_Moogy.vcv | 21 - patches/mini/falkTX_-_Saw_For_One.vcv | 971 ++++++++++++++++++++++++++ 3 files changed, 972 insertions(+), 22 deletions(-) create mode 100644 patches/mini/falkTX_-_Saw_For_One.vcv diff --git a/dpf b/dpf index 18f3fa38..aeeb2cbe 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 18f3fa38cb6f2b23166614a7b8aa0a88005d7f0d +Subproject commit aeeb2cbe1b984d76e336f0413f79811de26242ae diff --git a/patches/mini/falkTX_-_Moogy.vcv b/patches/mini/falkTX_-_Moogy.vcv index 5b6978e7..5a401a80 100644 --- a/patches/mini/falkTX_-_Moogy.vcv +++ b/patches/mini/falkTX_-_Moogy.vcv @@ -377,20 +377,6 @@ "rightModuleId": 1079059256177472, "data": { "maps": [ - { - "hostParamId": 255, - "inverted": false, - "smooth": true, - "moduleId": -1, - "paramId": 0 - }, - { - "hostParamId": 255, - "inverted": false, - "smooth": true, - "moduleId": -1, - "paramId": 0 - }, { "hostParamId": 0, "inverted": false, @@ -446,13 +432,6 @@ "smooth": true, "moduleId": 5726895899473528, "paramId": 2 - }, - { - "hostParamId": 255, - "inverted": false, - "smooth": true, - "moduleId": -1, - "paramId": 0 } ] }, diff --git a/patches/mini/falkTX_-_Saw_For_One.vcv b/patches/mini/falkTX_-_Saw_For_One.vcv new file mode 100644 index 00000000..4c85e67a --- /dev/null +++ b/patches/mini/falkTX_-_Saw_For_One.vcv @@ -0,0 +1,971 @@ +{ + "version": "2.1.2", + "zoom": 1.0, + "gridOffset": [ + -3.8666665554046631, + -0.33421051502227783 + ], + "modules": [ + { + "id": 3530479703931215, + "plugin": "Fundamental", + "model": "LFO", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": -0.99517768621444702, + "id": 2 + }, + { + "value": 0.0, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.5, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + } + ], + "pos": [ + 0, + -1 + ] + }, + { + "id": 2617521628379532, + "plugin": "Fundamental", + "model": "ADSR", + "version": "2.0", + "params": [ + { + "value": 0.2975899875164032, + "id": 0 + }, + { + "value": 0.53734946250915527, + "id": 1 + }, + { + "value": 0.31204831600189209, + "id": 2 + }, + { + "value": 0.5, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + } + ], + "rightModuleId": 6351707277679558, + "pos": [ + 44, + 0 + ] + }, + { + "id": 8914754292241465, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCSine", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 0.44499999284744263, + "id": 1 + }, + { + "value": 0.60414284467697144, + "id": 2 + }, + { + "value": 0.99500000476837158, + "id": 3 + }, + { + "value": 0.0, + "id": 4 + }, + { + "value": 1.0, + "id": 5 + }, + { + "value": 0.11999999731779099, + "id": 6 + }, + { + "value": 0.1276666522026062, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": -0.14399991929531097, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.061999920755624771, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.078000001609325409, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "leftModuleId": 287325898511014, + "rightModuleId": 6895418575305544, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Feb 19 2023 23:43:29", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 22, + 0 + ] + }, + { + "id": 287325898511014, + "plugin": "SurgeXTRack", + "model": "SurgeXTOSCModern", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + }, + { + "value": 1.0, + "id": 1 + }, + { + "value": 0.32114300131797791, + "id": 2 + }, + { + "value": 0.8151429295539856, + "id": 3 + }, + { + "value": 0.5, + "id": 4 + }, + { + "value": 0.0, + "id": 5 + }, + { + "value": 0.11999999731779099, + "id": 6 + }, + { + "value": 0.13699999451637268, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.0, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": -1.0, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.16599999368190765, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": -0.28200000524520874, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 0.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + }, + { + "value": 0.0, + "id": 28 + }, + { + "value": 0.0, + "id": 29 + }, + { + "value": 0.0, + "id": 30 + }, + { + "value": 0.0, + "id": 31 + }, + { + "value": 0.0, + "id": 32 + }, + { + "value": 0.0, + "id": 33 + }, + { + "value": 0.0, + "id": 34 + }, + { + "value": 0.0, + "id": 35 + }, + { + "value": 0.0, + "id": 36 + }, + { + "value": 0.0, + "id": 37 + }, + { + "value": 0.0, + "id": 38 + }, + { + "value": 0.0, + "id": 39 + }, + { + "value": 0.0, + "id": 40 + }, + { + "value": 0.0, + "id": 41 + }, + { + "value": 0.0, + "id": 42 + }, + { + "value": 0.0, + "id": 43 + }, + { + "value": 0.0, + "id": 44 + }, + { + "value": 0.0, + "id": 45 + }, + { + "value": 0.0, + "id": 46 + }, + { + "value": 0.0, + "id": 47 + }, + { + "value": 1.0, + "id": 48 + }, + { + "value": 0.066999994218349457, + "id": 49 + }, + { + "value": 1.0, + "id": 50 + } + ], + "rightModuleId": 8914754292241465, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Feb 19 2023 23:43:29", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "halfbandM": 6, + "halfbandSteep": true, + "doDCBlock": true + } + }, + "pos": [ + 10, + 0 + ] + }, + { + "id": 6895418575305544, + "plugin": "AriaSalvatrice", + "model": "Swerge", + "version": "2.0", + "params": [ + { + "value": 0.0, + "id": 0 + } + ], + "leftModuleId": 8914754292241465, + "rightModuleId": 6420065476624550, + "pos": [ + 34, + 0 + ] + }, + { + "id": 702164998788601, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 6420065476624550, + "pos": [ + 40, + 0 + ] + }, + { + "id": 6420065476624550, + "plugin": "Fundamental", + "model": "Sum", + "version": "2.0", + "params": [ + { + "value": 1.0, + "id": 0 + } + ], + "leftModuleId": 6895418575305544, + "rightModuleId": 702164998788601, + "pos": [ + 37, + 0 + ] + }, + { + "id": 6351707277679558, + "plugin": "SurgeXTRack", + "model": "SurgeXTWaveshaper", + "version": "2.0", + "params": [ + { + "value": -8.6468648910522461, + "id": 0 + }, + { + "value": 0.0, + "id": 1 + }, + { + "value": 0.0, + "id": 2 + }, + { + "value": -60.0, + "id": 3 + }, + { + "value": 70.0, + "id": 4 + }, + { + "value": 0.12800015509128571, + "id": 5 + }, + { + "value": 0.0, + "id": 6 + }, + { + "value": 0.0, + "id": 7 + }, + { + "value": 0.0, + "id": 8 + }, + { + "value": 0.0, + "id": 9 + }, + { + "value": 0.21600000560283661, + "id": 10 + }, + { + "value": 0.0, + "id": 11 + }, + { + "value": 0.0, + "id": 12 + }, + { + "value": 0.50200003385543823, + "id": 13 + }, + { + "value": 0.0, + "id": 14 + }, + { + "value": 0.0, + "id": 15 + }, + { + "value": 0.0, + "id": 16 + }, + { + "value": 0.0, + "id": 17 + }, + { + "value": 0.0, + "id": 18 + }, + { + "value": 0.0, + "id": 19 + }, + { + "value": 0.0, + "id": 20 + }, + { + "value": 0.0, + "id": 21 + }, + { + "value": 0.0, + "id": 22 + }, + { + "value": 0.0, + "id": 23 + }, + { + "value": 0.0, + "id": 24 + }, + { + "value": 15.0, + "id": 25 + }, + { + "value": 0.0, + "id": 26 + }, + { + "value": 0.0, + "id": 27 + } + ], + "leftModuleId": 2617521628379532, + "data": { + "xtshared": { + "streamingVersion": 1, + "buildInfo": "os:linux pluggit:Cardinal surgegit:Cardinal buildtime=Feb 19 2023 23:43:29", + "isCoupledToGlobalStyle": true, + "localStyle": 10001, + "localDisplayRegionColor": 900001, + "localModulationColor": 900005, + "localControlValueColor": 900001, + "localPowerButtonColor": 900003 + }, + "modulespecific": { + "doDCBlock": false + } + }, + "pos": [ + 53, + 0 + ] + }, + { + "id": 1, + "plugin": "Cardinal", + "model": "HostAudio2", + "version": "2.0", + "params": [ + { + "value": 0.45032820105552673, + "id": 0 + } + ], + "data": { + "dcFilter": true + }, + "pos": [ + 66, + 0 + ] + }, + { + "id": 2, + "plugin": "Cardinal", + "model": "HostMIDI", + "version": "2.0", + "params": [], + "data": { + "pwRange": 0.0, + "smooth": false, + "channels": 1, + "polyMode": 0, + "lastPitch": 8192, + "lastMod": 0, + "inputChannel": 0, + "outputChannel": 0 + }, + "pos": [ + 0, + 0 + ] + } + ], + "cables": [ + { + "id": 7078442804356951, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 287325898511014, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 2637993111379757, + "outputModuleId": 2, + "outputId": 0, + "inputModuleId": 8914754292241465, + "inputId": 0, + "color": "#52beff" + }, + { + "id": 7645122439500280, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 287325898511014, + "inputId": 1, + "color": "#527dff" + }, + { + "id": 456636951896817, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 8914754292241465, + "inputId": 1, + "color": "#527dff" + }, + { + "id": 4908672560602015, + "outputModuleId": 2, + "outputId": 1, + "inputModuleId": 2617521628379532, + "inputId": 4, + "color": "#a852ff" + }, + { + "id": 3911345250761309, + "outputModuleId": 2, + "outputId": 6, + "inputModuleId": 2617521628379532, + "inputId": 5, + "color": "#527dff" + }, + { + "id": 1721551606636812, + "outputModuleId": 6351707277679558, + "outputId": 0, + "inputModuleId": 1, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 8567652559342014, + "outputModuleId": 6351707277679558, + "outputId": 1, + "inputModuleId": 1, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 7051140988441255, + "outputModuleId": 287325898511014, + "outputId": 1, + "inputModuleId": 6895418575305544, + "inputId": 4, + "color": "#ff5252" + }, + { + "id": 780441311761289, + "outputModuleId": 8914754292241465, + "outputId": 0, + "inputModuleId": 6895418575305544, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 2400958554319452, + "outputModuleId": 8914754292241465, + "outputId": 1, + "inputModuleId": 6895418575305544, + "inputId": 5, + "color": "#ff5252" + }, + { + "id": 5935487313164681, + "outputModuleId": 287325898511014, + "outputId": 0, + "inputModuleId": 6895418575305544, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 7922595614504923, + "outputModuleId": 6895418575305544, + "outputId": 0, + "inputModuleId": 6420065476624550, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 5223439046078660, + "outputModuleId": 6420065476624550, + "outputId": 0, + "inputModuleId": 6351707277679558, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 1550005732923321, + "outputModuleId": 6895418575305544, + "outputId": 1, + "inputModuleId": 702164998788601, + "inputId": 0, + "color": "#ff5252" + }, + { + "id": 3466384847513146, + "outputModuleId": 702164998788601, + "outputId": 0, + "inputModuleId": 6351707277679558, + "inputId": 1, + "color": "#ff5252" + }, + { + "id": 6350073656502047, + "outputModuleId": 2617521628379532, + "outputId": 0, + "inputModuleId": 287325898511014, + "inputId": 2, + "color": "#a852ff" + }, + { + "id": 4319366098337873, + "outputModuleId": 2617521628379532, + "outputId": 0, + "inputModuleId": 8914754292241465, + "inputId": 2, + "color": "#a852ff" + }, + { + "id": 960118561480436, + "outputModuleId": 2617521628379532, + "outputId": 0, + "inputModuleId": 6351707277679558, + "inputId": 2, + "color": "#a852ff" + }, + { + "id": 6295963384449957, + "outputModuleId": 3530479703931215, + "outputId": 0, + "inputModuleId": 287325898511014, + "inputId": 3, + "color": "#ff5293" + }, + { + "id": 5112615215271363, + "outputModuleId": 3530479703931215, + "outputId": 1, + "inputModuleId": 6351707277679558, + "inputId": 3, + "color": "#ff5293" + } + ] +} From 351d6a815f58fe3afeae572eb153327c00352382 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 27 Feb 2023 21:34:22 +0100 Subject: [PATCH 290/451] Make sure CI uploads releases Signed-off-by: falkTX --- .github/workflows/build.yml | 8 +------- .github/workflows/irc.yml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f9ca2d3..7a655910 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,6 @@ name: build -on: - push: - branches: - - '*' - pull_request: - branches: - - '*' +on: [push, pull_request] env: CACHE_VERSION: 2 diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml index 14f8d5c6..3be06fea 100644 --- a/.github/workflows/irc.yml +++ b/.github/workflows/irc.yml @@ -1,6 +1,6 @@ name: irc -on: [push] +on: [push, pull_request] jobs: notification: From b858aa5c53928b53d37afb337893146a98648505 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 28 Feb 2023 10:57:27 +0100 Subject: [PATCH 291/451] Disable LTO post release Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a655910..8a8ffef6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: true - WITH_LTO: true + WITH_LTO: false jobs: linux-arm64: From 94499ff62b56bf715e4ad100fbf5d6f98d1c5398 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 28 Feb 2023 10:57:52 +0100 Subject: [PATCH 292/451] Include carla's juce modules in source tarball Signed-off-by: falkTX --- Makefile | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/Makefile b/Makefile index a3a98e5e..be7840a4 100644 --- a/Makefile +++ b/Makefile @@ -315,7 +315,6 @@ TAR_ARGS = \ --exclude="*.kdev*" \ --exclude=".travis*" \ --exclude=".vscode*" \ - --exclude="carla/source/modules/juce_*" \ --exclude="carla/source/native-plugins/external/zynaddsubfx*" \ --exclude="src/Rack/dep/osdialog/osdialog_*" \ --exclude="src/Rack/icon.*" \ @@ -350,26 +349,7 @@ TAR_ARGS = \ --exclude=plugins/BogaudioModules/res-src \ --exclude=plugins/Cardinal/orig \ --exclude=plugins/GrandeModular/res-src \ - --exclude=plugins/surgext/surge/libs/JUCE/docs \ - --exclude=plugins/surgext/surge/libs/JUCE/examples \ - --exclude=plugins/surgext/surge/libs/JUCE/extras \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/CMakeLists.txt \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_analytics \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_devices \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_plugin_client \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_processors \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_audio_utils \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_box2d \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_cryptography \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_data_structures \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_events \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_graphics \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_gui_basics \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_gui_extra \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_opengl \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_osc \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_product_unlocking \ - --exclude=plugins/surgext/surge/libs/JUCE/modules/juce_video \ + --exclude=plugins/surgext/surge/libs/JUCE \ --exclude=plugins/surgext/surge/resources/data/patches_3rdparty \ --exclude=plugins/surgext/surge/resources/data/patches_factory \ --exclude=plugins/surgext/surge/resources/data/wavetables_3rdparty \ From cfe50e25e94c4495ee0931a739063b0d1efd26e6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 28 Feb 2023 11:29:46 +0100 Subject: [PATCH 293/451] Mention mini variant in readme Signed-off-by: falkTX --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 9efde38b..6ea7ff7f 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,22 @@ Plugin type is set as "instrument". This variant provides 2 audio inputs and outputs, but no CV ports. Plugin type is set as regular "effect". +### Mini + +This is a special variant with a very small, hand-picked module selection and limited IO (2 audio ports plus 5 CV). + +There are 2 main reasons for this variant to exist: +1. make it easier for users new to the modular world to get a working setup, by only having some of the best possible modules available to choose from +2. hand-pick modules that are simple enough to work reliably in a remote setup + +For now the list of selected modules is quite small, intentionally. We will add a few more as the need appears. +All included modules support polyphony, reducing confusion for new users not yet used to mono vs poly approach in Rack/Cardinal. + +The 2nd reason (only having simple modules) is needed in order to support DSP/UI separation. +Having this in place means we can run the DSP on a different machine than the UI. +This is particularly interesting for running Cardinal on embed systems, being controlled remotely via a web browser or a native desktop application. +Already doable with LV2 from 23.02 onwards, later on this will be made possible on standalone too. + ## Screenshots From 6e2d01c24f4529ec20e099b09f8481659ae7c7a9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 28 Feb 2023 12:07:04 +0100 Subject: [PATCH 294/451] Fix make clean Signed-off-by: falkTX --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index be7840a4..31841d03 100644 --- a/Makefile +++ b/Makefile @@ -261,7 +261,10 @@ clean: $(MAKE) clean -C dpf/utils/lv2-ttl-generator $(MAKE) clean -C plugins $(MAKE) clean -C src - rm -rf bin build build-headless + rm -rf bin build build-headless dpf/utils/lv2_ttl_generator.d + # FIXME + rm -f src/Rack/BaconMusic/default-skin.json + rm -f src/Rack/SurgeXTRack/default-skin.json # -------------------------------------------------------------- # Install step From 6887af3138221cfbec672c2f2c6ce7dd6868d9ca Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 28 Feb 2023 12:35:50 +0100 Subject: [PATCH 295/451] Do not exclude src/MOD from source tarball Signed-off-by: falkTX --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 31841d03..92f311d6 100644 --- a/Makefile +++ b/Makefile @@ -356,7 +356,6 @@ TAR_ARGS = \ --exclude=plugins/surgext/surge/resources/data/patches_3rdparty \ --exclude=plugins/surgext/surge/resources/data/patches_factory \ --exclude=plugins/surgext/surge/resources/data/wavetables_3rdparty \ - --exclude=src/MOD \ --exclude=src/Rack/adapters \ --exclude=src/Rack/dep/filesystem/cmake \ --exclude=src/Rack/dep/filesystem/examples \ From 120d5e3c0840daec39ccb688a1036125ff133d31 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 5 Mar 2023 14:43:48 +0100 Subject: [PATCH 296/451] Use carla single static lib setup Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- jucewrapper/CMakeLists.txt | 79 +------------------------------------- src/Makefile.cardinal.mk | 27 +------------ 4 files changed, 5 insertions(+), 105 deletions(-) diff --git a/carla b/carla index adc55af8..5d0d243b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit adc55af80cf797b7dd245a6f66a99bce65193937 +Subproject commit 5d0d243be13e2088e2c82d4d0bcc947edcd1b64d diff --git a/dpf b/dpf index aeeb2cbe..90004b0d 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit aeeb2cbe1b984d76e336f0413f79811de26242ae +Subproject commit 90004b0d43875c3754142114112148b593615352 diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 5fec6cdb..3d344ba4 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -14,40 +14,7 @@ add_library(dgl STATIC IMPORTED) set_property(TARGET dgl PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../dpf/build/libdgl-opengl.a") add_library(carla_host_plugin STATIC IMPORTED) -set_property(TARGET carla_host_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/plugin/${CMAKE_BUILD_TYPE}/carla-host-plugin.cpp.o") - -add_library(carla_engine_plugin STATIC IMPORTED) -set_property(TARGET carla_engine_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/carla_engine_plugin.a") - -add_library(carla_plugin STATIC IMPORTED) -set_property(TARGET carla_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/carla_plugin.a") - -add_library(native_plugins STATIC IMPORTED) -set_property(TARGET native_plugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/native-plugins.a") - -add_library(audio_decoder STATIC IMPORTED) -set_property(TARGET audio_decoder PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/audio_decoder.a") - -add_library(jackbridge STATIC IMPORTED) -set_property(TARGET jackbridge PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/jackbridge.min.a") - -add_library(lilv STATIC IMPORTED) -set_property(TARGET lilv PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/lilv.a") - -add_library(rtmempool STATIC IMPORTED) -set_property(TARGET rtmempool PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/rtmempool.a") - -add_library(sfzero STATIC IMPORTED) -set_property(TARGET sfzero PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/sfzero.a") - -add_library(water STATIC IMPORTED) -set_property(TARGET water PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/water.a") - -add_library(ysfx STATIC IMPORTED) -set_property(TARGET ysfx PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/ysfx.a") - -add_library(zita_resampler STATIC IMPORTED) -set_property(TARGET zita_resampler PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/zita-resampler.a") +set_property(TARGET carla_host_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/bin/libcarla_host-plugin.a") add_library(sCardinal STATIC IMPORTED) set_property(TARGET sCardinal PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/Cardinal.a") @@ -193,17 +160,6 @@ target_link_libraries(Cardinal sCardinal sRack carla_host_plugin - carla_engine_plugin - carla_plugin - native_plugins - audio_decoder - jackbridge - lilv - rtmempool - sfzero - water - ysfx - zita_resampler dgl surgedep01 surgedep02 @@ -296,17 +252,6 @@ target_link_libraries(CardinalFX sCardinalFX sRack carla_host_plugin - carla_engine_plugin - carla_plugin - native_plugins - audio_decoder - jackbridge - lilv - rtmempool - sfzero - water - ysfx - zita_resampler dgl surgedep01 surgedep02 @@ -398,17 +343,6 @@ target_link_libraries(CardinalMIDI sCardinalFX sRack carla_host_plugin - carla_engine_plugin - carla_plugin - native_plugins - audio_decoder - jackbridge - lilv - rtmempool - sfzero - water - ysfx - zita_resampler dgl surgedep01 surgedep02 @@ -500,17 +434,6 @@ target_link_libraries(CardinalSynth sCardinalSynth sRack carla_host_plugin - carla_engine_plugin - carla_plugin - native_plugins - audio_decoder - jackbridge - lilv - rtmempool - sfzero - water - ysfx - zita_resampler dgl surgedep01 surgedep02 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 8d2f687c..ce80d650 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -25,31 +25,8 @@ ifneq ($(CARDINAL_VARIANT),mini) ifneq ($(STATIC_BUILD),true) STATIC_PLUGIN_TARGET = true - -CWD = ../../carla/source -include $(CWD)/Makefile.deps.mk - -CARLA_BUILD_DIR = ../../carla/build -ifeq ($(DEBUG),true) -CARLA_BUILD_TYPE = Debug -else -CARLA_BUILD_TYPE = Release -endif - -CARLA_EXTRA_LIBS = $(CARLA_BUILD_DIR)/plugin/$(CARLA_BUILD_TYPE)/carla-host-plugin.cpp.o -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_engine_plugin.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_plugin.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/native-plugins.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/audio_decoder.a -ifneq ($(WASM),true) -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/jackbridge.min.a -endif -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/sfzero.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a +CARLA_EXTRA_LIBS = ../../carla/bin/libcarla_host-plugin.a +include ../../carla/source/Makefile.deps.mk endif # STATIC_BUILD endif # CARDINAL_VARIANT mini From e2ed1e02d252759aa1949bc4fe4ed3e99ef409b8 Mon Sep 17 00:00:00 2001 From: Don Cross Date: Sun, 12 Mar 2023 18:54:50 -0400 Subject: [PATCH 297/451] Sapphire v 2.2.2: Added new module Tube Unit. --- plugins/Sapphire | 2 +- plugins/plugins.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Sapphire b/plugins/Sapphire index b30d2074..2d374e22 160000 --- a/plugins/Sapphire +++ b/plugins/Sapphire @@ -1 +1 @@ -Subproject commit b30d20745dd028961b0047b506d560ed48f2656c +Subproject commit 2d374e2222475aa4207aec8c541716ed467e2619 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 9e2b2aaf..429cbe37 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -2739,6 +2739,7 @@ static void initStatic__Sapphire() { p->addModel(modelElastika); p->addModel(modelMoots); + p->addModel(modelTubeUnit); } } From ffbb543b68c152e722236e893d5153edabdcd206 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 6 Apr 2023 14:55:43 +0200 Subject: [PATCH 298/451] Update dpf and carla Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 5d0d243b..6cdd0e71 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 5d0d243be13e2088e2c82d4d0bcc947edcd1b64d +Subproject commit 6cdd0e71a33bd22aacbe5890f17dcdf14606bd68 diff --git a/dpf b/dpf index 90004b0d..ef960c26 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 90004b0d43875c3754142114112148b593615352 +Subproject commit ef960c26f3ba684b7ec46cf874be53698cefbeda From ba9ad5f2e5d1108ed56855c668505b08120a76ef Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 6 Apr 2023 15:15:28 +0200 Subject: [PATCH 299/451] Invert scroll X direction Signed-off-by: falkTX --- src/CardinalUI.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index 9e584ecd..acdf923b 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -974,9 +974,9 @@ class CardinalUI : public CardinalBaseUI, switch (ev.button) { - case 1: button = GLFW_MOUSE_BUTTON_LEFT; break; - case 2: button = GLFW_MOUSE_BUTTON_RIGHT; break; - case 3: button = GLFW_MOUSE_BUTTON_MIDDLE; break; + case kMouseButtonLeft: button = GLFW_MOUSE_BUTTON_LEFT; break; + case kMouseButtonRight: button = GLFW_MOUSE_BUTTON_RIGHT; break; + case kMouseButtonMiddle: button = GLFW_MOUSE_BUTTON_MIDDLE; break; default: button = ev.button; break; @@ -1020,7 +1020,7 @@ class CardinalUI : public CardinalBaseUI, if (inSelfTest) return false; #endif - rack::math::Vec scrollDelta = rack::math::Vec(ev.delta.getX(), ev.delta.getY()); + rack::math::Vec scrollDelta = rack::math::Vec(-ev.delta.getX(), ev.delta.getY()); #ifndef DISTRHO_OS_MAC scrollDelta = scrollDelta.mult(50.0); #endif From b51041ac485417ceb50e284da4aa8660961ee4fc Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 18 Mar 2023 18:54:25 -0700 Subject: [PATCH 300/451] reinit random in case it was initialized on another thread --- src/override/Engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index 64de4c6a..2a9deebd 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -758,6 +758,8 @@ void Engine::addModule(Module* module) { DISTRHO_SAFE_ASSERT_RETURN(it == internal->modules.end(),); auto tit = std::find(internal->terminalModules.begin(), internal->terminalModules.end(), module); DISTRHO_SAFE_ASSERT_RETURN(tit == internal->terminalModules.end(),); + // Reinitialize random module since it uses thread-local RNG state + random::init(); // Set ID if unset or collides with an existing ID while (module->id < 0 || internal->modulesCache.find(module->id) != internal->modulesCache.end()) { // Randomly generate ID @@ -1003,6 +1005,8 @@ void Engine::addCable(Cable* cable) { if (cable2->outputModule == cable->outputModule && cable2->outputId == cable->outputId) outputWasConnected = true; } + // Reinitialize random module since it uses thread-local RNG state + random::init(); // Set ID if unset or collides with an existing ID while (cable->id < 0 || internal->cablesCache.find(cable->id) != internal->cablesCache.end()) { // Randomly generate ID From e463fa4dfb146be76244b3fe0938cb015eb1ede9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 6 Apr 2023 15:51:21 +0200 Subject: [PATCH 301/451] Cleanup for things moved into DPF Signed-off-by: falkTX --- .github/workflows/build.yml | 6 +++--- carla | 2 +- src/Makefile.cardinal.mk | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a8ffef6..8c64bc5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -801,7 +801,7 @@ jobs: source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd make features - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true -j $(nproc) - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | @@ -888,8 +888,8 @@ jobs: # FIXME send patch upstream, assuming this works.. sed -i -e 's/defined(__riscv)/defined(__riscv) || defined(__EMSCRIPTEN__)/' plugins/surgext/surge/src/common/globals.h make features - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) - make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui + make CIBUILD=true HAVE_LIBLO=false NOOPT=true -j $(nproc) + make CIBUILD=true HAVE_LIBLO=false NOOPT=true -j $(nproc) -C src/CardinalMiniSep modgui - name: Make wasm-noopt versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | diff --git a/carla b/carla index 6cdd0e71..56468b47 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 6cdd0e71a33bd22aacbe5890f17dcdf14606bd68 +Subproject commit 56468b473205185bf120619c23b3d594513f4b7b diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index ce80d650..843fa1ab 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -157,7 +157,7 @@ endif # -------------------------------------------------------------- # FIXME -ifeq ($(CARDINAL_VARIANT)$(CIBUILD)$(WASM),nativetruetrue) +ifeq ($(CARDINAL_VARIANT)$(WASM),nativetrue) ifneq ($(OLD_PATH),) STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm endif @@ -170,7 +170,7 @@ ifneq ($(CARDINAL_VARIANT),mini) ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true) EXTRA_DSP_DEPENDENCIES += ../../deps/aubio/libaubio.a EXTRA_DSP_LIBS += ../../deps/aubio/libaubio.a -EXTRA_DSP_LIBS += $(shell $(PKG_CONFIG) --libs fftw3f) +EXTRA_DSP_LIBS += $(filter-out -lpthread,$(shell $(PKG_CONFIG) --libs fftw3f)) endif endif @@ -521,8 +521,6 @@ endif ifeq ($(WINDOWS),true) WINDRES ?= $(subst gcc,windres,$(CC)) -JACK_LIBS += -Wl,-subsystem,windows - $(BUILD_DIR)/distrho.rc.o: ../../utils/distrho.rc ../../utils/distrho.ico -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling distrho.rc" From 6d8a2c1970895be4aad34717a8a1416a99ebd83b Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 6 Apr 2023 15:55:03 +0200 Subject: [PATCH 302/451] Fix menubar cpu usage not showing on regular builds Signed-off-by: falkTX --- src/override/MenuBar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 7304d62e..f8fdcb2b 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -769,11 +769,11 @@ struct MeterLabel : ui::Label { // } #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS - text = string::f("%.1f fps", 1.0 / frameDurationAvg); -#else double meterAverage = APP->engine->getMeterAverage(); double meterMax = APP->engine->getMeterMax(); text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100); +#else + text = string::f("%.1f fps", 1.0 / frameDurationAvg); #endif Label::step(); From 3b47704e1921157914e5576b4e4165101df192fc Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 6 Apr 2023 19:08:57 +0200 Subject: [PATCH 303/451] Fix typo Signed-off-by: falkTX --- dpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpf b/dpf index ef960c26..784309eb 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit ef960c26f3ba684b7ec46cf874be53698cefbeda +Subproject commit 784309eba858176d006182566bed4bc91eb7a069 From 3f024a0d61dd0761d4143349d624c93a16ebb4cd Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 7 Apr 2023 00:43:21 +0200 Subject: [PATCH 304/451] workaround mingw linker bug Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 843fa1ab..29ea0551 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -25,9 +25,32 @@ ifneq ($(CARDINAL_VARIANT),mini) ifneq ($(STATIC_BUILD),true) STATIC_PLUGIN_TARGET = true -CARLA_EXTRA_LIBS = ../../carla/bin/libcarla_host-plugin.a include ../../carla/source/Makefile.deps.mk +ifneq ($(WINDOWS),true) +CARLA_EXTRA_LIBS = ../../carla/bin/libcarla_host-plugin.a +else +# workaround mingw linker bug +CARLA_BUILD_DIR = ../../carla/build +ifeq ($(DEBUG),true) +CARLA_BUILD_TYPE = Debug +else +CARLA_BUILD_TYPE = Release +endif +CARLA_EXTRA_LIBS = $(CARLA_BUILD_DIR)/plugin/$(CARLA_BUILD_TYPE)/carla-host-plugin.cpp.o +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_engine_plugin.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_plugin.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/native-plugins.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/audio_decoder.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/jackbridge.min.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/sfzero.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a +CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a +endif + endif # STATIC_BUILD endif # CARDINAL_VARIANT mini From 59e3d5a6d4b91ae51305cad9d2d62646d575ef98 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 15 Apr 2023 16:35:48 +0200 Subject: [PATCH 305/451] Always use verbose carla linkage Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- src/Makefile.cardinal.mk | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/carla b/carla index 56468b47..04d3e126 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 56468b473205185bf120619c23b3d594513f4b7b +Subproject commit 04d3e126b48aef0689e97816efb3b817319cc388 diff --git a/dpf b/dpf index 784309eb..5b767058 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 784309eba858176d006182566bed4bc91eb7a069 +Subproject commit 5b7670584d16e76a27cf0d6575b8bf9921de2714 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 29ea0551..9598e585 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -27,10 +27,6 @@ ifneq ($(STATIC_BUILD),true) STATIC_PLUGIN_TARGET = true include ../../carla/source/Makefile.deps.mk -ifneq ($(WINDOWS),true) -CARLA_EXTRA_LIBS = ../../carla/bin/libcarla_host-plugin.a -else -# workaround mingw linker bug CARLA_BUILD_DIR = ../../carla/build ifeq ($(DEBUG),true) CARLA_BUILD_TYPE = Debug @@ -49,7 +45,6 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/sfzero.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a -endif endif # STATIC_BUILD endif # CARDINAL_VARIANT mini From effc7d910ecfe1a3b0105c75b97ce0cce85599d5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 15 Apr 2023 18:01:11 +0200 Subject: [PATCH 306/451] Fix windows and macOS builds Signed-off-by: falkTX --- carla | 2 +- jucewrapper/CMakeLists.txt | 79 +++++++++++++++++++++++++++++++++++++- 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 04d3e126..6f22f09d 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 04d3e126b48aef0689e97816efb3b817319cc388 +Subproject commit 6f22f09d230236d2a8bbdd662d46146d81b318b1 diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 3d344ba4..5fec6cdb 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -14,7 +14,40 @@ add_library(dgl STATIC IMPORTED) set_property(TARGET dgl PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../dpf/build/libdgl-opengl.a") add_library(carla_host_plugin STATIC IMPORTED) -set_property(TARGET carla_host_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/bin/libcarla_host-plugin.a") +set_property(TARGET carla_host_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/plugin/${CMAKE_BUILD_TYPE}/carla-host-plugin.cpp.o") + +add_library(carla_engine_plugin STATIC IMPORTED) +set_property(TARGET carla_engine_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/carla_engine_plugin.a") + +add_library(carla_plugin STATIC IMPORTED) +set_property(TARGET carla_plugin PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/carla_plugin.a") + +add_library(native_plugins STATIC IMPORTED) +set_property(TARGET native_plugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/native-plugins.a") + +add_library(audio_decoder STATIC IMPORTED) +set_property(TARGET audio_decoder PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/audio_decoder.a") + +add_library(jackbridge STATIC IMPORTED) +set_property(TARGET jackbridge PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/jackbridge.min.a") + +add_library(lilv STATIC IMPORTED) +set_property(TARGET lilv PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/lilv.a") + +add_library(rtmempool STATIC IMPORTED) +set_property(TARGET rtmempool PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/rtmempool.a") + +add_library(sfzero STATIC IMPORTED) +set_property(TARGET sfzero PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/sfzero.a") + +add_library(water STATIC IMPORTED) +set_property(TARGET water PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/water.a") + +add_library(ysfx STATIC IMPORTED) +set_property(TARGET ysfx PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/ysfx.a") + +add_library(zita_resampler STATIC IMPORTED) +set_property(TARGET zita_resampler PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/zita-resampler.a") add_library(sCardinal STATIC IMPORTED) set_property(TARGET sCardinal PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/Cardinal.a") @@ -160,6 +193,17 @@ target_link_libraries(Cardinal sCardinal sRack carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + ysfx + zita_resampler dgl surgedep01 surgedep02 @@ -252,6 +296,17 @@ target_link_libraries(CardinalFX sCardinalFX sRack carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + ysfx + zita_resampler dgl surgedep01 surgedep02 @@ -343,6 +398,17 @@ target_link_libraries(CardinalMIDI sCardinalFX sRack carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + ysfx + zita_resampler dgl surgedep01 surgedep02 @@ -434,6 +500,17 @@ target_link_libraries(CardinalSynth sCardinalSynth sRack carla_host_plugin + carla_engine_plugin + carla_plugin + native_plugins + audio_decoder + jackbridge + lilv + rtmempool + sfzero + water + ysfx + zita_resampler dgl surgedep01 surgedep02 From f1f7d968df2dadec2a8025f971436249e230252a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 15 Apr 2023 19:56:59 +0200 Subject: [PATCH 307/451] Use the correct DGL namespace for extra windows build details Signed-off-by: falkTX --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c64bc5a..b42a3611 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -987,8 +987,8 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win32; popd make carla-win32 -j $(nproc) - make -C carla EMBED_TARGET=true TESTING=true dist - make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist + make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist - name: Build win32 cross-compiled (packaging) if: steps.cache.outputs.cache-hit == 'true' run: | @@ -1083,8 +1083,8 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win64; popd make carla-win32 -j $(nproc) - make -C carla EMBED_TARGET=true TESTING=true dist - make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist + make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) if: steps.cache.outputs.cache-hit == 'true' run: | From a42ca2c5df52f9d300f0e712465cf8082e46d133 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 15 Apr 2023 22:16:11 +0200 Subject: [PATCH 308/451] Really fix windows build Signed-off-by: falkTX --- .github/workflows/build.yml | 8 ++++---- Makefile | 2 ++ carla | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b42a3611..8c64bc5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -987,8 +987,8 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win32; popd make carla-win32 -j $(nproc) - make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist - make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win32 cross-compiled (packaging) if: steps.cache.outputs.cache-hit == 'true' run: | @@ -1083,8 +1083,8 @@ jobs: export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win64; popd make carla-win32 -j $(nproc) - make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist - make -C carla DGL_NAMESPACE=CardinalDGL EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist + make -C carla EMBED_TARGET=true TESTING=true dist - name: Build win64 cross-compiled (packaging) if: steps.cache.outputs.cache-hit == 'true' run: | diff --git a/Makefile b/Makefile index 92f311d6..c18ae9f4 100644 --- a/Makefile +++ b/Makefile @@ -172,6 +172,7 @@ ifneq ($(STATIC_BUILD),true) $(MAKE) all -C carla $(CARLA_EXTRA_ARGS) \ CAN_GENERATE_LV2_TTL=false \ CUSTOM_DPF_PATH=$(CURDIR)/dpf \ + DGL_NAMESPACE=CardinalDGL \ HAVE_FRONTEND=true \ HAVE_PYQT=true \ HAVE_QT5=true \ @@ -182,6 +183,7 @@ ifeq ($(CPU_X86_64),true) $(MAKE) win32r -C carla $(CARLA_EXTRA_ARGS) \ CAN_GENERATE_LV2_TTL=false \ CUSTOM_DPF_PATH=$(CURDIR)/dpf \ + DGL_NAMESPACE=CardinalDGL \ HAVE_FRONTEND=true \ HAVE_PYQT=true \ HAVE_QT5=true \ diff --git a/carla b/carla index 6f22f09d..cf11562c 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 6f22f09d230236d2a8bbdd662d46146d81b318b1 +Subproject commit cf11562c505407f12a6e6d085ca448fefd7399ba From 23526829960a273433b7203137de70c3faa870cc Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 18 Apr 2023 13:11:28 +0200 Subject: [PATCH 309/451] Reenable LTO for testing Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c64bc5a..1ce5494f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: true - WITH_LTO: false + WITH_LTO: true jobs: linux-arm64: From bcf65a12d2536357748f110074e37a6375cb662f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 17 Apr 2023 00:16:55 +0200 Subject: [PATCH 310/451] Bump version Signed-off-by: falkTX --- Makefile | 2 +- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c18ae9f4..d5b371bb 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 23.02 +VERSION = 23.04 # -------------------------------------------------------------- # Import base definitions diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 5fec6cdb..9d97a5e9 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 23.02) +project(Cardinal VERSION 23.04) add_subdirectory(JUCE) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 072552da..cc15d568 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -106,7 +106,7 @@ void destroyStaticPlugins(); } } -const std::string CARDINAL_VERSION = "23.02"; +const std::string CARDINAL_VERSION = "23.04"; START_NAMESPACE_DISTRHO diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 3a32d444..3ae25262 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -357,7 +357,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 23, 2); + return d_version(0, 23, 4); } int64_t getUniqueId() const override From 1ce27708d146db8acce45f20e5452062f058448e Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 20 Apr 2023 20:08:34 +0200 Subject: [PATCH 311/451] Revert "Reenable LTO for testing" This reverts commit 23526829960a273433b7203137de70c3faa870cc. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ce5494f..8c64bc5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: true - WITH_LTO: true + WITH_LTO: false jobs: linux-arm64: From 5555e22d43177c92e4294d55fb054872881e7b17 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 20 Apr 2023 20:10:40 +0200 Subject: [PATCH 312/451] Add inno bits for picking VST2 folder location Signed-off-by: falkTX --- utils/inno/win32.iss | 60 +++++++++++++++++++++++++++++++++++++++++++- utils/inno/win64.iss | 60 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/utils/inno/win32.iss b/utils/inno/win32.iss index f5d992f8..0aba6d39 100644 --- a/utils/inno/win32.iss +++ b/utils/inno/win32.iss @@ -56,7 +56,7 @@ Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf32}\LV2\Cardinal.lv2"; Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; Source: "..\..\bin\CardinalSynth.lv2\*.*"; DestDir: "{commoncf32}\LV2\CardinalSynth.lv2"; Components: lv2; Flags: ignoreversion; ; vst2 -Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf32}\VST2\Cardinal.vst"; Components: vst2; Flags: ignoreversion; +Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{code:GetVST2Dir}\Cardinal.vst"; Components: vst2; Flags: ignoreversion; ; vst3 Source: "..\..\bin\Cardinal.vst3\Contents\x86-win\Cardinal.vst3"; DestDir: "{commoncf32}\VST3\Cardinal.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.vst3\Contents\x86-win\CardinalFX.vst3"; DestDir: "{commoncf32}\VST3\CardinalFX.vst3\Contents\x86-win"; Components: vst3; Flags: ignoreversion; @@ -67,3 +67,61 @@ Source: "..\..\bin\Cardinal.clap\*.*"; DestDir: "{commoncf32}\CLAP\Cardinal.clap [Icons] Name: "{commonprograms}\Cardinal (JACK)"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (JACK variant)"; Components: jack; Name: "{commonprograms}\Cardinal (Native)"; Filename: "{app}\CardinalNative.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (Native variant)"; Components: native; + +; based on https://www.kvraudio.com/forum/viewtopic.php?t=501615 +[Code] +var + VST2DirPage: TInputDirWizardPage; + TypesComboOnChangePrev: TNotifyEvent; +procedure ComponentsListCheckChanges; +begin + WizardForm.NextButton.Enabled := (WizardSelectedComponents(False) <> ''); +end; +procedure ComponentsListClickCheck(Sender: TObject); +begin + ComponentsListCheckChanges; +end; +procedure TypesComboOnChange(Sender: TObject); +begin + TypesComboOnChangePrev(Sender); + ComponentsListCheckChanges; +end; +procedure InitializeWizard; +begin + WizardForm.ComponentsList.OnClickCheck := @ComponentsListClickCheck; + TypesComboOnChangePrev := WizardForm.TypesCombo.OnChange; + WizardForm.TypesCombo.OnChange := @TypesComboOnChange; + VST2DirPage := CreateInputDirPage(wpSelectComponents, + 'Confirm VST2 Plugin Directory', '', + 'Select the folder in which setup should install the VST2 Plugin, then click Next.', + False, ''); + VST2DirPage.Add('VST2 Plugin Directory'); + VST2DirPage.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{commonpf32}\VSTPlugins}'); +end; +procedure CurPageChanged(CurPageID: Integer); +begin + if CurPageID = VST2DirPage.ID then + begin + VST2DirPage.Buttons[0].Enabled := WizardIsComponentSelected('vst2'); + VST2DirPage.PromptLabels[0].Enabled := VST2DirPage.Buttons[0].Enabled; + VST2DirPage.Edits[0].Enabled := VST2DirPage.Buttons[0].Enabled; + end; + if CurPageID = wpSelectComponents then + begin + ComponentsListCheckChanges; + end; +end; +function ShouldSkipPage(PageID: Integer): Boolean; +begin + if PageID = VST2DirPage.ID then + begin + If (not WizardIsComponentSelected('vst2'))then + begin + Result := True + end; + end; +end; +function GetVST2Dir(Param: string): string; +begin + Result := VST2DirPage.Values[0]; +end; diff --git a/utils/inno/win64.iss b/utils/inno/win64.iss index 8370de8c..b840f7ba 100644 --- a/utils/inno/win64.iss +++ b/utils/inno/win64.iss @@ -57,7 +57,7 @@ Source: "..\..\bin\Cardinal.lv2\*.*"; DestDir: "{commoncf64}\LV2\Cardinal.lv2"; Source: "..\..\bin\CardinalFX.lv2\*.*"; DestDir: "{commoncf64}\LV2\CardinalFX.lv2"; Components: lv2; Flags: ignoreversion; Source: "..\..\bin\CardinalSynth.lv2\*.*"; DestDir: "{commoncf64}\LV2\CardinalSynth.lv2"; Components: lv2; Flags: ignoreversion; ; vst2 -Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{commoncf64}\VST2\Cardinal.vst"; Components: vst2; Flags: ignoreversion; +Source: "..\..\bin\Cardinal.vst\*.*"; DestDir: "{code:GetVST2Dir}\Cardinal.vst"; Components: vst2; Flags: ignoreversion; ; vst3 Source: "..\..\bin\Cardinal.vst3\Contents\x86_64-win\Cardinal.vst3"; DestDir: "{commoncf64}\VST3\Cardinal.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; Source: "..\..\bin\CardinalFX.vst3\Contents\x86_64-win\CardinalFX.vst3"; DestDir: "{commoncf64}\VST3\CardinalFX.vst3\Contents\x86_64-win"; Components: vst3; Flags: ignoreversion; @@ -68,3 +68,61 @@ Source: "..\..\bin\Cardinal.clap\*.*"; DestDir: "{commoncf64}\CLAP\Cardinal.clap [Icons] Name: "{commonprograms}\Cardinal (JACK)"; Filename: "{app}\Cardinal.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (JACK variant)"; Components: jack; Name: "{commonprograms}\Cardinal (Native)"; Filename: "{app}\CardinalNative.exe"; IconFilename: "{app}\distrho.ico"; WorkingDir: "{app}"; Comment: "Virtual modular synthesizer plugin (Native variant)"; Components: native; + +; based on https://www.kvraudio.com/forum/viewtopic.php?t=501615 +[Code] +var + VST2DirPage: TInputDirWizardPage; + TypesComboOnChangePrev: TNotifyEvent; +procedure ComponentsListCheckChanges; +begin + WizardForm.NextButton.Enabled := (WizardSelectedComponents(False) <> ''); +end; +procedure ComponentsListClickCheck(Sender: TObject); +begin + ComponentsListCheckChanges; +end; +procedure TypesComboOnChange(Sender: TObject); +begin + TypesComboOnChangePrev(Sender); + ComponentsListCheckChanges; +end; +procedure InitializeWizard; +begin + WizardForm.ComponentsList.OnClickCheck := @ComponentsListClickCheck; + TypesComboOnChangePrev := WizardForm.TypesCombo.OnChange; + WizardForm.TypesCombo.OnChange := @TypesComboOnChange; + VST2DirPage := CreateInputDirPage(wpSelectComponents, + 'Confirm VST2 Plugin Directory', '', + 'Select the folder in which setup should install the VST2 Plugin, then click Next.', + False, ''); + VST2DirPage.Add('VST2 Plugin Directory'); + VST2DirPage.Values[0] := ExpandConstant('{reg:HKLM\SOFTWARE\VST,VSTPluginsPath|{commonpf64}\VSTPlugins}'); +end; +procedure CurPageChanged(CurPageID: Integer); +begin + if CurPageID = VST2DirPage.ID then + begin + VST2DirPage.Buttons[0].Enabled := WizardIsComponentSelected('vst2'); + VST2DirPage.PromptLabels[0].Enabled := VST2DirPage.Buttons[0].Enabled; + VST2DirPage.Edits[0].Enabled := VST2DirPage.Buttons[0].Enabled; + end; + if CurPageID = wpSelectComponents then + begin + ComponentsListCheckChanges; + end; +end; +function ShouldSkipPage(PageID: Integer): Boolean; +begin + if PageID = VST2DirPage.ID then + begin + If (not WizardIsComponentSelected('vst2'))then + begin + Result := True + end; + end; +end; +function GetVST2Dir(Param: string): string; +begin + Result := VST2DirPage.Values[0]; +end; From 150053d11c657808e9d369e0debaf53ba79b8973 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Apr 2023 16:48:16 +0200 Subject: [PATCH 313/451] CI: Never build with LTO enabled Signed-off-by: falkTX --- .github/workflows/build.yml | 106 +++++++++++++----------------------- 1 file changed, 39 insertions(+), 67 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c64bc5a..74254136 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,12 @@ on: [push, pull_request] env: CACHE_VERSION: 2 CARDINAL_UNDER_WINE: 1 + CIBUILD: true EMSCRIPTEN_VERSION: 3.1.27 DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: true - WITH_LTO: false + PAWPAW_SKIP_LTO: 1 jobs: linux-arm64: @@ -33,7 +34,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: linux-arm64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: linux-arm64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list @@ -53,21 +54,19 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-linux-arm64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-linux-arm64-v${{ env.CACHE_VERSION }} - name: Build extra dependencies env: PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64 - name: Build linux arm64 cross-compiled run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env linux-aarch64; popd export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/aarch64-linux-gnu/pkgconfig make features - make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -114,7 +113,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: linux-armhf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: linux-armhf-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list @@ -134,21 +133,19 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-linux-armhf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-linux-armhf-v${{ env.CACHE_VERSION }} - name: Build extra dependencies env: PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf - name: Build linux armhf cross-compiled run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env linux-armhf; popd export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/arm-linux-gnueabihf/pkgconfig make features - make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -195,7 +192,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: linux-i686-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: linux-i686-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list @@ -211,21 +208,19 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-linux-i686-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-linux-i686-v${{ env.CACHE_VERSION }} - name: Build extra dependencies env: PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686 - name: Build linux i686 run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env linux-i686; popd export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/i386-linux-gnu/pkgconfig make features - make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -272,7 +267,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: linux-riscv64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: linux-riscv64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list @@ -293,21 +288,19 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-linux-riscv64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-linux-riscv64-v${{ env.CACHE_VERSION }} - name: Build extra dependencies env: PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh linux-riscv64 && ./deps/PawPaw/.cleanup.sh linux-riscv64 - name: Build linux riscv64 cross-compiled run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env linux-riscv64; popd export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/riscv64-linux-gnu/pkgconfig make features - make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -354,7 +347,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: linux-x86_64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: linux-x86_64-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -363,19 +356,17 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-linux-x86_64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-linux-x86_64-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux - name: Build linux x86_64 run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env linux; popd export PATH="/usr/lib/ccache:${PATH}" export PKG_CONFIG_PATH+=:/usr/lib/x86_64-linux-gnu/pkgconfig make features - make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -487,29 +478,26 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: macos-intel-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/local/opt/ccache/libexec:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos - name: Set up ccache if: steps.cache.outputs.cache-hit == 'true' uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-macos-intel-v${{ env.CACHE_VERSION }} - name: Build macOS intel (base) if: steps.cache.outputs.cache-hit == 'true' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/local/opt/ccache/libexec:${PATH}" pushd deps/PawPaw; source local.env macos; popd make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu) + make NOOPT=true -j $(sysctl -n hw.logicalcpu) - name: Build macOS intel (AU using juce) if: steps.cache.outputs.cache-hit == 'true' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi pushd deps/PawPaw; source local.env macos; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h @@ -572,7 +560,6 @@ jobs: key: macos-universal-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - export PAWPAW_SKIP_LTO=1 export PATH="/usr/local/opt/ccache/libexec:${PATH}" ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal - name: Set up ccache @@ -582,18 +569,14 @@ jobs: key: ccache-macos-universal-v${{ env.CACHE_VERSION }} - name: Build macOS universal (base) if: steps.cache.outputs.cache-hit == 'true' - env: - WITH_LTO: false run: | - export PAWPAW_SKIP_LTO=1 export PATH="/usr/local/opt/ccache/libexec:${PATH}" pushd deps/PawPaw; source local.env macos-universal; popd make features - make CIBUILD=true NOOPT=true -j $(sysctl -n hw.logicalcpu) + make NOOPT=true -j $(sysctl -n hw.logicalcpu) - name: Build macOS universal (AU using juce) if: steps.cache.outputs.cache-hit == 'true' run: | - export PAWPAW_SKIP_LTO=1 pushd deps/PawPaw; source local.env macos-universal; popd git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE mkdir -p jucewrapper/build @@ -643,7 +626,7 @@ jobs: with: path: | ~/mod-workdir - key: modduo-static-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: modduo-static-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -659,8 +642,8 @@ jobs: - name: Build for modduo if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make CIBUILD=true HEADLESS=true modduo-features - make CIBUILD=true HEADLESS=true MODDUO=true WITH_LTO=${{ env.WITH_LTO }} modduo -j $(nproc) + make HEADLESS=true modduo-features + make HEADLESS=true MODDUO=true modduo -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -686,7 +669,7 @@ jobs: with: path: | ~/mod-workdir - key: modduox-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: modduox-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -702,8 +685,8 @@ jobs: - name: Build for modduox if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make CIBUILD=true HEADLESS=true modduox-features - make CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} modduox -j $(nproc) + make HEADLESS=true modduox-features + make HEADLESS=true modduox -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -729,7 +712,7 @@ jobs: with: path: | ~/mod-workdir - key: moddwarf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: moddwarf-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -745,8 +728,8 @@ jobs: - name: Build for moddwarf if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make CIBUILD=true HEADLESS=true moddwarf-features - make CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} moddwarf -j $(nproc) + make HEADLESS=true moddwarf-features + make HEADLESS=true moddwarf -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV @@ -795,13 +778,11 @@ jobs: ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm - name: Build wasm cross-compiled if: steps.cache.outputs.cache-hit == 'true' - env: - WITH_LTO: false run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd make features - make CIBUILD=true HAVE_LIBLO=false NOOPT=true -j $(nproc) + make HAVE_LIBLO=false NOOPT=true -j $(nproc) - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | @@ -881,15 +862,14 @@ jobs: env: PAWPAW_NOSIMD: 1 NOSIMD: true - WITH_LTO: false run: | source ~/PawPawBuilds/emsdk/emsdk_env.sh pushd deps/PawPaw; source local.env wasm; popd # FIXME send patch upstream, assuming this works.. sed -i -e 's/defined(__riscv)/defined(__riscv) || defined(__EMSCRIPTEN__)/' plugins/surgext/surge/src/common/globals.h make features - make CIBUILD=true HAVE_LIBLO=false NOOPT=true -j $(nproc) - make CIBUILD=true HAVE_LIBLO=false NOOPT=true -j $(nproc) -C src/CardinalMiniSep modgui + make HAVE_LIBLO=false NOOPT=true -j $(nproc) + make HAVE_LIBLO=false NOOPT=true -j $(nproc) -C src/CardinalMiniSep modgui - name: Make wasm-noopt versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | @@ -950,7 +930,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: win32-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: win32-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list @@ -967,23 +947,20 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-win32-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-win32-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32 - name: Build win32 cross-compiled (base) if: steps.cache.outputs.cache-hit == 'true' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win32; popd make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make NOOPT=true -j $(nproc) - name: Build win32 cross-compiled (carla) if: steps.cache.outputs.cache-hit == 'true' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win32; popd make carla-win32 -j $(nproc) @@ -1046,7 +1023,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: win64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: win64-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list @@ -1063,23 +1040,20 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-win64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }} + key: ccache-win64-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64 - name: Build win64 cross-compiled (base) if: steps.cache.outputs.cache-hit == 'true' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win64; popd make features - make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc) + make NOOPT=true -j $(nproc) - name: Build win64 cross-compiled (carla) if: steps.cache.outputs.cache-hit == 'true' run: | - if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi export PATH="/usr/lib/ccache:${PATH}" pushd deps/PawPaw; source local.env win64; popd make carla-win32 -j $(nproc) @@ -1199,7 +1173,6 @@ jobs: CFLAGS: -g CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions LDFLAGS: -static-libgcc -static-libstdc++ - WITH_LTO: false run: | make features make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc) @@ -1209,7 +1182,6 @@ jobs: CFLAGS: -g CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions LDFLAGS: -static-libgcc -static-libstdc++ - WITH_LTO: false run: | make features make NOOPT=true SKIP_STRIPPING=true -j 1 -C src jack From 344dec5d317d6a02640fee8b78e9b99afd7f67e6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Apr 2023 17:28:46 +0200 Subject: [PATCH 314/451] Make CI workflow templated, so it is easier to maintain Signed-off-by: falkTX --- .github/workflows/build.yml | 576 +++++------------------------- utils/create-windows-installer.sh | 16 +- 2 files changed, 107 insertions(+), 485 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74254136..34e774cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,13 +13,16 @@ env: PAWPAW_SKIP_LTO: 1 jobs: - linux-arm64: + linux: + strategy: + matrix: + target: [aarch64, armhf, i386, riscv64, x86_64] runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Set up cache + - name: Set up build cache id: cache uses: actions/cache@v3 with: @@ -34,14 +37,17 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: linux-arm64-v${{ env.CACHE_VERSION }} + key: linux-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal + sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 sudo apt-get clean - - name: Set up dependencies + - name: Setup dependencies (aarch64) + if: ${{ matrix.target == 'aarch64' }} + shell: bash run: | sudo dpkg --add-architecture arm64 sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list @@ -51,76 +57,9 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 gperf qemu-user-static sudo apt-get clean - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-linux-arm64-v${{ env.CACHE_VERSION }} - - name: Build extra dependencies - env: - PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig - run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64 - - name: Build linux arm64 cross-compiled - run: | - pushd deps/PawPaw; source local.env linux-aarch64; popd - export PATH="/usr/lib/ccache:${PATH}" - export PKG_CONFIG_PATH+=:/usr/lib/aarch64-linux-gnu/pkgconfig - make features - make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) - make unzipfx - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.tar.gz - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.tar.gz - - linux-armhf: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: linux-armhf-v${{ env.CACHE_VERSION }} - - name: Fix GitHub's mess - run: | - sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list - sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal - sudo apt-get clean - - name: Set up dependencies + - name: Setup dependencies (armhf) + if: ${{ matrix.target == 'armhf' }} + shell: bash run: | sudo dpkg --add-architecture armhf sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list @@ -130,152 +69,17 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf qemu-user-static sudo apt-get clean - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-linux-armhf-v${{ env.CACHE_VERSION }} - - name: Build extra dependencies - env: - PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig - run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf - - name: Build linux armhf cross-compiled - run: | - pushd deps/PawPaw; source local.env linux-armhf; popd - export PATH="/usr/lib/ccache:${PATH}" - export PKG_CONFIG_PATH+=:/usr/lib/arm-linux-gnueabihf/pkgconfig - make features - make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) - make unzipfx - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.tar.gz - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.tar.gz - - linux-i686: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: linux-i686-v${{ env.CACHE_VERSION }} - - name: Fix GitHub's mess - run: | - sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list - sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal - sudo apt-get clean - - name: Set up dependencies + - name: Setup dependencies (i386) + if: ${{ matrix.target == 'i386' }} + shell: bash run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 gperf sudo apt-get clean - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-linux-i686-v${{ env.CACHE_VERSION }} - - name: Build extra dependencies - env: - PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig - run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686 - - name: Build linux i686 - run: | - pushd deps/PawPaw; source local.env linux-i686; popd - export PATH="/usr/lib/ccache:${PATH}" - export PKG_CONFIG_PATH+=:/usr/lib/i386-linux-gnu/pkgconfig - make features - make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) - make unzipfx - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.tar.gz - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.tar.gz - - linux-riscv64: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: linux-riscv64-v${{ env.CACHE_VERSION }} - - name: Fix GitHub's mess - run: | - sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list - sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal - sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4 - sudo apt-get clean - - name: Set up dependencies + - name: Setup dependencies (riscv64) + if: ${{ matrix.target == 'riscv64' }} + shell: bash run: | sudo dpkg --add-architecture riscv64 sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list @@ -285,70 +89,9 @@ jobs: sudo apt-get update -qq sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 gperf qemu-user-static sudo apt-get clean - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-linux-riscv64-v${{ env.CACHE_VERSION }} - - name: Build extra dependencies - env: - PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig - run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux-riscv64 && ./deps/PawPaw/.cleanup.sh linux-riscv64 - - name: Build linux riscv64 cross-compiled - run: | - pushd deps/PawPaw; source local.env linux-riscv64; popd - export PATH="/usr/lib/ccache:${PATH}" - export PKG_CONFIG_PATH+=:/usr/lib/riscv64-linux-gnu/pkgconfig - make features - make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) - make unzipfx - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.tar.gz - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.tar.gz - - linux-x86_64: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: linux-x86_64-v${{ env.CACHE_VERSION }} - - name: Set up dependencies + - name: Setup dependencies (x86_64) + if: ${{ matrix.target == 'x86_64' }} + shell: bash run: | sudo apt-get update -qq sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf @@ -356,15 +99,17 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-linux-x86_64-v${{ env.CACHE_VERSION }} + key: ccache-linux-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Build extra dependencies + env: + PKG_CONFIG_PATH: /usr/lib/${{ matrix.target }}-linux-gnu/pkgconfig run: | - ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux - - name: Build linux x86_64 + ./deps/PawPaw/bootstrap-cardinal.sh linux-${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh linux-${{ matrix.target }} + - name: Build linux arm64 cross-compiled run: | - pushd deps/PawPaw; source local.env linux; popd + pushd deps/PawPaw; source local.env linux-${{ matrix.target }}; popd export PATH="/usr/lib/ccache:${PATH}" - export PKG_CONFIG_PATH+=:/usr/lib/x86_64-linux-gnu/pkgconfig + export PKG_CONFIG_PATH+=:/usr/lib/${{ matrix.target }}-linux-gnu/pkgconfig make features make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) make unzipfx @@ -376,10 +121,10 @@ jobs: run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }} + name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -424,7 +169,7 @@ jobs: path: | *.tar.gz - linux-x86_64-headless: + linux-headless: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -436,12 +181,12 @@ jobs: sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev sudo apt-get install -yqq liblo-dev sudo apt-get clean - - name: Build linux x86_64 (headless) + - name: Build linux (headless) run: | make HEADLESS=true features make HEADLESS=true -j $(nproc) - linux-x86_64-sysdeps: + linux-lto: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -450,93 +195,33 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf sudo apt-get clean - - name: Build linux x86_64 (sysdeps) + - name: Build linux (LTO) run: | - make features - make SYSDEPS=true -j $(nproc) + make SYSDEPS=true features + make SYSDEPS=true WITH_LTO=true -j $(nproc) - macos-intel: - runs-on: macos-11 + linux-sysdeps: + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: macos-intel-v${{ env.CACHE_VERSION }} - - name: Build extra dependencies + - name: Set up dependencies run: | - export PATH="/usr/local/opt/ccache/libexec:${PATH}" - ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos - - name: Set up ccache - if: steps.cache.outputs.cache-hit == 'true' - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-macos-intel-v${{ env.CACHE_VERSION }} - - name: Build macOS intel (base) - if: steps.cache.outputs.cache-hit == 'true' + sudo apt-get update -qq + sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev + sudo apt-get clean + - name: Build linux (sysdeps) run: | - export PATH="/usr/local/opt/ccache/libexec:${PATH}" - pushd deps/PawPaw; source local.env macos; popd make features - make NOOPT=true -j $(sysctl -n hw.logicalcpu) - - name: Build macOS intel (AU using juce) - if: steps.cache.outputs.cache-hit == 'true' - run: | - pushd deps/PawPaw; source local.env macos; popd - git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE - sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h - mkdir -p jucewrapper/build - pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd - mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - - name: Build macOS intel (packaging) - if: steps.cache.outputs.cache-hit == 'true' - env: - MACOS_ARCHS: 'x86_64' - run: | - pushd deps/PawPaw; source local.env macos; popd - ./utils/create-macos-installer.sh - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Rename macOS bundle - if: steps.cache.outputs.cache-hit == 'true' - run: | - mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || env.SHA8 }}.pkg - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || env.SHA8 }} - path: | - ${{ github.event.repository.name }}-*.pkg - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - ${{ github.event.repository.name }}-*.pkg + make SYSDEPS=true -j $(nproc) - macos-universal: + macos: + strategy: + matrix: + target: [intel, universal] runs-on: macos-11 steps: - uses: actions/checkout@v3 @@ -557,37 +242,46 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: macos-universal-v${{ env.CACHE_VERSION }} + key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" - ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal + ./deps/PawPaw/bootstrap-cardinal.sh macos-${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh macos-${{ matrix.target }} - name: Set up ccache if: steps.cache.outputs.cache-hit == 'true' uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-macos-universal-v${{ env.CACHE_VERSION }} - - name: Build macOS universal (base) + key: ccache-macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }} + - name: Build macOS (base) if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" - pushd deps/PawPaw; source local.env macos-universal; popd + pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd make features make NOOPT=true -j $(sysctl -n hw.logicalcpu) - - name: Build macOS universal (AU using juce) + - name: Build macOS (AU using juce) if: steps.cache.outputs.cache-hit == 'true' run: | - pushd deps/PawPaw; source local.env macos-universal; popd - git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE + export PATH="/usr/local/opt/ccache/libexec:${PATH}" + pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd + git clone --depth=1 -b 6.1.6 https://github.com/DISTRHO/JUCE.git jucewrapper/JUCE + # sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build - pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd + pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - - name: Build macOS universal (packaging) - if: steps.cache.outputs.cache-hit == 'true' + - name: Build macOS (intel packaging) + if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'intel' }} + env: + MACOS_ARCHS: 'x86_64' + run: | + pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd + ./utils/create-macos-installer.sh + - name: Build macOS (universal packaging) + if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'universal' }} env: MACOS_ARCHS: 'arm64,x86_64' run: | - pushd deps/PawPaw; source local.env macos-universal; popd + pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd ./utils/create-macos-installer.sh - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -598,10 +292,10 @@ jobs: - name: Rename macOS bundle if: steps.cache.outputs.cache-hit == 'true' run: | - mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }}.pkg + mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.pkg - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }} + name: ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | ${{ github.event.repository.name }}-*.pkg - uses: softprops/action-gh-release@v1 @@ -909,7 +603,10 @@ jobs: files: | *.zip - win32: + windows: + strategy: + matrix: + target: [win32, win64] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -930,108 +627,23 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: win32-v${{ env.CACHE_VERSION }} + key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update -qq sudo apt-get install -yqq --allow-downgrades libgd3/jammy - sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget + sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 libzip4 sudo apt-get clean - name: Set up dependencies + if: ${{ matrix.target == 'win32' }} run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 gperf qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ccache-win32-v${{ env.CACHE_VERSION }} - - name: Build extra dependencies - run: | - ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32 - - name: Build win32 cross-compiled (base) - if: steps.cache.outputs.cache-hit == 'true' - run: | - export PATH="/usr/lib/ccache:${PATH}" - pushd deps/PawPaw; source local.env win32; popd - make features - make NOOPT=true -j $(nproc) - - name: Build win32 cross-compiled (carla) - if: steps.cache.outputs.cache-hit == 'true' - run: | - export PATH="/usr/lib/ccache:${PATH}" - pushd deps/PawPaw; source local.env win32; popd - make carla-win32 -j $(nproc) - make -C carla EMBED_TARGET=true TESTING=true dist - make -C carla EMBED_TARGET=true TESTING=true dist - - name: Build win32 cross-compiled (packaging) - if: steps.cache.outputs.cache-hit == 'true' - run: | - pushd deps/PawPaw; source local.env win32; popd - xvfb-run ./utils/create-windows-installer.sh 32 - make unzipfx - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - if: steps.cache.outputs.cache-hit == 'true' - run: | - pushd bin - zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) - popd - zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }} - path: | - Cardinal-*.exe - Cardinal-*.zip - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - Cardinal-*.exe - Cardinal-*.zip - - win64: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: win64-v${{ env.CACHE_VERSION }} - - name: Fix GitHub's mess - run: | - sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list - sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libgd3/jammy - sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget - sudo apt-get clean - name: Set up dependencies + if: ${{ matrix.target == 'win64' }} run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq @@ -1040,30 +652,30 @@ jobs: - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: ccache-win64-v${{ env.CACHE_VERSION }} + key: ccache-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Build extra dependencies run: | - ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64 - - name: Build win64 cross-compiled (base) + ./deps/PawPaw/bootstrap-cardinal.sh ${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh ${{ matrix.target }} + - name: Build cross-compiled (base) if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/lib/ccache:${PATH}" - pushd deps/PawPaw; source local.env win64; popd + pushd deps/PawPaw; source local.env ${{ matrix.target }}; popd make features make NOOPT=true -j $(nproc) - - name: Build win64 cross-compiled (carla) + - name: Build cross-compiled (carla) if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/lib/ccache:${PATH}" - pushd deps/PawPaw; source local.env win64; popd + pushd deps/PawPaw; source local.env ${{ matrix.target }}; popd make carla-win32 -j $(nproc) make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - - name: Build win64 cross-compiled (packaging) + - name: Build cross-compiled (packaging) if: steps.cache.outputs.cache-hit == 'true' run: | - pushd deps/PawPaw; source local.env win64; popd - xvfb-run ./utils/create-windows-installer.sh 64 + pushd deps/PawPaw; source local.env ${{ matrix.target }}; popd + xvfb-run ./utils/create-windows-installer.sh ${{ matrix.target }} make unzipfx - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -1075,12 +687,12 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' run: | pushd bin - zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) + zip -r -9 ../${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap) popd - zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe + zip -u -9 ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }} + name: ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | Cardinal-*.exe Cardinal-*.zip diff --git a/utils/create-windows-installer.sh b/utils/create-windows-installer.sh index a6f2a213..638d5ad0 100755 --- a/utils/create-windows-installer.sh +++ b/utils/create-windows-installer.sh @@ -7,9 +7,19 @@ if [ ! -d bin ]; then exit fi -# args -bit=${1} -bit=${bit:=64} +if [ -z "${1}" ]; then + echo "usage: ${0} win32|win64" + exit +fi + +if [ "${1}" = "win32" ]; then + bit=32 +elif [ "${1}" = "win64" ]; then + bit=64 +else + echo "usage: ${0} win32|win64" + exit +fi # setup innosetup dlfile="${PWD}/bin/innosetup-6.0.5.exe" From 792a3405b031204f5494a1b42e26c604b2df96b9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Apr 2023 19:37:44 +0200 Subject: [PATCH 315/451] Fixup CI details Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- deps/PawPaw | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34e774cb..8ec2ef25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -199,8 +199,8 @@ jobs: sudo apt-get clean - name: Build linux (LTO) run: | - make SYSDEPS=true features - make SYSDEPS=true WITH_LTO=true -j $(nproc) + make features + make WITH_LTO=true -j $(nproc) linux-sysdeps: runs-on: ubuntu-20.04 diff --git a/deps/PawPaw b/deps/PawPaw index 1658398a..eb215863 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 1658398aa4d2b9c02dfe5602c9dd3eca18260503 +Subproject commit eb215863a49b9356b64aa6ea229b99b307ab818b From 57cea708dc0f8bed7539ab8012282957b1327085 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Apr 2023 19:41:20 +0200 Subject: [PATCH 316/451] Remove use of mingw-std-threads Signed-off-by: falkTX --- .gitmodules | 3 --- deps/Makefile | 1 - include/mingw-compat/condition_variable | 26 ------------------------- include/mingw-compat/future | 26 ------------------------- include/mingw-compat/mutex | 26 ------------------------- include/mingw-compat/thread | 26 ------------------------- include/mingw-std-threads | 1 - plugins/Makefile | 1 - src/Makefile | 1 - src/Makefile.cardinal.mk | 1 - 10 files changed, 112 deletions(-) delete mode 100644 include/mingw-compat/condition_variable delete mode 100644 include/mingw-compat/future delete mode 100644 include/mingw-compat/mutex delete mode 100644 include/mingw-compat/thread delete mode 160000 include/mingw-std-threads diff --git a/.gitmodules b/.gitmodules index 9c813376..6241e86a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "dpf"] path = dpf url = https://github.com/DISTRHO/DPF.git -[submodule "plugins/Cardinal/mingw-std-threads"] - path = include/mingw-std-threads - url = https://github.com/meganz/mingw-std-threads.git [submodule "plugins/Befaco"] path = plugins/Befaco url = https://github.com/VCVRack/Befaco.git diff --git a/deps/Makefile b/deps/Makefile index 74f2981c..60f1155d 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -57,7 +57,6 @@ BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I$(abspath ../include/mingw-compat) -BASE_FLAGS += -I$(abspath ../include/mingw-std-threads) endif BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing diff --git a/include/mingw-compat/condition_variable b/include/mingw-compat/condition_variable deleted file mode 100644 index 270d7d45..00000000 --- a/include/mingw-compat/condition_variable +++ /dev/null @@ -1,26 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho - * - * 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. - */ - -#pragma once -#include_next -#include "mingw.condition_variable.h" - -// fix macro pollution from Windows headers -#undef IN -#undef OUT -#undef far -#undef near diff --git a/include/mingw-compat/future b/include/mingw-compat/future deleted file mode 100644 index e2cffc76..00000000 --- a/include/mingw-compat/future +++ /dev/null @@ -1,26 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho - * - * 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. - */ - -#pragma once -#include_next -#include "mingw.future.h" - -// fix macro pollution from Windows headers -#undef IN -#undef OUT -#undef far -#undef near diff --git a/include/mingw-compat/mutex b/include/mingw-compat/mutex deleted file mode 100644 index 15df44ac..00000000 --- a/include/mingw-compat/mutex +++ /dev/null @@ -1,26 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho - * - * 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. - */ - -#pragma once -#include_next -#include "mingw.mutex.h" - -// fix macro pollution from Windows headers -#undef IN -#undef OUT -#undef far -#undef near diff --git a/include/mingw-compat/thread b/include/mingw-compat/thread deleted file mode 100644 index 3b2a63c6..00000000 --- a/include/mingw-compat/thread +++ /dev/null @@ -1,26 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho - * - * 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. - */ - -#pragma once -#include_next -#include "mingw.thread.h" - -// fix macro pollution from Windows headers -#undef IN -#undef OUT -#undef far -#undef near diff --git a/include/mingw-std-threads b/include/mingw-std-threads deleted file mode 160000 index f6365f90..00000000 --- a/include/mingw-std-threads +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f6365f900fb9b1cd6014c8d1cf13ceacf8faf3de diff --git a/plugins/Makefile b/plugins/Makefile index e8d52880..68f56a6c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1356,7 +1356,6 @@ BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../include/mingw-compat -BASE_FLAGS += -I../include/mingw-std-threads endif ifeq ($(USE_GLES2),true) diff --git a/src/Makefile b/src/Makefile index ff4ba7be..c9e1d0db 100644 --- a/src/Makefile +++ b/src/Makefile @@ -119,7 +119,6 @@ BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../include/mingw-compat -BASE_FLAGS += -I../include/mingw-std-threads endif ifeq ($(USE_GLES2),true) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 9598e585..5744af72 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -338,7 +338,6 @@ BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../../include/mingw-compat -BASE_FLAGS += -I../../include/mingw-std-threads endif ifeq ($(USE_GLES2),true) From 9f3252f7cad071f6fc68246463a15b78fca5136b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Apr 2023 21:54:39 +0200 Subject: [PATCH 317/451] Start cleaning up the makefiles Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- Makefile | 52 ++++--------- Makefile.base.mk | 47 ++++++++++++ carla | 2 +- deps/Makefile | 147 ++++++++++++++++-------------------- dpf | 2 +- lv2export/Makefile | 1 - plugins/Makefile | 19 +---- src/CardinalRemote/Makefile | 1 - src/Makefile | 19 +---- src/Makefile.cardinal.mk | 44 +++++------ 11 files changed, 148 insertions(+), 188 deletions(-) create mode 100644 Makefile.base.mk diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ec2ef25..1188bb2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: build on: [push, pull_request] env: - CACHE_VERSION: 2 + CACHE_VERSION: 3 CARDINAL_UNDER_WINE: 1 CIBUILD: true EMSCRIPTEN_VERSION: 3.1.27 diff --git a/Makefile b/Makefile index d5b371bb..23adb6f2 100644 --- a/Makefile +++ b/Makefile @@ -4,17 +4,18 @@ # Created by falkTX # +ROOT = . +include $(ROOT)/Makefile.base.mk + +# ----------------------------------------------------------------------------- +# Set version + # also set in: # jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` VERSION = 23.04 -# -------------------------------------------------------------- -# Import base definitions - -include dpf/Makefile.base.mk - # -------------------------------------------------------------- # Build targets @@ -26,20 +27,6 @@ all: cardinal carla deps dgl plugins gen resources PREFIX ?= /usr/local DESTDIR ?= -ifeq ($(BSD),true) -SYSDEPS ?= true -else -SYSDEPS ?= false -endif - -ifeq ($(LINUX),true) -VST3_SUPPORTED = true -else ifeq ($(MACOS),true) -VST3_SUPPORTED = true -else ifeq ($(WINDOWS),true) -VST3_SUPPORTED = true -endif - # -------------------------------------------------------------- # Carla config @@ -56,17 +43,6 @@ ifneq ($(DEBUG),true) CARLA_EXTRA_ARGS += EXTERNAL_PLUGINS=true endif -# -------------------------------------------------------------- -# DGL config - -DGL_EXTRA_ARGS = \ - DISTRHO_NAMESPACE=CardinalDISTRHO \ - DGL_NAMESPACE=CardinalDGL \ - NVG_DISABLE_SKIPPING_WHITESPACE=true \ - NVG_FONT_TEXTURE_FLAGS=NVG_IMAGE_NEAREST \ - USE_NANOVG_FBO=true \ - WINDOWS_ICON_ID=401 - # -------------------------------------------------------------- # Check for required system-wide dependencies @@ -278,10 +254,10 @@ install: install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2 install -d $(DESTDIR)$(PREFIX)/lib/clap/Cardinal.clap install -d $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst -ifeq ($(VST3_SUPPORTED),true) - install -d $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/Contents - install -d $(DESTDIR)$(PREFIX)/lib/vst3/CardinalFX.vst3/Contents - install -d $(DESTDIR)$(PREFIX)/lib/vst3/CardinalSynth.vst3/Contents +ifneq ($(VST3_BINARY_DIR),) + install -d $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/$(VST3_BINARY_DIR) + install -d $(DESTDIR)$(PREFIX)/lib/vst3/CardinalFX.vst3/$(VST3_BINARY_DIR) + install -d $(DESTDIR)$(PREFIX)/lib/vst3/CardinalSynth.vst3/$(VST3_BINARY_DIR) endif install -d $(DESTDIR)$(PREFIX)/share/cardinal install -d $(DESTDIR)$(PREFIX)/share/doc/cardinal/docs @@ -293,10 +269,10 @@ endif install -m 644 bin/Cardinal.clap/*.* $(DESTDIR)$(PREFIX)/lib/clap/Cardinal.clap/ install -m 644 bin/Cardinal.vst/*.* $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst/ -ifeq ($(VST3_SUPPORTED),true) - cp -rL bin/Cardinal.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/Contents/ - cp -rL bin/CardinalFX.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/CardinalFX.vst3/Contents/ - cp -rL bin/CardinalSynth.vst3/Contents/*-* $(DESTDIR)$(PREFIX)/lib/vst3/CardinalSynth.vst3/Contents/ +ifneq ($(VST3_BINARY_DIR),) + install -m 644 bin/Cardinal.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/Cardinal.vst3/$(VST3_BINARY_DIR)/ + install -m 644 bin/CardinalFX.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/CardinalFX.vst3/$(VST3_BINARY_DIR)/ + install -m 644 bin/CardinalSynth.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/CardinalSynth.vst3/$(VST3_BINARY_DIR)/ endif install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ diff --git a/Makefile.base.mk b/Makefile.base.mk new file mode 100644 index 00000000..cfbdad83 --- /dev/null +++ b/Makefile.base.mk @@ -0,0 +1,47 @@ +#!/usr/bin/make -f +# Makefile for Cardinal # +# --------------------- # +# Created by falkTX +# + +ifeq ($(ROOT),) +$(error invalid usage) +endif + +# ----------------------------------------------------------------------------- +# Import base definitions + +DISTRHO_NAMESPACE = CardinalDISTRHO +DGL_NAMESPACE = CardinalDGL +NVG_DISABLE_SKIPPING_WHITESPACE = true +NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST +USE_NANOVG_FBO = true +WASM_EXCEPTIONS = true +WINDOWS_ICON_ID = 401 +include $(ROOT)/dpf/Makefile.base.mk + +DGL_EXTRA_ARGS = \ + DISTRHO_NAMESPACE=$(DISTRHO_NAMESPACE) \ + DGL_NAMESPACE=$(DGL_NAMESPACE) \ + NVG_DISABLE_SKIPPING_WHITESPACE=$(NVG_DISABLE_SKIPPING_WHITESPACE) \ + NVG_FONT_TEXTURE_FLAGS=$(NVG_FONT_TEXTURE_FLAGS) \ + USE_NANOVG_FBO=$(USE_NANOVG_FBO) \ + WASM_EXCEPTIONS=$(WASM_EXCEPTIONS) \ + WINDOWS_ICON_ID=$(WINDOWS_ICON_ID) + +# ----------------------------------------------------------------------------- +# Build config + +ifeq ($(BSD),true) +SYSDEPS ?= true +else +SYSDEPS ?= false +endif + +ifeq ($(SYSDEPS),true) +RACK_DEP_PATH = $(abspath $(ROOT)/dep/sysroot) +else +RACK_DEP_PATH = $(abspath $(ROOT)/src/Rack/dep) +endif + +# ----------------------------------------------------------------------------- diff --git a/carla b/carla index cf11562c..44c6615f 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit cf11562c505407f12a6e6d085ca448fefd7399ba +Subproject commit 44c6615f2a0c9c656d946b5f95a2502e72cc5f00 diff --git a/deps/Makefile b/deps/Makefile index 60f1155d..ebe130ce 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -4,29 +4,8 @@ # Created by falkTX # -# -------------------------------------------------------------- -# Import base definitions - -DISTRHO_NAMESPACE = CardinalDISTRHO -DGL_NAMESPACE = CardinalDGL -USE_NANOVG_FBO = true -WASM_EXCEPTIONS = true -include ../dpf/Makefile.base.mk - -# -------------------------------------------------------------- -# Build config - -ifeq ($(BSD),true) -SYSDEPS ?= true -else -SYSDEPS ?= false -endif - -ifeq ($(SYSDEPS),true) -DEP_PATH = $(abspath sysroot) -else -DEP_PATH = $(abspath ../src/Rack/dep) -endif +ROOT = .. +include $(ROOT)/Makefile.base.mk # -------------------------------------------------------------- # custom build flags @@ -110,7 +89,7 @@ SPACE += CMAKE = cmake CMAKE += -DCMAKE_INSTALL_LIBDIR=lib -CMAKE += -DCMAKE_INSTALL_PREFIX='$(DEP_PATH)' +CMAKE += -DCMAKE_INSTALL_PREFIX='$(RACK_DEP_PATH)' CMAKE += -DBUILD_SHARED_LIBS=OFF # make sure debug/release matches @@ -184,7 +163,7 @@ endif # Fix up configure CONFIGURE = ./configure -CONFIGURE += --prefix="$(DEP_PATH)" +CONFIGURE += --prefix="$(RACK_DEP_PATH)" CONFIGURE += --host=$(TARGET_MACHINE) CONFIGURE += --enable-static CONFIGURE += --disable-shared @@ -226,58 +205,58 @@ DEP_MAKE2 += CONFIGURE="$(ENV) $(CONFIGURE)" # -------------------------------------------------------------- # Rack internal dependencies target -$(DEP_PATH)/lib/%.a: - $(DEP_MAKE2) -C $(DEP_PATH) lib/$*.a +$(RACK_DEP_PATH)/lib/%.a: + $(DEP_MAKE2) -C $(RACK_DEP_PATH) lib/$*.a -$(DEP_PATH)/jansson-2.12: - $(DEP_MAKE2) -C $(DEP_PATH) jansson-2.12 +$(RACK_DEP_PATH)/jansson-2.12: + $(DEP_MAKE2) -C $(RACK_DEP_PATH) jansson-2.12 # libarchive: skip shared lib and ensure libzstd is enabled -$(DEP_PATH)/lib/libarchive.a: $(DEP_PATH)/lib/libzstd.a $(DEP_PATH)/libarchive-3.4.3/.stamp-patched +$(RACK_DEP_PATH)/lib/libarchive.a: $(RACK_DEP_PATH)/lib/libzstd.a $(RACK_DEP_PATH)/libarchive-3.4.3/.stamp-patched -$(DEP_PATH)/lib/libarchive_static.a: $(DEP_PATH)/lib/libzstd.a $(DEP_PATH)/libarchive-3.4.3/.stamp-patched +$(RACK_DEP_PATH)/lib/libarchive_static.a: $(RACK_DEP_PATH)/lib/libzstd.a $(RACK_DEP_PATH)/libarchive-3.4.3/.stamp-patched -$(DEP_PATH)/libarchive-3.4.3/.stamp-patched: - $(DEP_MAKE2) -C $(DEP_PATH) libarchive-3.4.3 - sed -i -e "618,625d" $(DEP_PATH)/libarchive-3.4.3/CMakeLists.txt - awk 'NR==616{print " SET(HAVE_LIBZSTD 1)"}1' $(DEP_PATH)/libarchive-3.4.3/CMakeLists.txt > $(DEP_PATH)/libarchive-3.4.3/CMakeLists.txt2 - mv $(DEP_PATH)/libarchive-3.4.3/CMakeLists.txt2 $(DEP_PATH)/libarchive-3.4.3/CMakeLists.txt - sed -i -e "238,243d" $(DEP_PATH)/libarchive-3.4.3/libarchive/CMakeLists.txt - sed -i -e "s/TARGETS archive archive_static/TARGETS archive_static/" $(DEP_PATH)/libarchive-3.4.3/libarchive/CMakeLists.txt +$(RACK_DEP_PATH)/libarchive-3.4.3/.stamp-patched: + $(DEP_MAKE2) -C $(RACK_DEP_PATH) libarchive-3.4.3 + sed -i -e "618,625d" $(RACK_DEP_PATH)/libarchive-3.4.3/CMakeLists.txt + awk 'NR==616{print " SET(HAVE_LIBZSTD 1)"}1' $(RACK_DEP_PATH)/libarchive-3.4.3/CMakeLists.txt > $(RACK_DEP_PATH)/libarchive-3.4.3/CMakeLists.txt2 + mv $(RACK_DEP_PATH)/libarchive-3.4.3/CMakeLists.txt2 $(RACK_DEP_PATH)/libarchive-3.4.3/CMakeLists.txt + sed -i -e "238,243d" $(RACK_DEP_PATH)/libarchive-3.4.3/libarchive/CMakeLists.txt + sed -i -e "s/TARGETS archive archive_static/TARGETS archive_static/" $(RACK_DEP_PATH)/libarchive-3.4.3/libarchive/CMakeLists.txt touch $@ # libsamplerate: skip tests, fails to build in some systems and are not needed or wanted anyway -$(DEP_PATH)/lib/libsamplerate.a: $(DEP_PATH)/libsamplerate-0.1.9/.stamp-patched +$(RACK_DEP_PATH)/lib/libsamplerate.a: $(RACK_DEP_PATH)/libsamplerate-0.1.9/.stamp-patched -$(DEP_PATH)/libsamplerate-0.1.9/.stamp-patched: - $(DEP_MAKE2) -C $(DEP_PATH) libsamplerate-0.1.9 - sed -i -e "s/src doc examples tests/src/" $(DEP_PATH)/libsamplerate-0.1.9/Makefile.in +$(RACK_DEP_PATH)/libsamplerate-0.1.9/.stamp-patched: + $(DEP_MAKE2) -C $(RACK_DEP_PATH) libsamplerate-0.1.9 + sed -i -e "s/src doc examples tests/src/" $(RACK_DEP_PATH)/libsamplerate-0.1.9/Makefile.in touch $@ # libspeexdsp: hide symbols -$(DEP_PATH)/lib/libspeexdsp.a: $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched +$(RACK_DEP_PATH)/lib/libspeexdsp.a: $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched -$(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched: - $(DEP_MAKE2) -C $(DEP_PATH) speexdsp-SpeexDSP-1.2rc3 \ +$(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched: + $(DEP_MAKE2) -C $(RACK_DEP_PATH) speexdsp-SpeexDSP-1.2rc3 \ WGET="wget -c http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz && mv speexdsp-1.2rc3.tar.gz speexdsp-SpeexDSP-1.2rc3.tgz #" \ SHA256SUM="true" \ - UNTAR="mkdir -p speexdsp-SpeexDSP-1.2rc3 && tar -x --strip-components=1 --directory=$(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 -f" - sed -i -e "s/#pragma GCC visibility push/#error we dont want this/" $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/configure + UNTAR="mkdir -p speexdsp-SpeexDSP-1.2rc3 && tar -x --strip-components=1 --directory=$(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 -f" + sed -i -e "s/#pragma GCC visibility push/#error we dont want this/" $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/configure touch $@ # custom zstd build for only building static libs -$(DEP_PATH)/lib/libzstd.a: $(DEP_PATH)/zstd-1.4.5/.stamp-patched - cd $(DEP_PATH)/zstd-1.4.5/build/cmake && $(CMAKE) -DZSTD_BUILD_STATIC=ON -DZSTD_BUILD_PROGRAMS=OFF -DZSTD_BUILD_SHARED=OFF -DZSTD_MULTITHREAD_SUPPORT=OFF . - $(DEP_MAKE2) -C $(DEP_PATH)/zstd-1.4.5/build/cmake - $(DEP_MAKE2) -C $(DEP_PATH)/zstd-1.4.5/build/cmake install +$(RACK_DEP_PATH)/lib/libzstd.a: $(RACK_DEP_PATH)/zstd-1.4.5/.stamp-patched + cd $(RACK_DEP_PATH)/zstd-1.4.5/build/cmake && $(CMAKE) -DZSTD_BUILD_STATIC=ON -DZSTD_BUILD_PROGRAMS=OFF -DZSTD_BUILD_SHARED=OFF -DZSTD_MULTITHREAD_SUPPORT=OFF . + $(DEP_MAKE2) -C $(RACK_DEP_PATH)/zstd-1.4.5/build/cmake + $(DEP_MAKE2) -C $(RACK_DEP_PATH)/zstd-1.4.5/build/cmake install # zstd cmake is borked, see https://github.com/facebook/zstd/issues/1401 # zstd also fails to build on old systems, patch that too -$(DEP_PATH)/zstd-1.4.5/.stamp-patched: - $(DEP_MAKE2) -C $(DEP_PATH) zstd-1.4.5 - sed -i -e "56,66d" $(DEP_PATH)/zstd-1.4.5/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake - sed -i -e "146,175d" $(DEP_PATH)/zstd-1.4.5/programs/util.c - sed -i -e "142,144d" $(DEP_PATH)/zstd-1.4.5/programs/util.c +$(RACK_DEP_PATH)/zstd-1.4.5/.stamp-patched: + $(DEP_MAKE2) -C $(RACK_DEP_PATH) zstd-1.4.5 + sed -i -e "56,66d" $(RACK_DEP_PATH)/zstd-1.4.5/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake + sed -i -e "146,175d" $(RACK_DEP_PATH)/zstd-1.4.5/programs/util.c + sed -i -e "142,144d" $(RACK_DEP_PATH)/zstd-1.4.5/programs/util.c touch $@ # -------------------------------------------------------------- @@ -298,12 +277,12 @@ else ifeq ($(MACOS),true) QUICKJS_MAKE_FLAGS += CONFIG_DARWIN=y endif -$(DEP_PATH)/lib/libquickjs.a: +$(RACK_DEP_PATH)/lib/libquickjs.a: $(DEP_MAKE) $(QUICKJS_MAKE_FLAGS) -C $(CURDIR)/QuickJS - install -d $(DEP_PATH)/include - install -d $(DEP_PATH)/lib + install -d $(RACK_DEP_PATH)/include + install -d $(RACK_DEP_PATH)/lib install -m644 $(CURDIR)/QuickJS/libquickjs.a $@ - install -m644 $(CURDIR)/QuickJS/quickjs.h $(DEP_PATH)/include/quickjs.h + install -m644 $(CURDIR)/QuickJS/quickjs.h $(RACK_DEP_PATH)/include/quickjs.h # -------------------------------------------------------------- # SurgeXT target @@ -383,45 +362,45 @@ ifneq ($(NOPLUGINS),true) TARGETS += $(SURGE_LIB) endif -TARGETS += $(DEP_PATH)/lib/libjansson.a -TARGETS += $(DEP_PATH)/lib/libquickjs.a -TARGETS += $(DEP_PATH)/lib/libsamplerate.a -TARGETS += $(DEP_PATH)/lib/libspeexdsp.a +TARGETS += $(RACK_DEP_PATH)/lib/libjansson.a +TARGETS += $(RACK_DEP_PATH)/lib/libquickjs.a +TARGETS += $(RACK_DEP_PATH)/lib/libsamplerate.a +TARGETS += $(RACK_DEP_PATH)/lib/libspeexdsp.a ifeq ($(WINDOWS),true) -TARGETS += $(DEP_PATH)/lib/libarchive_static.a +TARGETS += $(RACK_DEP_PATH)/lib/libarchive_static.a else -TARGETS += $(DEP_PATH)/lib/libarchive.a +TARGETS += $(RACK_DEP_PATH)/lib/libarchive.a endif -TARGETS += $(DEP_PATH)/lib/libzstd.a +TARGETS += $(RACK_DEP_PATH)/lib/libzstd.a all: $(TARGETS) clean: $(DEP_MAKE) $(QUICKJS_MAKE_FLAGS) -C $(CURDIR)/QuickJS clean rm -f $(TARGETS) - rm -f $(DEP_PATH)/*.tgz - rm -f $(DEP_PATH)/*.tar.gz - rm -rf $(DEP_PATH)/bin - rm -rf $(DEP_PATH)/include - rm -rf $(DEP_PATH)/lib - rm -rf $(DEP_PATH)/share - rm -rf $(DEP_PATH)/jansson-2.12 - rm -rf $(DEP_PATH)/libarchive-3.4.3 - rm -rf $(DEP_PATH)/libsamplerate-0.1.9 - rm -rf $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 - rm -rf $(DEP_PATH)/zstd-1.4.5 + rm -f $(RACK_DEP_PATH)/*.tgz + rm -f $(RACK_DEP_PATH)/*.tar.gz + rm -rf $(RACK_DEP_PATH)/bin + rm -rf $(RACK_DEP_PATH)/include + rm -rf $(RACK_DEP_PATH)/lib + rm -rf $(RACK_DEP_PATH)/share + rm -rf $(RACK_DEP_PATH)/jansson-2.12 + rm -rf $(RACK_DEP_PATH)/libarchive-3.4.3 + rm -rf $(RACK_DEP_PATH)/libsamplerate-0.1.9 + rm -rf $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 + rm -rf $(RACK_DEP_PATH)/zstd-1.4.5 rm -rf $(SURGE_DEP_PATH) download: \ - $(DEP_PATH)/jansson-2.12 \ - $(DEP_PATH)/libarchive-3.4.3/.stamp-patched \ - $(DEP_PATH)/libsamplerate-0.1.9/.stamp-patched \ - $(DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched \ - $(DEP_PATH)/zstd-1.4.5/.stamp-patched + $(RACK_DEP_PATH)/jansson-2.12 \ + $(RACK_DEP_PATH)/libarchive-3.4.3/.stamp-patched \ + $(RACK_DEP_PATH)/libsamplerate-0.1.9/.stamp-patched \ + $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched \ + $(RACK_DEP_PATH)/zstd-1.4.5/.stamp-patched -quickjs: $(DEP_PATH)/lib/libquickjs.a +quickjs: $(RACK_DEP_PATH)/lib/libquickjs.a surge: $(SURGE_LIB) # -------------------------------------------------------------- diff --git a/dpf b/dpf index 5b767058..dc6557a3 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 5b7670584d16e76a27cf0d6575b8bf9921de2714 +Subproject commit dc6557a3c935ae4bb68f89d8bc698a805fff788e diff --git a/lv2export/Makefile b/lv2export/Makefile index 53ef3a1c..9e0fe7c7 100644 --- a/lv2export/Makefile +++ b/lv2export/Makefile @@ -59,7 +59,6 @@ ifeq ($(WINDOWS),true) BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN BASE_FLAGS += -I../include/mingw-compat -BASE_FLAGS += -I../include/mingw-std-threads endif # -------------------------------------------------------------- diff --git a/plugins/Makefile b/plugins/Makefile index 68f56a6c..3601ff68 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -4,23 +4,8 @@ # Created by falkTX # -# -------------------------------------------------------------- -# Import base definitions - -DISTRHO_NAMESPACE = CardinalDISTRHO -DGL_NAMESPACE = CardinalDGL -USE_NANOVG_FBO = true -WASM_EXCEPTIONS = true -include ../dpf/Makefile.base.mk - -# -------------------------------------------------------------- -# Build config - -ifeq ($(BSD),true) -SYSDEPS ?= true -else -SYSDEPS ?= false -endif +ROOT = .. +include $(ROOT)/Makefile.base.mk # -------------------------------------------------------------- # List of drwav functions, used in several modules diff --git a/src/CardinalRemote/Makefile b/src/CardinalRemote/Makefile index 3a4ee1f4..8c891642 100644 --- a/src/CardinalRemote/Makefile +++ b/src/CardinalRemote/Makefile @@ -183,7 +183,6 @@ BASE_FLAGS += -D_USE_MATH_DEFINES BASE_FLAGS += -DWIN32_LEAN_AND_MEAN BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I../../include/mingw-compat -BASE_FLAGS += -I../../include/mingw-std-threads endif ifeq ($(USE_GLES2),true) diff --git a/src/Makefile b/src/Makefile index c9e1d0db..bcee861c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,23 +4,8 @@ # Created by falkTX # -# -------------------------------------------------------------- -# Import base definitions - -DISTRHO_NAMESPACE = CardinalDISTRHO -DGL_NAMESPACE = CardinalDGL -USE_NANOVG_FBO = true -WASM_EXCEPTIONS = true -include ../dpf/Makefile.base.mk - -# -------------------------------------------------------------- -# Build config - -ifeq ($(BSD),true) -SYSDEPS ?= true -else -SYSDEPS ?= false -endif +ROOT = .. +include $(ROOT)/Makefile.base.mk # -------------------------------------------------------------- # Build setup diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 5744af72..66833075 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -4,7 +4,15 @@ # Created by falkTX # -# Must have NAME defined +ROOT = ../.. +include $(ROOT)/Makefile.base.mk + +# ----------------------------------------------------------------------------- +# Set variant to build + +ifeq ($(NAME),) +$(error invalid usage) +endif ifeq ($(NAME),Cardinal) CARDINAL_VARIANT = main @@ -49,37 +57,11 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resample endif # STATIC_BUILD endif # CARDINAL_VARIANT mini -# -------------------------------------------------------------- -# Import base definitions - -DISTRHO_NAMESPACE = CardinalDISTRHO -DGL_NAMESPACE = CardinalDGL -NVG_DISABLE_SKIPPING_WHITESPACE = true -NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST -USE_NANOVG_FBO = true -WASM_EXCEPTIONS = true - -ifeq ($(CARDINAL_VARIANT),main) -# main variant should not use rtaudio/sdl2 fallback (it has CV ports) -SKIP_NATIVE_AUDIO_FALLBACK = true -else ifneq ($(CARDINAL_VARIANT),mini) -# other variants should only use rtaudio/sdl2 fallbacks -FORCE_NATIVE_AUDIO_FALLBACK = true -endif - -include ../../dpf/Makefile.base.mk - # -------------------------------------------------------------- # Build config PREFIX ?= /usr/local -ifeq ($(BSD),true) -SYSDEPS ?= true -else -SYSDEPS ?= false -endif - ifeq ($(SYSDEPS),true) DEP_LIB_PATH = $(abspath ../../deps/sysroot/lib) else @@ -269,6 +251,14 @@ endif # -------------------------------------------------------------- # Do some magic +ifeq ($(CARDINAL_VARIANT),main) +# main variant should not use rtaudio/sdl2 fallback (it has CV ports) +SKIP_NATIVE_AUDIO_FALLBACK = true +else ifneq ($(CARDINAL_VARIANT),mini) +# other variants should only use rtaudio/sdl2 fallbacks +FORCE_NATIVE_AUDIO_FALLBACK = true +endif + USE_VST2_BUNDLE = true USE_CLAP_BUNDLE = true include ../../dpf/Makefile.plugins.mk From 969973e3cdc2414566e2525a9c77c198b4c77bc6 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 Apr 2023 22:28:16 +0200 Subject: [PATCH 318/451] Cleanup, remove old mingw stdio hacks Signed-off-by: falkTX --- include/mingw-compat/cstdio | 58 ------------------------- include/mingw-compat/{stdio.h => mutex} | 24 +++------- include/mingw-compat/thread | 25 +++++++++++ 3 files changed, 32 insertions(+), 75 deletions(-) delete mode 100644 include/mingw-compat/cstdio rename include/mingw-compat/{stdio.h => mutex} (51%) create mode 100644 include/mingw-compat/thread diff --git a/include/mingw-compat/cstdio b/include/mingw-compat/cstdio deleted file mode 100644 index bdcb7e84..00000000 --- a/include/mingw-compat/cstdio +++ /dev/null @@ -1,58 +0,0 @@ -/* - * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho - * - * 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. - */ - -#pragma once - -/* On mingw stdio functions like printf are not inline, and thus get defined every time they are used. - * Its also does `#undef printf` which invalidates our macros :( - * We go through a few steps to ensure unique symbol names. - */ -#ifdef STDIO_OVERRIDE - -// helper macros -# define STDIO_OVERRIDE_HELPER(NS, SEP, FN) NS ## SEP ## FN -# define STDIO_OVERRIDE_MACRO(NS, FN) STDIO_OVERRIDE_HELPER(NS, _, FN) - -// step 1: prefix the needed stdio functions -# define printf STDIO_OVERRIDE_MACRO(STDIO_OVERRIDE, printf) - -// step 2: inlude which will use our prefixed names -# include - -// step 3: undef and define dummy functions required for (it uses `using ::printf` syntax) -# undef printf -static inline void printf() {} - -// step 4: we can safely include now -# include_next - -// step 5: define the same macros as in step 1 -# define printf STDIO_OVERRIDE_MACRO(STDIO_OVERRIDE, printf) - -// step 6: place the macro prefixed names in std namespace -/* -namespace std { - using ::printf; -} -*/ - -#else // STDIO_OVERRIDE - -// if STDIO_OVERRIDE is not defined, we have nothing to do -# include_next - -#endif // STDIO_OVERRIDE diff --git a/include/mingw-compat/stdio.h b/include/mingw-compat/mutex similarity index 51% rename from include/mingw-compat/stdio.h rename to include/mingw-compat/mutex index ea67f0dc..ae24f4f1 100644 --- a/include/mingw-compat/stdio.h +++ b/include/mingw-compat/mutex @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -16,20 +16,10 @@ */ #pragma once +#include_next -/* On mingw stdio functions like printf are not inline, and thus get defined every time they are used. - * We go through a few steps to ensure unique symbol names. - */ -#ifdef STDIO_OVERRIDE - -// helper macros -# define STDIO_OVERRIDE_HELPER(NS, SEP, FN) NS ## SEP ## FN -# define STDIO_OVERRIDE_MACRO(NS, FN) STDIO_OVERRIDE_HELPER(NS, _, FN) - -// prefix the needed stdio functions -# define printf STDIO_OVERRIDE_MACRO(STDIO_OVERRIDE, printf) - -#endif // STDIO_OVERRIDE - -// now just include the real stdio.h -#include_next +// fix macro pollution from Windows headers +#undef IN +#undef OUT +#undef far +#undef near diff --git a/include/mingw-compat/thread b/include/mingw-compat/thread new file mode 100644 index 00000000..24fb7d2d --- /dev/null +++ b/include/mingw-compat/thread @@ -0,0 +1,25 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2023 Filipe Coelho + * + * 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. + */ + +#pragma once +#include_next + +// fix macro pollution from Windows headers +#undef IN +#undef OUT +#undef far +#undef near From 417d0b321ec39ddba8d4c40c5eaa50529b4a1830 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 00:22:46 +0200 Subject: [PATCH 319/451] Fix build Signed-off-by: falkTX --- carla | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carla b/carla index 44c6615f..3b920850 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 44c6615f2a0c9c656d946b5f95a2502e72cc5f00 +Subproject commit 3b92085050c3dc00ac304e100ad648d55c067e65 From f99f79c1eb74ee4f9b7a995ab186906fe228fcea Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 01:32:31 +0200 Subject: [PATCH 320/451] Move common build flags to a single location Signed-off-by: falkTX --- Makefile.base.mk | 142 ++++++++++++++++++++++++++++++++++++++- deps/Makefile | 37 ---------- plugins/Makefile | 121 ++------------------------------- src/Makefile | 114 +------------------------------ src/Makefile.cardinal.mk | 99 +++------------------------ 5 files changed, 156 insertions(+), 357 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index cfbdad83..1b0e9b91 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -39,9 +39,149 @@ SYSDEPS ?= false endif ifeq ($(SYSDEPS),true) -RACK_DEP_PATH = $(abspath $(ROOT)/dep/sysroot) +RACK_DEP_PATH = $(abspath $(ROOT)/deps/sysroot) else RACK_DEP_PATH = $(abspath $(ROOT)/src/Rack/dep) endif # ----------------------------------------------------------------------------- +# Custom build flags + +BASE_FLAGS += -I$(abspath $(ROOT)/include) +BASE_FLAGS += -I$(abspath $(ROOT)/include/simd-compat) +BASE_FLAGS += -I$(RACK_DEP_PATH)/include + +ifeq ($(MOD_BUILD),true) +BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp +LINK_FLAGS += -fopenmp +endif + +ifeq ($(NOSIMD),true) +BASE_FLAGS += -DCARDINAL_NOSIMD +endif + +ifeq ($(SYSDEPS),true) +BASE_FLAGS += -DCARDINAL_SYSDEPS +BASE_FLAGS += $(shell $(PKG_CONFIG) --cflags jansson libarchive samplerate speexdsp) +else +BASE_FLAGS += -DZSTDLIB_VISIBILITY= +endif + +ifeq ($(BSD)$(HAIKU),true) +BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC +endif + +ifeq ($(BSD)$(WASM),true) +BASE_FLAGS += -D'aligned_alloc_16(ptr)'='aligned_alloc(16,ptr)' +BASE_FLAGS += -D'aligned_free_16(ptr)'='free(ptr)' +endif + +ifeq ($(HAIKU)$(WASM),true) +BASE_FLAGS += -I$(abspath $(ROOT)/include/linux-compat) +else +BASE_FLAGS += -pthread +endif + +ifeq ($(WINDOWS),true) +BASE_FLAGS += -D_USE_MATH_DEFINES +BASE_FLAGS += -DWIN32_LEAN_AND_MEAN +BASE_FLAGS += -D_WIN32_WINNT=0x0600 +BASE_FLAGS += -I$(abspath $(ROOT)/include/mingw-compat) +endif + +BASE_OPTS += -fno-finite-math-only +BASE_OPTS += -fno-strict-aliasing + +# ----------------------------------------------------------------------------- +# Rack build flags + +ifeq ($(BUILDING_RACK),true) + +# 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 + +# Ignore warnings from simde +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -Wno-overflow +endif + +# lots of warnings from VCV side +BASE_FLAGS += -Wno-unused-parameter +BASE_FLAGS += -Wno-unused-variable + +ifeq ($(CPU_ARM_OR_ARM64)$(CPU_RISCV64),true) +BASE_FLAGS += -Wno-attributes +endif + +ifeq ($(MACOS),true) +BASE_FLAGS += -DARCH_MAC +else ifeq ($(WINDOWS),true) +BASE_FLAGS += -DARCH_WIN +else +BASE_FLAGS += -DARCH_LIN +endif + +ifeq ($(DEBUG),true) +BASE_FLAGS += -UDEBUG +endif + +ifeq ($(HEADLESS),true) +BASE_FLAGS += -DHEADLESS +endif + +ifeq ($(USE_GLES2),true) +BASE_FLAGS += -DNANOVG_GLES2_FORCED +else ifeq ($(USE_GLES3),true) +BASE_FLAGS += -DNANOVG_GLES3_FORCED +endif + +# needed for enabling SSE in pffft +ifeq ($(CPU_I386),true) +BASE_FLAGS += -Di386 +endif + +# SIMD must always be enabled, even in debug builds +ifneq ($(NOSIMD),true) +ifeq ($(DEBUG),true) + +ifeq ($(WASM),true) +BASE_FLAGS += -msse -msse2 -msse3 -msimd128 +else ifeq ($(CPU_ARM32),true) +BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard +else ifeq ($(CPU_I386_OR_X86_64),true) +BASE_FLAGS += -msse -msse2 -mfpmath=sse +endif + +endif +endif + +BASE_FLAGS += -I$(abspath $(ROOT)/dpf/dgl/src/nanovg) +BASE_FLAGS += -I$(abspath $(ROOT)/dpf/distrho) + +BASE_FLAGS += -I$(abspath $(ROOT)/include/simde) + +BASE_FLAGS += -I$(abspath $(ROOT)/src) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/include) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/include/dsp) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/filesystem/include) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/fuzzysearchdatabase/src) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/glfw/include) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/nanosvg/src) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/oui-blendish) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/pffft) + +BUILD_C_FLAGS += -std=gnu11 + +ifneq ($(MACOS),true) +BUILD_CXX_FLAGS += -faligned-new -Wno-abi +ifeq ($(MOD_BUILD),true) +BUILD_CXX_FLAGS += -std=gnu++17 +endif +endif + +endif + +# ----------------------------------------------------------------------------- diff --git a/deps/Makefile b/deps/Makefile index ebe130ce..97c986a1 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -7,43 +7,6 @@ ROOT = .. include $(ROOT)/Makefile.base.mk -# -------------------------------------------------------------- -# custom build flags - -BASE_FLAGS += -I$(abspath ../include) -BASE_FLAGS += -I$(abspath ../include/simd-compat) - -ifeq ($(NOSIMD),true) -BASE_FLAGS += -DCARDINAL_NOSIMD -endif - -ifeq ($(HAIKU)$(WASM),true) -BASE_FLAGS += -I$(abspath ../include/linux-compat) -endif - -ifneq ($(SYSDEPS),true) -BASE_FLAGS += -DZSTDLIB_VISIBILITY= -endif - -ifneq ($(HAIKU),true) -ifneq ($(WASM),true) -BASE_FLAGS += -pthread -endif -endif - -ifeq ($(WINDOWS),true) -BASE_FLAGS += -D_USE_MATH_DEFINES -BASE_FLAGS += -DWIN32_LEAN_AND_MEAN -BASE_FLAGS += -D_WIN32_WINNT=0x0600 -BASE_FLAGS += -I$(abspath ../include/mingw-compat) -endif - -BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing - -# Rack code is not tested for this flag, unset it -BUILD_CXX_FLAGS += -U_GLIBCXX_ASSERTIONS -Wp,-U_GLIBCXX_ASSERTIONS - # -------------------------------------------------------------- # override VCV arch.mk stuff so we can build more architectures diff --git a/plugins/Makefile b/plugins/Makefile index 3601ff68..43bce9fa 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -4,6 +4,7 @@ # Created by falkTX # +BUILDING_RACK = true ROOT = .. include $(ROOT)/Makefile.base.mk @@ -1260,134 +1261,22 @@ else BUILD_DIR = ../build/plugins endif -ifeq ($(MACOS),true) -BASE_FLAGS += -DARCH_MAC -else ifeq ($(WINDOWS),true) -BASE_FLAGS += -DARCH_WIN -else -BASE_FLAGS += -DARCH_LIN -endif - BASE_FLAGS += -DBUILDING_PLUGIN_MODULES -BASE_FLAGS += -I../dpf/dgl/src/nanovg -BASE_FLAGS += -I../dpf/distrho - -BASE_FLAGS += -I../include -BASE_FLAGS += -I../include/osdialog-stub -BASE_FLAGS += -I../include/simd-compat -BASE_FLAGS += -I../include/simde - -ifeq ($(HAVE_X11),true) -BASE_FLAGS += -DHAVE_X11 -endif - -ifeq ($(SYSDEPS),true) -BASE_FLAGS += -DCARDINAL_SYSDEPS -BASE_FLAGS += $(shell $(PKG_CONFIG) --cflags jansson libarchive samplerate speexdsp) -BASE_FLAGS += -I../deps/sysroot/include -else -BASE_FLAGS += -DZSTDLIB_VISIBILITY= -BASE_FLAGS += -I../src/Rack/dep/include -endif - -BASE_FLAGS += -I../src -BASE_FLAGS += -I../src/Rack/include -BASE_FLAGS += -I../src/Rack/include/dsp -BASE_FLAGS += -I../src/Rack/dep/filesystem/include -# # BASE_FLAGS += -I../src/Rack/dep/fuzzysearchdatabase/src -BASE_FLAGS += -I../src/Rack/dep/glfw/include -BASE_FLAGS += -I../src/Rack/dep/nanosvg/src -BASE_FLAGS += -I../src/Rack/dep/oui-blendish -BASE_FLAGS += -I../src/Rack/dep/pffft - -ifeq ($(DEBUG),true) -BASE_FLAGS += -UDEBUG -endif - -ifeq ($(HEADLESS),true) -BASE_FLAGS += -DHEADLESS -endif - -# SIMD must always be enabled, even in debug builds -ifeq ($(NOSIMD),true) -BASE_FLAGS += -DCARDINAL_NOSIMD -else ifeq ($(DEBUG),true) -ifeq ($(WASM),true) -BASE_FLAGS += -msse -msse2 -msse3 -msimd128 -else ifeq ($(CPU_ARM32),true) -BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard -else ifeq ($(CPU_I386_OR_X86_64),true) -BASE_FLAGS += -msse -msse2 -mfpmath=sse -endif -endif - -ifeq ($(BSD)$(WASM),true) -BASE_FLAGS += -D'aligned_alloc_16(ptr)'='aligned_alloc(16,ptr)' -BASE_FLAGS += -D'aligned_free_16(ptr)'='free(ptr)' -endif - -ifeq ($(MOD_BUILD),true) -BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp -endif - -ifneq ($(WASM),true) -ifneq ($(HAIKU),true) -BASE_FLAGS += -pthread -endif -endif - -ifeq ($(WINDOWS),true) -BASE_FLAGS += -D_USE_MATH_DEFINES -BASE_FLAGS += -DWIN32_LEAN_AND_MEAN -BASE_FLAGS += -D_WIN32_WINNT=0x0600 -BASE_FLAGS += -I../include/mingw-compat -endif - -ifeq ($(USE_GLES2),true) -BASE_FLAGS += -DNANOVG_GLES2_FORCED -else ifeq ($(USE_GLES3),true) -BASE_FLAGS += -DNANOVG_GLES3_FORCED -endif +BASE_FLAGS += -I$(abspath $(ROOT)/include/osdialog-stub) ifeq ($(shell $(PKG_CONFIG) --exists sndfile && echo true),true) BASE_FLAGS += -DHAVE_SNDFILE endif -BUILD_C_FLAGS += -std=gnu11 - -ifneq ($(MACOS),true) -BUILD_CXX_FLAGS += -faligned-new -Wno-abi -ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -std=gnu++17 -endif -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 - -# Ignore warnings from simde -ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -Wno-overflow +ifeq ($(HAVE_X11),true) +BASE_FLAGS += -DHAVE_X11 endif # Use this for any plugins that rely on NaN presence NOFINITE_FLAGS = -fno-finite-math-only -fno-strict-aliasing # -------------------------------------------------------------- -# lots of warnings from VCV side - -BASE_FLAGS += -Wno-unused-parameter -BASE_FLAGS += -Wno-unused-variable - -ifeq ($(CPU_ARM_OR_ARM64)$(CPU_RISCV64),true) -BASE_FLAGS += -Wno-attributes -endif - -# -------------------------------------------------------------- -# also from plugins +# lots of warnings from plugins BASE_FLAGS += -Wno-deprecated-declarations diff --git a/src/Makefile b/src/Makefile index bcee861c..9e7cf1b3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,6 +4,7 @@ # Created by falkTX # +BUILDING_RACK = true ROOT = .. include $(ROOT)/Makefile.base.mk @@ -16,128 +17,17 @@ else BUILD_DIR = ../build/rack endif -ifeq ($(MACOS),true) -BASE_FLAGS += -DARCH_MAC -else ifeq ($(WINDOWS),true) -BASE_FLAGS += -DARCH_WIN -else -BASE_FLAGS += -DARCH_LIN -endif - -ifeq ($(HAIKU),true) -BASE_FLAGS += -I../include/linux-compat -else ifeq ($(WASM),true) -BASE_FLAGS += -I../include/linux-compat -endif - BASE_FLAGS += -DPRIVATE= -BASE_FLAGS += -I../dpf/dgl/src/nanovg -BASE_FLAGS += -I../dpf/distrho -BASE_FLAGS += -I../include -BASE_FLAGS += -I../include/simd-compat -BASE_FLAGS += -IRack/include -ifeq ($(SYSDEPS),true) -BASE_FLAGS += -DCARDINAL_SYSDEPS -BASE_FLAGS += $(shell pkg-config --cflags jansson libarchive samplerate speexdsp) -else -BASE_FLAGS += -DZSTDLIB_VISIBILITY= -BASE_FLAGS += -IRack/dep/include -endif -BASE_FLAGS += -IRack/dep/filesystem/include -BASE_FLAGS += -IRack/dep/fuzzysearchdatabase/src -BASE_FLAGS += -IRack/dep/glfw/include -BASE_FLAGS += -IRack/dep/nanosvg/src -BASE_FLAGS += -IRack/dep/osdialog -BASE_FLAGS += -IRack/dep/oui-blendish -BASE_FLAGS += -IRack/dep/pffft - -ifeq ($(CPU_I386),true) -# needed for enabling SSE in pffft -BASE_FLAGS += -Di386 -endif - -ifeq ($(DEBUG),true) -BASE_FLAGS += -UDEBUG -endif +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/osdialog) ifeq ($(HAVE_LIBLO),true) BASE_FLAGS += -DHAVE_LIBLO $(LIBLO_FLAGS) endif -ifeq ($(HEADLESS),true) -BASE_FLAGS += -DHEADLESS -endif - -# SIMD must always be enabled, even in debug builds -ifeq ($(NOSIMD),true) -BASE_FLAGS += -DCARDINAL_NOSIMD -else ifeq ($(DEBUG),true) -ifeq ($(WASM),true) -BASE_FLAGS += -msse -msse2 -msse3 -msimd128 -else ifeq ($(CPU_ARM32),true) -BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard -else ifeq ($(CPU_I386_OR_X86_64),true) -BASE_FLAGS += -msse -msse2 -mfpmath=sse -endif -endif - -ifeq ($(BSD),true) -BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC_PRECISE -endif - -ifeq ($(HAIKU),true) -BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC -endif - -ifeq ($(MOD_BUILD),true) -BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp -endif - -ifneq ($(WASM),true) -ifneq ($(HAIKU),true) -BASE_FLAGS += -pthread -endif -endif - -ifeq ($(WINDOWS),true) -BASE_FLAGS += -D_USE_MATH_DEFINES -BASE_FLAGS += -DWIN32_LEAN_AND_MEAN -BASE_FLAGS += -D_WIN32_WINNT=0x0600 -BASE_FLAGS += -I../include/mingw-compat -endif - -ifeq ($(USE_GLES2),true) -BASE_FLAGS += -DNANOVG_GLES2_FORCED -else ifeq ($(USE_GLES3),true) -BASE_FLAGS += -DNANOVG_GLES3_FORCED -endif - -BUILD_C_FLAGS += -std=gnu11 -BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing -BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing - -ifneq ($(MACOS),true) -BUILD_CXX_FLAGS += -faligned-new -Wno-abi -ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -std=gnu++17 -endif -endif - # use our custom function to invert some colors BUILD_CXX_FLAGS += -DnsvgDelete=nsvgDeleteCardinal 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 - -# Ignore warnings from simde -ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -Wno-overflow -endif - # -------------------------------------------------------------- # Rack files to build diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 66833075..0cc3b7fc 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -4,6 +4,7 @@ # Created by falkTX # +BUILDING_RACK = true ROOT = ../.. include $(ROOT)/Makefile.base.mk @@ -62,11 +63,7 @@ endif # CARDINAL_VARIANT mini PREFIX ?= /usr/local -ifeq ($(SYSDEPS),true) -DEP_LIB_PATH = $(abspath ../../deps/sysroot/lib) -else -DEP_LIB_PATH = $(abspath ../Rack/dep/lib) -endif +DEP_LIB_PATH = $(RACK_DEP_PATH)/lib # -------------------------------------------------------------- # Files to build (DPF stuff) @@ -266,97 +263,15 @@ include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Extra flags for VCV stuff -ifeq ($(MACOS),true) -BASE_FLAGS += -DARCH_MAC -else ifeq ($(WINDOWS),true) -BASE_FLAGS += -DARCH_WIN -else -BASE_FLAGS += -DARCH_LIN -endif - BASE_FLAGS += -DPRIVATE= -BASE_FLAGS += -I.. -BASE_FLAGS += -I../../dpf/dgl/src/nanovg -BASE_FLAGS += -I../../include -BASE_FLAGS += -I../../include/simd-compat -BASE_FLAGS += -I../Rack/include -ifeq ($(SYSDEPS),true) -BASE_FLAGS += -DCARDINAL_SYSDEPS -BASE_FLAGS += $(shell $(PKG_CONFIG) --cflags jansson libarchive samplerate speexdsp) -else -BASE_FLAGS += -DZSTDLIB_VISIBILITY= -BASE_FLAGS += -I../Rack/dep/include -endif -BASE_FLAGS += -I../Rack/dep/glfw/include -BASE_FLAGS += -I../Rack/dep/nanosvg/src -BASE_FLAGS += -I../Rack/dep/oui-blendish - -ifeq ($(HEADLESS),true) -BASE_FLAGS += -DHEADLESS -endif - -# SIMD must always be enabled, even in debug builds -ifeq ($(NOSIMD),true) -BASE_FLAGS += -DCARDINAL_NOSIMD -else ifeq ($(DEBUG),true) -ifeq ($(WASM),true) -BASE_FLAGS += -msse -msse2 -msse3 -msimd128 -else ifeq ($(CPU_ARM32),true) -BASE_FLAGS += -mfpu=neon-vfpv4 -mfloat-abi=hard -else ifeq ($(CPU_I386_OR_X86_64),true) -BASE_FLAGS += -msse -msse2 -mfpmath=sse -endif -endif ifeq ($(MOD_BUILD),true) BASE_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 -BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp -LINK_FLAGS += -fopenmp else ifeq ($(CARDINAL_VARIANT),mini) -BUILD_CXX_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff -endif - -ifneq ($(WASM),true) -ifneq ($(HAIKU),true) -BASE_FLAGS += -pthread -endif -endif - -ifeq ($(WINDOWS),true) -BASE_FLAGS += -D_USE_MATH_DEFINES -BASE_FLAGS += -DWIN32_LEAN_AND_MEAN -BASE_FLAGS += -D_WIN32_WINNT=0x0600 -BASE_FLAGS += -I../../include/mingw-compat -endif - -ifeq ($(USE_GLES2),true) -BASE_FLAGS += -DNANOVG_GLES2_FORCED -else ifeq ($(USE_GLES3),true) -BASE_FLAGS += -DNANOVG_GLES3_FORCED -endif - -BUILD_C_FLAGS += -std=gnu11 - -ifneq ($(MACOS),true) -BUILD_CXX_FLAGS += -faligned-new -Wno-abi -ifeq ($(MOD_BUILD),true) -BUILD_CXX_FLAGS += -std=gnu++17 -endif +BASE_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff 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 - -BASE_FLAGS += -Wno-unused-parameter -BASE_FLAGS += -Wno-unused-variable - # -------------------------------------------------------------- # extra linker flags @@ -407,9 +322,13 @@ endif LINK_FLAGS += $(foreach d,$(SYMLINKED_DIRS_RESOURCES),--preload-file=../../bin/CardinalNative.lv2/resources/$(d)@/resources/$(d)) else ifeq ($(HAIKU),true) + LINK_FLAGS += -lpthread + else + LINK_FLAGS += -pthread + endif ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true) @@ -418,11 +337,9 @@ LINK_FLAGS += -ldl endif endif -ifeq ($(BSD),true) -ifeq ($(DEBUG),true) +ifeq ($(BSD)$(DEBUG),true) LINK_FLAGS += -lexecinfo endif -endif ifeq ($(MACOS),true) LINK_FLAGS += -framework IOKit From 792373a96b47427e8b8d45edbed1ad484e7f1be5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 01:54:07 +0200 Subject: [PATCH 321/451] fix juce branch name Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1188bb2d..f3422cd8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -264,7 +264,7 @@ jobs: run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd - git clone --depth=1 -b 6.1.6 https://github.com/DISTRHO/JUCE.git jucewrapper/JUCE + git clone --depth=1 -b v6.1.6 https://github.com/DISTRHO/JUCE.git jucewrapper/JUCE # sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd From 5b2ee452b997fa5bd0c831d8fe22e727e005ddfd Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 01:56:59 +0200 Subject: [PATCH 322/451] Fix wasm build Signed-off-by: falkTX --- Makefile.base.mk | 5 ----- plugins/Makefile | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index 1b0e9b91..d7d4b2d4 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -71,11 +71,6 @@ ifeq ($(BSD)$(HAIKU),true) BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC endif -ifeq ($(BSD)$(WASM),true) -BASE_FLAGS += -D'aligned_alloc_16(ptr)'='aligned_alloc(16,ptr)' -BASE_FLAGS += -D'aligned_free_16(ptr)'='free(ptr)' -endif - ifeq ($(HAIKU)$(WASM),true) BASE_FLAGS += -I$(abspath $(ROOT)/include/linux-compat) else diff --git a/plugins/Makefile b/plugins/Makefile index 43bce9fa..10377b37 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1264,6 +1264,11 @@ endif BASE_FLAGS += -DBUILDING_PLUGIN_MODULES BASE_FLAGS += -I$(abspath $(ROOT)/include/osdialog-stub) +ifeq ($(BSD)$(WASM),true) +BASE_FLAGS += -D'aligned_alloc_16(ptr)'='aligned_alloc(16,ptr)' +BASE_FLAGS += -D'aligned_free_16(ptr)'='free(ptr)' +endif + ifeq ($(shell $(PKG_CONFIG) --exists sndfile && echo true),true) BASE_FLAGS += -DHAVE_SNDFILE endif From 26e206f3d8ef3ad9a28056a114146c7f41445ad9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 03:29:56 +0200 Subject: [PATCH 323/451] CI build fixes Signed-off-by: falkTX --- .github/workflows/build.yml | 8 ++++---- src/Makefile.cardinal.mk | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3422cd8..06ae3625 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,7 @@ jobs: PKG_CONFIG_PATH: /usr/lib/${{ matrix.target }}-linux-gnu/pkgconfig run: | ./deps/PawPaw/bootstrap-cardinal.sh linux-${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh linux-${{ matrix.target }} - - name: Build linux arm64 cross-compiled + - name: Build linux run: | pushd deps/PawPaw; source local.env linux-${{ matrix.target }}; popd export PATH="/usr/lib/ccache:${PATH}" @@ -121,10 +121,10 @@ jobs: run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - name: Pack binaries run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }} + name: ${{ github.event.repository.name }}-linux-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz - uses: softprops/action-gh-release@v1 @@ -265,7 +265,7 @@ jobs: export PATH="/usr/local/opt/ccache/libexec:${PATH}" pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd git clone --depth=1 -b v6.1.6 https://github.com/DISTRHO/JUCE.git jucewrapper/JUCE - # sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h + ${{ matrix.target == 'intel' }} && sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 0cc3b7fc..0feb19f8 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -337,7 +337,7 @@ LINK_FLAGS += -ldl endif endif -ifeq ($(BSD)$(DEBUG),true) +ifeq ($(BSD)$(DEBUG),truetrue) LINK_FLAGS += -lexecinfo endif From 5a53cd37b88823a4bfe67064fe857213ab02523b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 12:20:52 +0200 Subject: [PATCH 324/451] Cleanup some more CI details, auto-load nosimd wasm Signed-off-by: falkTX --- .github/workflows/build.yml | 262 +++++++---------------------- Makefile.base.mk | 20 ++- jucewrapper/CMakeLists.txt | 4 - src/Makefile.cardinal.mk | 12 +- src/emscripten/CardinalMini.html | 16 +- src/emscripten/CardinalNative.html | 19 ++- 6 files changed, 103 insertions(+), 230 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06ae3625..ef41d5cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,8 +107,8 @@ jobs: ./deps/PawPaw/bootstrap-cardinal.sh linux-${{ matrix.target }} && ./deps/PawPaw/.cleanup.sh linux-${{ matrix.target }} - name: Build linux run: | - pushd deps/PawPaw; source local.env linux-${{ matrix.target }}; popd export PATH="/usr/lib/ccache:${PATH}" + source deps/PawPaw/local.env linux-${{ matrix.target }} export PKG_CONFIG_PATH+=:/usr/lib/${{ matrix.target }}-linux-gnu/pkgconfig make features make HAVE_PULSEAUDIO=false NOOPT=true -j $(nproc) @@ -169,7 +169,7 @@ jobs: path: | *.tar.gz - linux-headless: + headless: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -186,7 +186,7 @@ jobs: make HEADLESS=true features make HEADLESS=true -j $(nproc) - linux-lto: + lto: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -202,7 +202,7 @@ jobs: make features make WITH_LTO=true -j $(nproc) - linux-sysdeps: + sysdeps: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -256,32 +256,32 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" - pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd + source deps/PawPaw/local.env macos-${{ matrix.target }} make features make NOOPT=true -j $(sysctl -n hw.logicalcpu) - name: Build macOS (AU using juce) if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" - pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd + source deps/PawPaw/local.env macos-${{ matrix.target }} git clone --depth=1 -b v6.1.6 https://github.com/DISTRHO/JUCE.git jucewrapper/JUCE ${{ matrix.target == 'intel' }} && sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build - pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd + pushd jucewrapper/build; cmake -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - name: Build macOS (intel packaging) if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'intel' }} env: MACOS_ARCHS: 'x86_64' run: | - pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd + source deps/PawPaw/local.env macos-${{ matrix.target }} ./utils/create-macos-installer.sh - name: Build macOS (universal packaging) if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'universal' }} env: MACOS_ARCHS: 'arm64,x86_64' run: | - pushd deps/PawPaw; source local.env macos-${{ matrix.target }}; popd + source deps/PawPaw/local.env macos-${{ matrix.target }} ./utils/create-macos-installer.sh - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -308,93 +308,17 @@ jobs: files: | ${{ github.event.repository.name }}-*.pkg - modduo: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - uses: actions/cache@v3 - id: mpb-cache - with: - path: | - ~/mod-workdir - key: modduo-static-v${{ env.CACHE_VERSION }} - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static - sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra - sudo apt-get clean - - name: Bootstrap toolchain - if: steps.mpb-cache.outputs.cache-hit != 'true' - run: | - git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder - sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config - $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static - - name: Build for modduo - if: steps.mpb-cache.outputs.cache-hit == 'true' - run: | - make HEADLESS=true modduo-features - make HEADLESS=true MODDUO=true modduo -j $(nproc) - - name: Set sha8 - id: slug - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Pack binaries - if: steps.mpb-cache.outputs.cache-hit == 'true' - run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.tar.gz - - modduox: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - uses: actions/cache@v3 - id: mpb-cache - with: - path: | - ~/mod-workdir - key: modduox-v${{ env.CACHE_VERSION }} - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static - sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra - sudo apt-get clean - - name: Bootstrap toolchain - if: steps.mpb-cache.outputs.cache-hit != 'true' - run: | - git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder - sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config - $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static - - name: Build for modduox - if: steps.mpb-cache.outputs.cache-hit == 'true' - run: | - make HEADLESS=true modduox-features - make HEADLESS=true modduox -j $(nproc) - - name: Set sha8 - id: slug - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Pack binaries - if: steps.mpb-cache.outputs.cache-hit == 'true' - run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.tar.gz - - moddwarf: + modaudio: + strategy: + matrix: + include: + - name: modduo + target: modduo-static + extraflags: MODDUO=true + - name: modduox + target: modduox-static + - name: moddwarf + target: moddwarf runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -406,7 +330,7 @@ jobs: with: path: | ~/mod-workdir - key: moddwarf-v${{ env.CACHE_VERSION }} + key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -418,26 +342,29 @@ jobs: run: | git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config - $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf - - name: Build for moddwarf + $(pwd)/deps/mod-plugin-builder/bootstrap.sh ${{ matrix.target }} minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh ${{ matrix.target }} + - name: Build for modaudio if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - make HEADLESS=true moddwarf-features - make HEADLESS=true moddwarf -j $(nproc) + make HEADLESS=true ${{ matrix.name }}-features + make HEADLESS=true ${{ matrix.extraflags }} ${{ matrix.name }} -j $(nproc) - name: Set sha8 id: slug run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - name: Pack binaries if: steps.mpb-cache.outputs.cache-hit == 'true' run: | - tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) + tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }} + name: ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }} path: | *.tar.gz wasm: + strategy: + matrix: + target: [simd, nosimd] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 @@ -458,7 +385,7 @@ jobs: src/Rack/dep/libsamplerate-0.1.9 src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 - key: wasm-v${{ env.CACHE_VERSION }} + key: wasm-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Set up dependencies run: | sudo apt-get update -qq @@ -468,115 +395,40 @@ jobs: cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} - name: Build extra dependencies run: | + ${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1 source ~/PawPawBuilds/emsdk/emsdk_env.sh ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm - name: Build wasm cross-compiled if: steps.cache.outputs.cache-hit == 'true' run: | + ${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1 source ~/PawPawBuilds/emsdk/emsdk_env.sh - pushd deps/PawPaw; source local.env wasm; popd - make features - make HAVE_LIBLO=false NOOPT=true -j $(nproc) - - name: Make wasm versioned and compress - if: steps.cache.outputs.cache-hit == 'true' - run: | - VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') - cd bin - sed -i "s/CardinalMini\./CardinalMini-v${VERSION}\./g" *.html *.js - sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js - mv CardinalMini.data CardinalMini-v${VERSION}.data - mv CardinalMini.js CardinalMini-v${VERSION}.js - mv CardinalMini.wasm CardinalMini-v${VERSION}.wasm - mv CardinalNative.data CardinalNative-v${VERSION}.data - mv CardinalNative.js CardinalNative-v${VERSION}.js - mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm - brotli -k -q 11 *.data *.html *.js *.wasm - - name: Set sha8 (non-release) - if: startsWith(github.ref, 'refs/tags/') != true - run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV - - name: Set sha8 (release) - if: startsWith(github.ref, 'refs/tags/') - run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - name: Pack binaries - if: steps.cache.outputs.cache-hit == 'true' - run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }} - path: | - *.zip - - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - tag_name: ${{ github.ref_name }} - name: ${{ github.ref_name }} - draft: false - prerelease: false - files: | - *.zip - - wasm-noopt: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up cache - id: cache - uses: actions/cache@v3 - with: - path: | - ~/PawPawBuilds - src/Rack/dep/bin - src/Rack/dep/include - src/Rack/dep/lib - src/Rack/dep/share - src/Rack/dep/jansson-2.12 - src/Rack/dep/libarchive-3.4.3 - src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - src/Rack/dep/zstd-1.4.5 - key: wasm-noopt-v${{ env.CACHE_VERSION }} - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -yqq brotli gperf - sudo apt-get clean - [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk - cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} - - name: Build extra dependencies - env: - PAWPAW_NOSIMD: 1 - run: | - source ~/PawPawBuilds/emsdk/emsdk_env.sh - ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm - - name: Build wasm-noopt cross-compiled - if: steps.cache.outputs.cache-hit == 'true' - env: - PAWPAW_NOSIMD: 1 - NOSIMD: true - run: | - source ~/PawPawBuilds/emsdk/emsdk_env.sh - pushd deps/PawPaw; source local.env wasm; popd + source deps/PawPaw/local.env wasm # FIXME send patch upstream, assuming this works.. sed -i -e 's/defined(__riscv)/defined(__riscv) || defined(__EMSCRIPTEN__)/' plugins/surgext/surge/src/common/globals.h make features - make HAVE_LIBLO=false NOOPT=true -j $(nproc) - make HAVE_LIBLO=false NOOPT=true -j $(nproc) -C src/CardinalMiniSep modgui - - name: Make wasm-noopt versioned and compress + make HAVE_LIBLO=false NOOPT=true NOSIMD=${{ matrix.target == 'nosimd' }} -j $(nproc) + - name: Build modgui + if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'nosimd' }} + run: | + ${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1 + source ~/PawPawBuilds/emsdk/emsdk_env.sh + source deps/PawPaw/local.env wasm + make HAVE_LIBLO=false NOOPT=true NOSIMD=true -j $(nproc) -C src/CardinalMiniSep modgui + - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | + ${{ matrix.target == 'nosimd' }} && export SUFFIX="-nosimd" VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') cd bin - sed -i "s/CardinalMini\./CardinalMini-noopt-v${VERSION}\./g" *.html *.js - sed -i "s/CardinalNative\./CardinalNative-noopt-v${VERSION}\./g" *.html *.js - mv CardinalMini.data CardinalMini-noopt-v${VERSION}.data - mv CardinalMini.js CardinalMini-noopt-v${VERSION}.js - mv CardinalMini.wasm CardinalMini-noopt-v${VERSION}.wasm - mv CardinalNative.data CardinalNative-noopt-v${VERSION}.data - mv CardinalNative.js CardinalNative-noopt-v${VERSION}.js - mv CardinalNative.wasm CardinalNative-noopt-v${VERSION}.wasm + sed -i "s/CardinalMini${SUFFIX}\./CardinalMini${SUFFIX}-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalNative${SUFFIX}\./CardinalNative${SUFFIX}-v${VERSION}\./g" *.html *.js + mv CardinalMini.data CardinalMini${SUFFIX}-v${VERSION}.data + mv CardinalMini.js CardinalMini${SUFFIX}-v${VERSION}.js + mv CardinalMini.wasm CardinalMini${SUFFIX}-v${VERSION}.wasm + mv CardinalNative.data CardinalNative${SUFFIX}-v${VERSION}.data + mv CardinalNative.js CardinalNative${SUFFIX}-v${VERSION}.js + mv CardinalNative.wasm CardinalNative${SUFFIX}-v${VERSION}.wasm brotli -k -q 11 *.data *.html *.js *.wasm - name: Set sha8 (non-release) if: startsWith(github.ref, 'refs/tags/') != true @@ -587,10 +439,10 @@ jobs: - name: Pack binaries if: steps.cache.outputs.cache-hit == 'true' run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm-noopt) CardinalMini.lv2/modgui + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) - uses: actions/upload-artifact@v3 with: - name: ${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }} + name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | *.zip - uses: softprops/action-gh-release@v1 @@ -660,21 +512,21 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/lib/ccache:${PATH}" - pushd deps/PawPaw; source local.env ${{ matrix.target }}; popd + source deps/PawPaw/local.env ${{ matrix.target }} make features make NOOPT=true -j $(nproc) - name: Build cross-compiled (carla) if: steps.cache.outputs.cache-hit == 'true' run: | export PATH="/usr/lib/ccache:${PATH}" - pushd deps/PawPaw; source local.env ${{ matrix.target }}; popd + source deps/PawPaw/local.env ${{ matrix.target }} make carla-win32 -j $(nproc) make -C carla EMBED_TARGET=true TESTING=true dist make -C carla EMBED_TARGET=true TESTING=true dist - name: Build cross-compiled (packaging) if: steps.cache.outputs.cache-hit == 'true' run: | - pushd deps/PawPaw; source local.env ${{ matrix.target }}; popd + source deps/PawPaw/local.env ${{ matrix.target }} xvfb-run ./utils/create-windows-installer.sh ${{ matrix.target }} make unzipfx - name: Set sha8 (non-release) diff --git a/Makefile.base.mk b/Makefile.base.mk index d7d4b2d4..13940c19 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -8,16 +8,22 @@ ifeq ($(ROOT),) $(error invalid usage) endif +ifeq ($(NOSIMD),true) +ifneq (,$(findstring -msse,$(CXXFLAGS))) +$(error NOSIMD build requested but -msse compiler flag is present in CXXFLAGS) +endif +endif + # ----------------------------------------------------------------------------- # Import base definitions -DISTRHO_NAMESPACE = CardinalDISTRHO -DGL_NAMESPACE = CardinalDGL -NVG_DISABLE_SKIPPING_WHITESPACE = true -NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST -USE_NANOVG_FBO = true -WASM_EXCEPTIONS = true -WINDOWS_ICON_ID = 401 +export DISTRHO_NAMESPACE = CardinalDISTRHO +export DGL_NAMESPACE = CardinalDGL +export NVG_DISABLE_SKIPPING_WHITESPACE = true +export NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST +export USE_NANOVG_FBO = true +export WASM_EXCEPTIONS = true +export WINDOWS_ICON_ID = 401 include $(ROOT)/dpf/Makefile.base.mk DGL_EXTRA_ARGS = \ diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 9d97a5e9..3cc44bd2 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -237,7 +237,6 @@ target_link_libraries(Cardinal -lmagic PUBLIC juce::juce_recommended_config_flags - juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) #]] @@ -340,7 +339,6 @@ target_link_libraries(CardinalFX -lmagic PUBLIC juce::juce_recommended_config_flags - juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) # MIDI variant @@ -442,7 +440,6 @@ target_link_libraries(CardinalMIDI -lmagic PUBLIC juce::juce_recommended_config_flags - juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) # Synth variant @@ -544,5 +541,4 @@ target_link_libraries(CardinalSynth -lmagic PUBLIC juce::juce_recommended_config_flags - juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 0feb19f8..c0ebe951 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -219,7 +219,7 @@ endif endif ifeq ($(WASM),true) -WASM_RESOURCES = $(LV2_RESOURCES) +WASM_RESOURCES = $(TARGET_DIR)/$(NAME).html $(LV2_RESOURCES) ifneq ($(CARDINAL_VARIANT),mini) WASM_RESOURCES += $(CURDIR)/lv2/fomp.lv2/manifest.ttl @@ -256,6 +256,10 @@ else ifneq ($(CARDINAL_VARIANT),mini) FORCE_NATIVE_AUDIO_FALLBACK = true endif +ifeq ($(WASM),true) +APP_EXT = .js +endif + USE_VST2_BUNDLE = true USE_CLAP_BUNDLE = true include ../../dpf/Makefile.plugins.mk @@ -283,10 +287,8 @@ LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 ifeq ($(CARDINAL_VARIANT),mini) -LINK_FLAGS += --shell-file=../emscripten/CardinalMini.html LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources else -LINK_FLAGS += --shell-file=../emscripten/CardinalNative.html LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources LINK_FLAGS += --preload-file=./jsfx LINK_FLAGS += --preload-file=./lv2 @@ -434,6 +436,10 @@ $(TARGET_DIR)/%.app/Contents/Resources/distrho.icns: ../../utils/distrho.icns # Extra rules for wasm resources ifeq ($(WASM),true) +$(TARGET_DIR)/$(NAME).html: ../emscripten/$(NAME).html + -@mkdir -p $(shell dirname $@) + cp $< $@ + $(CURDIR)/lv2/fomp.lv2/manifest.ttl: $(TARGET_DIR)/$(NAME).lv2/resources/PluginManifests/Cardinal.json wget -O - https://falktx.com/data/wasm-things-2022-08-15.tar.gz | tar xz -C $(CURDIR) touch $@ diff --git a/src/emscripten/CardinalMini.html b/src/emscripten/CardinalMini.html index ee0ed28b..1525716b 100644 --- a/src/emscripten/CardinalMini.html +++ b/src/emscripten/CardinalMini.html @@ -115,9 +115,6 @@ if (typeof(WebAssembly) === "undefined") { wasmErrors.push('WebAssembly unsupported'); } else { - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]))) { - wasmErrors.push('Bulk Memory Operations unsupported'); - } if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { wasmErrors.push('Importable/Exportable mutable globals unsupported'); } @@ -188,8 +185,19 @@ if (text) console.error('[post-exception status] ' + text); }; }; + + var jsModuleName; + if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { + jsModuleName = "CardinalMini-nosimd.js"; + } else { + jsModuleName = "CardinalMini.js"; + } + var jsModuleScript = document.createElement('script'); + jsModuleScript.setAttribute('async', true); + jsModuleScript.setAttribute('src', jsModuleName); + jsModuleScript.setAttribute('type','text/javascript'); + document.head.appendChild(jsModuleScript); } - {{{ SCRIPT }}} diff --git a/src/emscripten/CardinalNative.html b/src/emscripten/CardinalNative.html index c82a928f..13861c7c 100644 --- a/src/emscripten/CardinalNative.html +++ b/src/emscripten/CardinalNative.html @@ -115,15 +115,9 @@ if (typeof(WebAssembly) === "undefined") { wasmErrors.push('WebAssembly unsupported'); } else { - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11]))) { - wasmErrors.push('Bulk Memory Operations unsupported'); - } if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) { wasmErrors.push('Importable/Exportable mutable globals unsupported'); } - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { - wasmErrors.push('Fixed-Width SIMD unsupported'); - } } if (wasmErrors.length !== 0) { @@ -191,8 +185,19 @@ if (text) console.error('[post-exception status] ' + text); }; }; + + var jsModuleName; + if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { + jsModuleName = "CardinalNative-nosimd.js"; + } else { + jsModuleName = "CardinalNative.js"; + } + var jsModuleScript = document.createElement('script'); + jsModuleScript.setAttribute('async', true); + jsModuleScript.setAttribute('src', jsModuleName); + jsModuleScript.setAttribute('type','text/javascript'); + document.head.appendChild(jsModuleScript); } - {{{ SCRIPT }}} From 39e83285e26a1c4becb7b4080f4ca52f4d975ab5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 15:30:02 +0200 Subject: [PATCH 325/451] Only use remote OSC control in headless/MOD, remove LTO from readme Signed-off-by: falkTX --- .github/workflows/build.yml | 98 ++++++++++++++++++------------------- README.md | 1 - src/CardinalCommon.hpp | 3 +- 3 files changed, 50 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef41d5cf..4489326b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,55 +169,6 @@ jobs: path: | *.tar.gz - headless: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev - sudo apt-get install -yqq liblo-dev - sudo apt-get clean - - name: Build linux (headless) - run: | - make HEADLESS=true features - make HEADLESS=true -j $(nproc) - - lto: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf - sudo apt-get clean - - name: Build linux (LTO) - run: | - make features - make WITH_LTO=true -j $(nproc) - - sysdeps: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev - sudo apt-get clean - - name: Build linux (sysdeps) - run: | - make features - make SYSDEPS=true -j $(nproc) - macos: strategy: matrix: @@ -559,6 +510,55 @@ jobs: Cardinal-*.exe Cardinal-*.zip + headless: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev + sudo apt-get install -yqq liblo-dev + sudo apt-get clean + - name: Build linux (headless) + run: | + make HEADLESS=true features + make HEADLESS=true -j $(nproc) + + lto: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf + sudo apt-get clean + - name: Build linux (LTO) + run: | + make features + make WITH_LTO=true -j $(nproc) + + sysdeps: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev + sudo apt-get clean + - name: Build linux (sysdeps) + run: | + make features + make SYSDEPS=true -j $(nproc) + source-tarball: runs-on: ubuntu-20.04 steps: diff --git a/README.md b/README.md index 6ea7ff7f..8215a392 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,6 @@ Other relevant reasons include: - LV2 plugin version from the start - Proper dark mode support - - Proper optimized build (because all code is compiled to a single file, we can use LTO over the whole thing) - Real CV ports to and from the plugin - Removing online access from the plugin and included modules (no phone-home here!) - Works as a test case for [DPF](https://github.com/DISTRHO/DPF/) and [Carla](https://github.com/falkTX/Carla/) diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 3b59c692..9de27b88 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -75,8 +75,7 @@ void openBrowser(const std::string& url); // ----------------------------------------------------------------------------------------------------------- -// && defined(HEADLESS) -#if defined(HAVE_LIBLO) +#if defined(HAVE_LIBLO) && defined(HEADLESS) # define CARDINAL_INIT_OSC_THREAD #endif From aca0e8d4dba0be8a438159694d9e89d8355fabd7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 23 Apr 2023 19:57:13 +0200 Subject: [PATCH 326/451] Tweaks to wasm nosimd loader Signed-off-by: falkTX --- .github/workflows/build.yml | 6 ++++-- src/emscripten/CardinalMini.html | 10 +++++++--- src/emscripten/CardinalNative.html | 10 +++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4489326b..740be4d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -372,8 +372,10 @@ jobs: ${{ matrix.target == 'nosimd' }} && export SUFFIX="-nosimd" VERSION=$(cat Makefile | awk 'sub("VERSION = ","")') cd bin - sed -i "s/CardinalMini${SUFFIX}\./CardinalMini${SUFFIX}-v${VERSION}\./g" *.html *.js - sed -i "s/CardinalNative${SUFFIX}\./CardinalNative${SUFFIX}-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalMini\./CardinalMini-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalMini-nosimd\./CardinalMini-nosimd-v${VERSION}\./g" *.html *.js + sed -i "s/CardinalNative-nosimd\./CardinalNative-nosimd-v${VERSION}\./g" *.html *.js mv CardinalMini.data CardinalMini${SUFFIX}-v${VERSION}.data mv CardinalMini.js CardinalMini${SUFFIX}-v${VERSION}.js mv CardinalMini.wasm CardinalMini${SUFFIX}-v${VERSION}.wasm diff --git a/src/emscripten/CardinalMini.html b/src/emscripten/CardinalMini.html index 1525716b..77469377 100644 --- a/src/emscripten/CardinalMini.html +++ b/src/emscripten/CardinalMini.html @@ -128,6 +128,7 @@ spinnerElement.style.display = 'none'; } else { var canvasWrapper = document.getElementById('canvas_wrapper'); + var simdSupported = WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])); var Module = { preRun: [], @@ -138,6 +139,9 @@ canvasWrapper.style.display = 'block'; window.dispatchEvent(new Event('resize')); }, + locateFile: function(p,_) { + return p.replace("CardinalMini"+".", simdSupported ? "CardinalMini." : "CardinalMini-nosimd."); + }, canvas: (function() { var canvas = document.getElementById('canvas'); @@ -187,10 +191,10 @@ }; var jsModuleName; - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { - jsModuleName = "CardinalMini-nosimd.js"; - } else { + if (simdSupported) { jsModuleName = "CardinalMini.js"; + } else { + jsModuleName = "CardinalMini-nosimd.js"; } var jsModuleScript = document.createElement('script'); jsModuleScript.setAttribute('async', true); diff --git a/src/emscripten/CardinalNative.html b/src/emscripten/CardinalNative.html index 13861c7c..34ce0d1e 100644 --- a/src/emscripten/CardinalNative.html +++ b/src/emscripten/CardinalNative.html @@ -128,6 +128,7 @@ spinnerElement.style.display = 'none'; } else { var canvasWrapper = document.getElementById('canvas_wrapper'); + var simdSupported = WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])); var Module = { preRun: [], @@ -138,6 +139,9 @@ canvasWrapper.style.display = 'block'; window.dispatchEvent(new Event('resize')); }, + locateFile: function(p,_) { + return p.replace("CardinalNative"+".", simdSupported ? "CardinalNative." : "CardinalNative-nosimd."); + }, canvas: (function() { var canvas = document.getElementById('canvas'); @@ -187,10 +191,10 @@ }; var jsModuleName; - if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))) { - jsModuleName = "CardinalNative-nosimd.js"; - } else { + if (simdSupported) { jsModuleName = "CardinalNative.js"; + } else { + jsModuleName = "CardinalNative-nosimd.js"; } var jsModuleScript = document.createElement('script'); jsModuleScript.setAttribute('async', true); From 266f45f73101515c51a3c8f5f5e5a972d16fc7e1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 24 Apr 2023 00:56:09 +0200 Subject: [PATCH 327/451] Switch makefile imports around to fix CardinalNative Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index c0ebe951..b2dafadc 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -4,10 +4,6 @@ # Created by falkTX # -BUILDING_RACK = true -ROOT = ../.. -include $(ROOT)/Makefile.base.mk - # ----------------------------------------------------------------------------- # Set variant to build @@ -58,6 +54,21 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resample endif # STATIC_BUILD endif # CARDINAL_VARIANT mini +# -------------------------------------------------------------- +# Import base definitions + +ifeq ($(CARDINAL_VARIANT),main) +# main variant should not use rtaudio/sdl2 fallback (it has CV ports) +SKIP_NATIVE_AUDIO_FALLBACK = true +else ifneq ($(CARDINAL_VARIANT),mini) +# other variants should only use rtaudio/sdl2 fallbacks +FORCE_NATIVE_AUDIO_FALLBACK = true +endif + +BUILDING_RACK = true +ROOT = ../.. +include $(ROOT)/Makefile.base.mk + # -------------------------------------------------------------- # Build config @@ -248,14 +259,6 @@ endif # -------------------------------------------------------------- # Do some magic -ifeq ($(CARDINAL_VARIANT),main) -# main variant should not use rtaudio/sdl2 fallback (it has CV ports) -SKIP_NATIVE_AUDIO_FALLBACK = true -else ifneq ($(CARDINAL_VARIANT),mini) -# other variants should only use rtaudio/sdl2 fallbacks -FORCE_NATIVE_AUDIO_FALLBACK = true -endif - ifeq ($(WASM),true) APP_EXT = .js endif From a92384535feff66a69c80f10953a60b303a1c8fc Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 24 Apr 2023 01:15:27 +0200 Subject: [PATCH 328/451] Install mini variant Closes #528 Signed-off-by: falkTX --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 23adb6f2..d6a94551 100644 --- a/Makefile +++ b/Makefile @@ -251,6 +251,7 @@ install: install -d $(DESTDIR)$(PREFIX)/bin install -d $(DESTDIR)$(PREFIX)/lib/lv2/Cardinal.lv2 install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2 + install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalMini.lv2 install -d $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2 install -d $(DESTDIR)$(PREFIX)/lib/clap/Cardinal.clap install -d $(DESTDIR)$(PREFIX)/lib/vst/Cardinal.vst @@ -264,6 +265,7 @@ endif install -m 644 bin/Cardinal.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/Cardinal.lv2/ install -m 644 bin/CardinalFX.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalFX.lv2/ + install -m 644 bin/CardinalMini.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalMini.lv2/ install -m 644 bin/CardinalSynth.lv2/*.* $(DESTDIR)$(PREFIX)/lib/lv2/CardinalSynth.lv2/ install -m 644 bin/Cardinal.clap/*.* $(DESTDIR)$(PREFIX)/lib/clap/Cardinal.clap/ @@ -276,6 +278,7 @@ ifneq ($(VST3_BINARY_DIR),) endif install -m 755 bin/Cardinal$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ + install -m 755 bin/CardinalMini$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ install -m 755 bin/CardinalNative$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/ cp -rL bin/Cardinal.lv2/resources/* $(DESTDIR)$(PREFIX)/share/cardinal/ From c99d0d00d6b9a54be9edc563959ca5cef97195dc Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 24 Apr 2023 08:43:15 +0200 Subject: [PATCH 329/451] Fix wasm locateFile Signed-off-by: falkTX --- carla | 2 +- src/emscripten/CardinalMini.html | 2 +- src/emscripten/CardinalNative.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/carla b/carla index 3b920850..fdccb45b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 3b92085050c3dc00ac304e100ad648d55c067e65 +Subproject commit fdccb45be790393923f75b7a309891254110400a diff --git a/src/emscripten/CardinalMini.html b/src/emscripten/CardinalMini.html index 77469377..c1f68efd 100644 --- a/src/emscripten/CardinalMini.html +++ b/src/emscripten/CardinalMini.html @@ -140,7 +140,7 @@ window.dispatchEvent(new Event('resize')); }, locateFile: function(p,_) { - return p.replace("CardinalMini"+".", simdSupported ? "CardinalMini." : "CardinalMini-nosimd."); + return simdSupported ? p : p.replace("CardinalMini", "CardinalMini-nosimd"); }, canvas: (function() { var canvas = document.getElementById('canvas'); diff --git a/src/emscripten/CardinalNative.html b/src/emscripten/CardinalNative.html index 34ce0d1e..98cb1911 100644 --- a/src/emscripten/CardinalNative.html +++ b/src/emscripten/CardinalNative.html @@ -140,7 +140,7 @@ window.dispatchEvent(new Event('resize')); }, locateFile: function(p,_) { - return p.replace("CardinalNative"+".", simdSupported ? "CardinalNative." : "CardinalNative-nosimd."); + return simdSupported ? p : p.replace("CardinalNative", "CardinalNative-nosimd"); }, canvas: (function() { var canvas = document.getElementById('canvas'); From 09ad2171345449b392789dcaa447752ff99f58ed Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 24 Apr 2023 19:09:53 +0200 Subject: [PATCH 330/451] Some build flags need to be last.. Signed-off-by: falkTX --- Makefile.base.mk | 5 +++-- dpf | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index 13940c19..b248d893 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -90,8 +90,9 @@ BASE_FLAGS += -D_WIN32_WINNT=0x0600 BASE_FLAGS += -I$(abspath $(ROOT)/include/mingw-compat) endif -BASE_OPTS += -fno-finite-math-only -BASE_OPTS += -fno-strict-aliasing +# make sure these flags always end up last +BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing +BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing # ----------------------------------------------------------------------------- # Rack build flags diff --git a/dpf b/dpf index dc6557a3..79cd0a46 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit dc6557a3c935ae4bb68f89d8bc698a805fff788e +Subproject commit 79cd0a46b2caaa242ac8fd8ad198ae067826e5ea From 871c6dbaf4a285d6f6a855ec706316e37d90ee41 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 00:44:04 +0200 Subject: [PATCH 331/451] Initial work for AIDA-X module Signed-off-by: falkTX --- .gitmodules | 3 + plugins/Cardinal/orig/AIDA-X.svg | 137 ++++ plugins/Cardinal/plugin.json | 10 + plugins/Cardinal/res/AIDA-X.svg | 184 +++++ plugins/Cardinal/res/aida-x-knob.svg | 8 + plugins/Cardinal/res/aida-x-scale.svg | 35 + plugins/Cardinal/src/AIDA-X.cpp | 605 ++++++++++++++++ plugins/Cardinal/src/AIDA-X/Biquad.cpp | 165 +++++ plugins/Cardinal/src/AIDA-X/Biquad.h | 60 ++ plugins/Cardinal/src/AIDA-X/RTNeural | 1 + plugins/Cardinal/src/AIDA-X/model_variant.hpp | 683 ++++++++++++++++++ plugins/Cardinal/src/plugin.hpp | 1 + plugins/Makefile | 28 + plugins/plugins-mini.cpp | 1 + plugins/plugins.cpp | 1 + 15 files changed, 1922 insertions(+) create mode 100644 plugins/Cardinal/orig/AIDA-X.svg create mode 100644 plugins/Cardinal/res/AIDA-X.svg create mode 100644 plugins/Cardinal/res/aida-x-knob.svg create mode 100644 plugins/Cardinal/res/aida-x-scale.svg create mode 100644 plugins/Cardinal/src/AIDA-X.cpp create mode 100644 plugins/Cardinal/src/AIDA-X/Biquad.cpp create mode 100644 plugins/Cardinal/src/AIDA-X/Biquad.h create mode 160000 plugins/Cardinal/src/AIDA-X/RTNeural create mode 100644 plugins/Cardinal/src/AIDA-X/model_variant.hpp diff --git a/.gitmodules b/.gitmodules index 6241e86a..cd1f6ca6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -227,3 +227,6 @@ [submodule "plugins/Sapphire"] path = plugins/Sapphire url = https://github.com/cosinekitty/sapphire.git +[submodule "plugins/Cardinal/src/AIDA-X/RTNeural"] + path = plugins/Cardinal/src/AIDA-X/RTNeural + url = https://github.com/jatinchowdhury18/RTNeural.git diff --git a/plugins/Cardinal/orig/AIDA-X.svg b/plugins/Cardinal/orig/AIDA-X.svg new file mode 100644 index 00000000..58d5190f --- /dev/null +++ b/plugins/Cardinal/orig/AIDA-X.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + Aida DSP : AIDA-X + + diff --git a/plugins/Cardinal/plugin.json b/plugins/Cardinal/plugin.json index ff96849d..4086063a 100644 --- a/plugins/Cardinal/plugin.json +++ b/plugins/Cardinal/plugin.json @@ -117,6 +117,16 @@ "Visual" ] }, + { + "slug": "AIDA-X", + "name": "AIDA-X", + "description": "Amp Model Player leveraging AI", + "manualUrl": "https://github.com/DISTRHO/Cardinal/blob/main/docs/CARDINAL-MODULES.md#aidax", + "tags": [ + "Distortion", + "Effect" + ] + }, { "slug": "Blank", "name": "Blank", diff --git a/plugins/Cardinal/res/AIDA-X.svg b/plugins/Cardinal/res/AIDA-X.svg new file mode 100644 index 00000000..1cc3277e --- /dev/null +++ b/plugins/Cardinal/res/AIDA-X.svg @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/Cardinal/res/aida-x-knob.svg b/plugins/Cardinal/res/aida-x-knob.svg new file mode 100644 index 00000000..278ac6ef --- /dev/null +++ b/plugins/Cardinal/res/aida-x-knob.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/plugins/Cardinal/res/aida-x-scale.svg b/plugins/Cardinal/res/aida-x-scale.svg new file mode 100644 index 00000000..020bd1e3 --- /dev/null +++ b/plugins/Cardinal/res/aida-x-scale.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/Cardinal/src/AIDA-X.cpp b/plugins/Cardinal/src/AIDA-X.cpp new file mode 100644 index 00000000..6f62b2e2 --- /dev/null +++ b/plugins/Cardinal/src/AIDA-X.cpp @@ -0,0 +1,605 @@ +/* + * AIDA-X Cardinal plugin + * Copyright (C) 2022-2023 Massimo Pennazio + * Copyright (C) 2023 Filipe Coelho + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "plugincontext.hpp" +#include "ModuleWidgets.hpp" + +#include "extra/Sleep.hpp" + +#include "AIDA-X/Biquad.cpp" +#include "AIDA-X/model_variant.hpp" + +#ifndef HEADLESS +# include "ImGuiWidget.hpp" +# include "ghc/filesystem.hpp" +#endif + +// -------------------------------------------------------------------------------------------------------------------- + +/* Define a constexpr for converting a gain in dB to a coefficient */ +static constexpr float DB_CO(const float g) { return g > -90.f ? std::pow(10.f, g * 0.05f) : 0.f; } + +/* Define a macro to re-maps a number from one range to another */ +static constexpr float MAP(const float x, const float in_min, const float in_max, const float out_min, const float out_max) +{ + return ((x - in_min) * (out_max - out_min) / (in_max - in_min)) + out_min; +} + +/* Defines for tone controls */ +static constexpr const float COMMON_Q = 0.707f; + +/* Defines for antialiasing filter */ +static constexpr const float INLPF_MAX_CO = 0.99f * 0.5f; /* coeff * ((samplerate / 2) / samplerate) */ +static constexpr const float INLPF_MIN_CO = 0.25f * 0.5f; /* coeff * ((samplerate / 2) / samplerate) */ + +// -------------------------------------------------------------------------------------------------------------------- + +struct DynamicModel { + ModelVariantType variant; + bool input_skip; /* Means the model has been trained with first input element skipped to the output */ + float input_gain; + float output_gain; +}; + +// -------------------------------------------------------------------------------------------------------------------- +// This function carries model calculations + +static inline +void applyModel(DynamicModel* model, float* const out, uint32_t numSamples) +{ + const bool input_skip = model->input_skip; + const float input_gain = model->input_gain; + const float output_gain = model->output_gain; + + std::visit( + [&out, numSamples, input_skip, input_gain, output_gain] (auto&& custom_model) + { + using ModelType = std::decay_t; + + if (d_isNotEqual(input_gain, 1.f)) + { + for (uint32_t i=0; ivariant + ); +} + +static inline +float applyModel(DynamicModel* model, float sample) +{ + const bool input_skip = model->input_skip; + const float input_gain = model->input_gain; + const float output_gain = model->output_gain; + + sample *= input_gain; + + std::visit( + [&sample, input_skip, output_gain] (auto&& custom_model) + { + using ModelType = std::decay_t; + float* out = &sample; + + if constexpr (ModelType::input_size == 1) + { + if (input_skip) + { + sample += custom_model.forward(out); + sample *= output_gain; + } + else + { + sample = custom_model.forward(out) * output_gain; + } + } + }, + model->variant + ); + + return sample; +} + +// -------------------------------------------------------------------------------------------------------------------- + +struct AidaPluginModule : Module { + enum ParamIds { + PARAM_INPUT_LEVEL, + PARAM_OUTPUT_LEVEL, + NUM_PARAMS + }; + enum InputIds { + AUDIO_INPUT, + NUM_INPUTS + }; + enum OutputIds { + AUDIO_OUTPUT, + NUM_OUTPUTS + }; + enum LightIds { + NUM_LIGHTS + }; + + enum Parameters { + kParameterCount + }; + + CardinalPluginContext* const pcontext; + bool fileChanged = false; + std::string currentFile; + + Biquad dc_blocker { bq_type_highpass, 0.5f, COMMON_Q, 0.0f }; + Biquad in_lpf { bq_type_lowpass, 0.5f, COMMON_Q, 0.0f }; + dsp::ExponentialFilter inlevel; + dsp::ExponentialFilter outlevel; + DynamicModel* model = nullptr; + std::atomic activeModel { false }; + + AidaPluginModule() + : pcontext(static_cast(APP)) + { + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + + configInput(AUDIO_INPUT, "Audio"); + configOutput(AUDIO_OUTPUT, "Audio"); + configParam(PARAM_INPUT_LEVEL, -12.f, 12.f, 0.f, "Input level", " dB"); + configParam(PARAM_OUTPUT_LEVEL, -12.f, 12.f, 0.f, "Output level", " dB"); + + inlevel.setTau(1 / 30.f); + outlevel.setTau(1 / 30.f); + } + + ~AidaPluginModule() override + { + delete model; + } + + json_t* dataToJson() override + { + json_t* const rootJ = json_object(); + DISTRHO_SAFE_ASSERT_RETURN(rootJ != nullptr, nullptr); + + json_object_set_new(rootJ, "filepath", json_string(currentFile.c_str())); + + return rootJ; + } + + void dataFromJson(json_t* const rootJ) override + { + fileChanged = false; + + if (json_t* const filepathJ = json_object_get(rootJ, "filepath")) + { + const char* const filepath = json_string_value(filepathJ); + + if (filepath[0] != '\0') + { + currentFile = filepath; + fileChanged = true; + + loadModelFromFile(filepath); + } + } + + if (! fileChanged) + { + currentFile.clear(); + fileChanged = true; + } + } + + void loadModelFromFile(const char* const filename) + { + try { + std::ifstream jsonStream(filename, std::ifstream::binary); + loadModelFromStream(jsonStream); + } + catch (const std::exception& e) { + d_stderr2("Unable to load json file: %s\nError: %s", filename, e.what()); + }; + } + + void loadModelFromStream(std::istream& jsonStream) + { + int input_size; + int input_skip; + float input_gain; + float output_gain; + nlohmann::json model_json; + + try { + jsonStream >> model_json; + + /* Understand which model type to load */ + input_size = model_json["in_shape"].back().get(); + if (input_size > 1) { // MAX_INPUT_SIZE + throw std::invalid_argument("Value for input_size not supported"); + } + + if (model_json["in_skip"].is_number()) { + input_skip = model_json["in_skip"].get(); + if (input_skip > 1) + throw std::invalid_argument("Values for in_skip > 1 are not supported"); + } + else { + input_skip = 0; + } + + if (model_json["in_gain"].is_number()) { + input_gain = DB_CO(model_json["in_gain"].get()); + } + else { + input_gain = 1.0f; + } + + if (model_json["out_gain"].is_number()) { + output_gain = DB_CO(model_json["out_gain"].get()); + } + else { + output_gain = 1.0f; + } + } + catch (const std::exception& e) { + d_stderr2("Unable to load json, error: %s", e.what()); + return; + } + + std::unique_ptr newmodel = std::make_unique(); + + try { + if (! custom_model_creator (model_json, newmodel->variant)) + throw std::runtime_error ("Unable to identify a known model architecture!"); + + std::visit ( + [&model_json] (auto&& custom_model) + { + using ModelType = std::decay_t; + if constexpr (! std::is_same_v) + { + custom_model.parseJson (model_json, true); + custom_model.reset(); + } + }, + newmodel->variant); + } + catch (const std::exception& e) { + d_stderr2("Error loading model: %s", e.what()); + return; + } + + // save extra info + newmodel->input_skip = input_skip != 0; + newmodel->input_gain = input_gain; + newmodel->output_gain = output_gain; + + // Pre-buffer to avoid "clicks" during initialization + float out[2048] = {}; + applyModel(newmodel.get(), out, ARRAY_SIZE(out)); + + // swap active model + DynamicModel* const oldmodel = model; + model = newmodel.release(); + + // if processing, wait for process cycle to complete + while (oldmodel != nullptr && activeModel.load()) + d_msleep(1); + + delete oldmodel; + } + + void process(const ProcessArgs& args) override + { + const float stime = args.sampleTime; + const float inlevelv = DB_CO(params[PARAM_INPUT_LEVEL].getValue()); + const float outlevelv = DB_CO(params[PARAM_OUTPUT_LEVEL].getValue()); + + // High frequencies roll-off (lowpass) + float sample = in_lpf.process(inputs[AUDIO_INPUT].getVoltage() * 0.1f) * inlevel.process(stime, inlevelv); + + // run model + if (model != nullptr) + { + activeModel.store(true); + sample = applyModel(model, sample); + activeModel.store(false); + } + + // DC blocker filter (highpass) + outputs[AUDIO_OUTPUT].setVoltage(dc_blocker.process(sample) * outlevel.process(stime, outlevelv) * 10.f); + } + + void onSampleRateChange(const SampleRateChangeEvent& e) override + { + dc_blocker.setFc(35.0f / e.sampleRate); + + in_lpf.setFc(MAP(66.216f, 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO)); + } + + DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AidaPluginModule) +}; + +// -------------------------------------------------------------------------------------------------------------------- + +#ifndef HEADLESS +struct AidaModelListWidget : ImGuiWidget { + AidaPluginModule* const module; + + /* + bool showError = false; + String errorMessage; + */ + + struct ghcFile { + std::string full, base; + bool operator<(const ghcFile& other) const noexcept { return base < other.base; } + }; + std::string currentDirectory; + std::vector currentFiles; + size_t selectedFile = (size_t)-1; + + AidaModelListWidget(AidaPluginModule* const m) + : ImGuiWidget(), + module(m) + { + if (module->fileChanged) + reloadDir(); + } + + void drawImGui() override + { + const float scaleFactor = getScaleFactor(); + + const int flags = ImGuiWindowFlags_NoSavedSettings + | ImGuiWindowFlags_NoTitleBar + | ImGuiWindowFlags_NoResize + | ImGuiWindowFlags_NoCollapse + | ImGuiWindowFlags_NoScrollbar + | ImGuiWindowFlags_NoScrollWithMouse; + + ImGui::SetNextWindowPos(ImVec2(0, 0)); + ImGui::SetNextWindowSize(ImVec2(box.size.x * scaleFactor, box.size.y * scaleFactor)); + + if (ImGui::Begin("Model File List", nullptr, ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize)) + { + /* + if (showError) + { + showError = false; + ImGui::OpenPopup("Audio File Error"); + } + + if (ImGui::BeginPopupModal("Model File Error", nullptr, flags)) + { + ImGui::TextWrapped("Failed to load model file, error was:\n%s", errorMessage.buffer()); + + ImGui::Separator(); + + if (ImGui::Button("Ok")) + ImGui::CloseCurrentPopup(); + + ImGui::EndPopup(); + } + else + */ + if (ImGui::BeginTable("modellist", 1, ImGuiTableFlags_NoSavedSettings)) + { + for (size_t i=0, count=currentFiles.size(); i < count; ++i) + { + bool wasSelected = selectedFile == i; + bool selected = wasSelected; + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::Selectable(currentFiles[i].base.c_str(), &selected); + + if (selected && ! wasSelected) + { + selectedFile = i; + module->currentFile = currentFiles[i].full; + module->loadModelFromFile(currentFiles[i].full.c_str()); + } + } + + ImGui::EndTable(); + } + } + + ImGui::End(); + } + + void step() override + { + if (module->fileChanged) + reloadDir(); + + ImGuiWidget::step(); + } + + void reloadDir() + { + module->fileChanged = false; + + currentFiles.clear(); + selectedFile = (size_t)-1; + + static constexpr const char* const supportedExtensions[] = { + ".json" + }; + + using namespace ghc::filesystem; + const path currentFile = u8path(module->currentFile); + currentDirectory = currentFile.parent_path().generic_u8string(); + + directory_iterator it; + + try { + it = directory_iterator(u8path(currentDirectory)); + } DISTRHO_SAFE_EXCEPTION_RETURN("Failed to open current directory",); + + for (directory_iterator itb = begin(it), ite=end(it); itb != ite; ++itb) + { + if (! itb->is_regular_file()) + continue; + const path filepath = itb->path(); + const path extension = filepath.extension(); + for (size_t i=0; iopacity = 0; + setSvg(APP->window->loadSvg(asset::plugin(pluginInstance, "res/aida-x-knob.svg"))); + } +}; + +struct AidaWidget : ModuleWidgetWithSideScrews<23> { + static constexpr const float previewBoxHeight = 80.0f; + static constexpr const float previewBoxBottom = 20.0f; + static constexpr const float previewBoxRect[] = {8.0f, + 380.0f - previewBoxHeight - previewBoxBottom, + 15.0f * 23 - 16.0f, + previewBoxHeight}; + static constexpr const float startY_list = startY - 2.0f; + static constexpr const float fileListHeight = 380.0f - startY_list - previewBoxHeight - previewBoxBottom * 1.5f; + static constexpr const float startY_preview = startY_list + fileListHeight; + + AidaPluginModule* const module; + + AidaWidget(AidaPluginModule* const m) + : module(m) + { + setModule(module); + setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/AIDA-X.svg"))); + + createAndAddScrews(); + + addInput(createInput(Vec(startX_In, 25), module, 0)); + addOutput(createOutput(Vec(startX_Out, 25), module, 0)); + + addChild(createParamCentered(Vec(box.size.x * 0.5f - 50, box.size.y - 60), + module, AidaPluginModule::PARAM_INPUT_LEVEL)); + + addChild(createParamCentered(Vec(box.size.x * 0.5f + 50, box.size.y - 60), + module, AidaPluginModule::PARAM_OUTPUT_LEVEL)); + + if (m != nullptr) + { + AidaModelListWidget* const listw = new AidaModelListWidget(m); + listw->box.pos = Vec(0, startY_list); + listw->box.size = Vec(box.size.x, fileListHeight); + addChild(listw); + } + } + + void draw(const DrawArgs& args) override + { + drawBackground(args.vg); + drawOutputJacksArea(args.vg); + + ModuleWidget::draw(args); + } + + void drawOutputJacksArea(NVGcontext* const vg) + { + nvgBeginPath(vg); + nvgRoundedRect(vg, startX_Out - 2.5f, startY_list * 0.5f - padding * 0.5f, padding, padding, 4); + nvgFillColor(vg, nvgRGB(0xd0, 0xd0, 0xd0)); + nvgFill(vg); + } + + void appendContextMenu(ui::Menu* const menu) override + { + menu->addChild(new ui::MenuSeparator); + + struct LoadModelFileItem : MenuItem { + AidaPluginModule* const module; + + LoadModelFileItem(AidaPluginModule* const m) + : module(m) + { + text = "Load model file..."; + } + + void onAction(const event::Action&) override + { + AidaPluginModule* const module = this->module; + async_dialog_filebrowser(false, nullptr, nullptr, text.c_str(), [module](char* path) + { + if (path == nullptr) + return; + + module->currentFile = path; + module->fileChanged = true; + module->loadModelFromFile(path); + std::free(path); + }); + } + }; + + menu->addChild(new LoadModelFileItem(module)); + } + + DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AidaWidget) +}; +#else +struct AidaWidget : ModuleWidget { + AidaWidget(AidaPluginModule* const module) { + setModule(module); + + addInput(createInput({}, module, 0)); + addOutput(createOutput({}, module, 0)); + } +}; +#endif + +// -------------------------------------------------------------------------------------------------------------------- + +Model* modelAidaX = createModel("AIDA-X"); + +// -------------------------------------------------------------------------------------------------------------------- diff --git a/plugins/Cardinal/src/AIDA-X/Biquad.cpp b/plugins/Cardinal/src/AIDA-X/Biquad.cpp new file mode 100644 index 00000000..d01e29bd --- /dev/null +++ b/plugins/Cardinal/src/AIDA-X/Biquad.cpp @@ -0,0 +1,165 @@ +// +// Biquad.cpp +// +// Created by Nigel Redmon on 11/24/12 +// EarLevel Engineering: earlevel.com +// Copyright 2012 Nigel Redmon +// +// For a complete explanation of the Biquad code: +// http://www.earlevel.com/main/2012/11/26/biquad-c-source-code/ +// +// License: +// +// This source code is provided as is, without warranty. +// You may copy and distribute verbatim copies of this document. +// You may modify and use this source code to create binary code +// for your own purposes, free or commercial. +// + +#include +#include "Biquad.h" + +Biquad::Biquad() { + type = bq_type_lowpass; + a0 = 1.0; + a1 = a2 = b1 = b2 = 0.0; + Fc = 0.50; + Q = 0.707; + peakGain = 0.0; + z1 = z2 = 0.0; +} + +Biquad::Biquad(int type, double Fc, double Q, double peakGainDB) { + setBiquad(type, Fc, Q, peakGainDB); + z1 = z2 = 0.0; +} + +Biquad::~Biquad() { +} + +void Biquad::setType(int type) { + this->type = type; + calcBiquad(); +} + +void Biquad::setQ(double Q) { + this->Q = Q; + calcBiquad(); +} + +void Biquad::setFc(double Fc) { + this->Fc = Fc; + calcBiquad(); +} + +void Biquad::setPeakGain(double peakGainDB) { + this->peakGain = peakGainDB; + calcBiquad(); +} + +void Biquad::setBiquad(int type, double Fc, double Q, double peakGainDB) { + this->type = type; + this->Q = Q; + this->Fc = Fc; + setPeakGain(peakGainDB); +} + +void Biquad::calcBiquad(void) { + double norm; + double V = pow(10, fabs(peakGain) / 20.0); + double K = tan(M_PI * Fc); + switch (this->type) { + case bq_type_lowpass: + norm = 1 / (1 + K / Q + K * K); + a0 = K * K * norm; + a1 = 2 * a0; + a2 = a0; + b1 = 2 * (K * K - 1) * norm; + b2 = (1 - K / Q + K * K) * norm; + break; + + case bq_type_highpass: + norm = 1 / (1 + K / Q + K * K); + a0 = 1 * norm; + a1 = -2 * a0; + a2 = a0; + b1 = 2 * (K * K - 1) * norm; + b2 = (1 - K / Q + K * K) * norm; + break; + + case bq_type_bandpass: + norm = 1 / (1 + K / Q + K * K); + a0 = K / Q * norm; + a1 = 0; + a2 = -a0; + b1 = 2 * (K * K - 1) * norm; + b2 = (1 - K / Q + K * K) * norm; + break; + + case bq_type_notch: + norm = 1 / (1 + K / Q + K * K); + a0 = (1 + K * K) * norm; + a1 = 2 * (K * K - 1) * norm; + a2 = a0; + b1 = a1; + b2 = (1 - K / Q + K * K) * norm; + break; + + case bq_type_peak: + if (peakGain >= 0) { // boost + norm = 1 / (1 + 1/Q * K + K * K); + a0 = (1 + V/Q * K + K * K) * norm; + a1 = 2 * (K * K - 1) * norm; + a2 = (1 - V/Q * K + K * K) * norm; + b1 = a1; + b2 = (1 - 1/Q * K + K * K) * norm; + } + else { // cut + norm = 1 / (1 + V/Q * K + K * K); + a0 = (1 + 1/Q * K + K * K) * norm; + a1 = 2 * (K * K - 1) * norm; + a2 = (1 - 1/Q * K + K * K) * norm; + b1 = a1; + b2 = (1 - V/Q * K + K * K) * norm; + } + break; + case bq_type_lowshelf: + if (peakGain >= 0) { // boost + norm = 1 / (1 + sqrt(2) * K + K * K); + a0 = (1 + sqrt(2*V) * K + V * K * K) * norm; + a1 = 2 * (V * K * K - 1) * norm; + a2 = (1 - sqrt(2*V) * K + V * K * K) * norm; + b1 = 2 * (K * K - 1) * norm; + b2 = (1 - sqrt(2) * K + K * K) * norm; + } + else { // cut + norm = 1 / (1 + sqrt(2*V) * K + V * K * K); + a0 = (1 + sqrt(2) * K + K * K) * norm; + a1 = 2 * (K * K - 1) * norm; + a2 = (1 - sqrt(2) * K + K * K) * norm; + b1 = 2 * (V * K * K - 1) * norm; + b2 = (1 - sqrt(2*V) * K + V * K * K) * norm; + } + break; + case bq_type_highshelf: + if (peakGain >= 0) { // boost + norm = 1 / (1 + sqrt(2) * K + K * K); + a0 = (V + sqrt(2*V) * K + K * K) * norm; + a1 = 2 * (K * K - V) * norm; + a2 = (V - sqrt(2*V) * K + K * K) * norm; + b1 = 2 * (K * K - 1) * norm; + b2 = (1 - sqrt(2) * K + K * K) * norm; + } + else { // cut + norm = 1 / (V + sqrt(2*V) * K + K * K); + a0 = (1 + sqrt(2) * K + K * K) * norm; + a1 = 2 * (K * K - 1) * norm; + a2 = (1 - sqrt(2) * K + K * K) * norm; + b1 = 2 * (K * K - V) * norm; + b2 = (V - sqrt(2*V) * K + K * K) * norm; + } + break; + } + + return; +} diff --git a/plugins/Cardinal/src/AIDA-X/Biquad.h b/plugins/Cardinal/src/AIDA-X/Biquad.h new file mode 100644 index 00000000..ee1b9553 --- /dev/null +++ b/plugins/Cardinal/src/AIDA-X/Biquad.h @@ -0,0 +1,60 @@ +// +// Biquad.h +// +// Created by Nigel Redmon on 11/24/12 +// EarLevel Engineering: earlevel.com +// Copyright 2012 Nigel Redmon +// +// For a complete explanation of the Biquad code: +// http://www.earlevel.com/main/2012/11/26/biquad-c-source-code/ +// +// License: +// +// This source code is provided as is, without warranty. +// You may copy and distribute verbatim copies of this document. +// You may modify and use this source code to create binary code +// for your own purposes, free or commercial. +// + +#ifndef Biquad_h +#define Biquad_h + +enum { + bq_type_lowpass = 0, + bq_type_highpass, + bq_type_bandpass, + bq_type_notch, + bq_type_peak, + bq_type_lowshelf, + bq_type_highshelf +}; + +class Biquad { +public: + Biquad(); + Biquad(int type, double Fc, double Q, double peakGainDB); + ~Biquad(); + void setType(int type); + void setQ(double Q); + void setFc(double Fc); + void setPeakGain(double peakGainDB); + void setBiquad(int type, double Fc, double Q, double peakGainDB); + float process(float in); + +protected: + void calcBiquad(void); + + int type; + double a0, a1, a2, b1, b2; + double Fc, Q, peakGain; + double z1, z2; +}; + +inline float Biquad::process(float in) { + double out = in * a0 + z1; + z1 = in * a1 + z2 - b1 * out; + z2 = in * a2 - b2 * out; + return out; +} + +#endif // Biquad_h diff --git a/plugins/Cardinal/src/AIDA-X/RTNeural b/plugins/Cardinal/src/AIDA-X/RTNeural new file mode 160000 index 00000000..74e9d354 --- /dev/null +++ b/plugins/Cardinal/src/AIDA-X/RTNeural @@ -0,0 +1 @@ +Subproject commit 74e9d354937346f31858e976a2eefc1c25cdcccd diff --git a/plugins/Cardinal/src/AIDA-X/model_variant.hpp b/plugins/Cardinal/src/AIDA-X/model_variant.hpp new file mode 100644 index 00000000..b7305915 --- /dev/null +++ b/plugins/Cardinal/src/AIDA-X/model_variant.hpp @@ -0,0 +1,683 @@ +#include +#include + +#define MAX_INPUT_SIZE 3 +struct NullModel { static constexpr int input_size = 0; static constexpr int output_size = 0; }; +using ModelType_GRU_8_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_8_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_8_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_12_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_12_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_12_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_16_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_16_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_16_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_20_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_20_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_20_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_32_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_32_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_32_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_40_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_40_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_40_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_64_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_64_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_GRU_64_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_8_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_8_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_8_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_12_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_12_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_12_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_16_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_16_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_16_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_20_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_20_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_20_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_32_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_32_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_32_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_40_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_40_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_40_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_64_1 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_64_2 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelType_LSTM_64_3 = RTNeural::ModelT, RTNeural::DenseT>; +using ModelVariantType = std::variant; + +inline bool is_model_type_ModelType_GRU_8_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 8; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_8_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 8; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_8_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 8; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_12_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 12; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_12_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 12; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_12_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 12; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_16_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 16; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_16_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 16; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_16_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 16; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_20_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 20; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_20_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 20; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_20_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 20; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_32_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 32; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_32_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 32; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_32_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 32; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_40_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 40; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_40_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 40; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_40_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 40; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_64_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 64; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_64_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 64; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_GRU_64_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "gru"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 64; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_8_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 8; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_8_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 8; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_8_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 8; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_12_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 12; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_12_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 12; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_12_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 12; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_16_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 16; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_16_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 16; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_16_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 16; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_20_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 20; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_20_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 20; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_20_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 20; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_32_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 32; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_32_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 32; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_32_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 32; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_40_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 40; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_40_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 40; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_40_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 40; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_64_1 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 64; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 1; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_64_2 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 64; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 2; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool is_model_type_ModelType_LSTM_64_3 (const nlohmann::json& model_json) { + const auto json_layers = model_json.at ("layers"); + const auto rnn_layer_type = json_layers.at (0).at ("type").get(); + const auto is_layer_type_correct = rnn_layer_type == "lstm"; + const auto hidden_size = json_layers.at (0).at ("shape").back().get(); + const auto is_hidden_size_correct = hidden_size == 64; + const auto input_size = model_json.at ("in_shape").back().get(); + const auto is_input_size_correct = input_size == 3; + return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct; +} + +inline bool custom_model_creator (const nlohmann::json& model_json, ModelVariantType& model) { + if (is_model_type_ModelType_GRU_8_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_8_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_8_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_12_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_12_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_12_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_16_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_16_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_16_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_20_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_20_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_20_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_32_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_32_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_32_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_40_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_40_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_40_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_64_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_64_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_GRU_64_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_8_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_8_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_8_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_12_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_12_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_12_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_16_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_16_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_16_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_20_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_20_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_20_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_32_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_32_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_32_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_40_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_40_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_40_3 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_64_1 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_64_2 (model_json)) { + model.emplace(); + return true; + } + else if (is_model_type_ModelType_LSTM_64_3 (model_json)) { + model.emplace(); + return true; + } + model.emplace(); + return false; +} diff --git a/plugins/Cardinal/src/plugin.hpp b/plugins/Cardinal/src/plugin.hpp index 55e48574..0b55a02c 100644 --- a/plugins/Cardinal/src/plugin.hpp +++ b/plugins/Cardinal/src/plugin.hpp @@ -28,6 +28,7 @@ using namespace rack; extern Plugin* pluginInstance; +extern Model* modelAidaX; extern Model* modelAudioFile; extern Model* modelAudioToCVPitch; extern Model* modelCarla; diff --git a/plugins/Makefile b/plugins/Makefile index 10377b37..671a2382 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -223,6 +223,7 @@ MINIPLUGIN_FILES = plugins-mini.cpp # -------------------------------------------------------------- # Cardinal (built-in) +PLUGIN_FILES += Cardinal/src/AIDA-X.cpp PLUGIN_FILES += Cardinal/src/Blank.cpp PLUGIN_FILES += Cardinal/src/ExpanderInputMIDI.cpp PLUGIN_FILES += Cardinal/src/ExpanderOutputMIDI.cpp @@ -1306,6 +1307,20 @@ ifeq ($(WASM),true) CARLA_FLAGS += -DDISTRHO_RUNNER_INDIRECT_WASM_CALLS endif +# -------------------------------------------------------------- +# RTNeural flags, used in AIDA-X + +RTNEURAL_FLAGS = -std=gnu++17 +RTNEURAL_FLAGS += -DRTNEURAL_DEFAULT_ALIGNMENT=16 +RTNEURAL_FLAGS += -DRTNEURAL_USE_EIGEN=1 + +ifeq ($(WASM),true) +RTNEURAL_FLAGS += -DEIGEN_DONT_VECTORIZE=1 +endif + +RTNEURAL_FLAGS += -ICardinal/src/AIDA-X/RTNeural +RTNEURAL_FLAGS += -ICardinal/src/AIDA-X/RTNeural/modules/Eigen + # -------------------------------------------------------------- # Build targets @@ -1975,6 +1990,19 @@ $(BUILD_DIR)/Cardinal/%.cpp.o: Cardinal/%.cpp -Dstbrp_rect=stbrp_rect_cardinal \ $(CARLA_FLAGS) +$(BUILD_DIR)/Cardinal/src/AIDA-X.cpp.o: Cardinal/src/AIDA-X.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + -DpluginInstance=pluginInstance__Cardinal \ + -Dstbrp_context=stbrp_context_cardinal \ + -Dstbrp_coord=stbrp_coord_cardinal \ + -Dstbtt_fontinfo=stbtt_fontinfo_cardinal \ + -Dstbrp_node=stbrp_node_cardinal \ + -Dstbrp_rect=stbrp_rect_cardinal \ + $(RTNEURAL_FLAGS) \ + $(CARLA_FLAGS) + $(BUILD_DIR)/21kHz/%.cpp.o: 21kHz/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 7e9ebfb7..2e06557e 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -212,6 +212,7 @@ static void initStatic__Cardinal() /* #endif */ + spl.removeModule("AIDA-X"); spl.removeModule("AudioFile"); spl.removeModule("Blank"); spl.removeModule("Carla"); diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 429cbe37..78e800cf 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -972,6 +972,7 @@ static void initStatic__Cardinal() const StaticPluginLoader spl(p, "Cardinal"); if (spl.ok()) { + p->addModel(modelAidaX); p->addModel(modelCardinalBlank); p->addModel(modelExpanderInputMIDI); p->addModel(modelExpanderOutputMIDI); From 162e24f589ef6600018cbbf40a56ebc191cd4d2e Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 01:10:47 +0200 Subject: [PATCH 332/451] CI tweaks, give up on old macOS versions, min 10.15 Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- jucewrapper/CardinalWrapper.cpp | 2 +- plugins/Cardinal/src/AIDA-X.cpp | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 740be4d3..327c2204 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,7 +172,7 @@ jobs: macos: strategy: matrix: - target: [intel, universal] + target: [universal-10.15] runs-on: macos-11 steps: - uses: actions/checkout@v3 diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp index 771d9415..562c6f34 100644 --- a/jucewrapper/CardinalWrapper.cpp +++ b/jucewrapper/CardinalWrapper.cpp @@ -18,7 +18,7 @@ #include #include -#if MAC_OS_X_VERSION_MAX_ALLOWED > 101200 +#if MAC_OS_X_VERSION_MAX_ALLOWED > 101500 #error unwanted macOS version, too new #endif diff --git a/plugins/Cardinal/src/AIDA-X.cpp b/plugins/Cardinal/src/AIDA-X.cpp index 6f62b2e2..717c1813 100644 --- a/plugins/Cardinal/src/AIDA-X.cpp +++ b/plugins/Cardinal/src/AIDA-X.cpp @@ -18,6 +18,9 @@ # include "ghc/filesystem.hpp" #endif +template class RTNeural::Model; +template class RTNeural::Layer; + // -------------------------------------------------------------------------------------------------------------------- /* Define a constexpr for converting a gain in dB to a coefficient */ @@ -169,6 +172,7 @@ struct AidaPluginModule : Module { configParam(PARAM_INPUT_LEVEL, -12.f, 12.f, 0.f, "Input level", " dB"); configParam(PARAM_OUTPUT_LEVEL, -12.f, 12.f, 0.f, "Output level", " dB"); + in_lpf.setFc(MAP(66.216f, 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO)); inlevel.setTau(1 / 30.f); outlevel.setTau(1 / 30.f); } @@ -335,8 +339,6 @@ struct AidaPluginModule : Module { void onSampleRateChange(const SampleRateChangeEvent& e) override { dc_blocker.setFc(35.0f / e.sampleRate); - - in_lpf.setFc(MAP(66.216f, 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO)); } DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AidaPluginModule) From 1101ec3d217e77c0826cd4c89f640a2fb92a92d3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 01:28:06 +0200 Subject: [PATCH 333/451] Fix windows build Signed-off-by: falkTX --- plugins/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Makefile b/plugins/Makefile index 671a2382..14817871 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1311,6 +1311,7 @@ endif # RTNeural flags, used in AIDA-X RTNEURAL_FLAGS = -std=gnu++17 +RTNEURAL_FLAGS += -DSKIP_MINGW_FORMAT RTNEURAL_FLAGS += -DRTNEURAL_DEFAULT_ALIGNMENT=16 RTNEURAL_FLAGS += -DRTNEURAL_USE_EIGEN=1 From 2c7bcfbb4abda087e967843a20f59d4b2fad0434 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 02:10:47 +0200 Subject: [PATCH 334/451] give unique symbols to newly added code for aida-x Signed-off-by: falkTX --- plugins/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/Makefile b/plugins/Makefile index 14817871..6d7cf819 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1311,6 +1311,9 @@ endif # RTNeural flags, used in AIDA-X RTNEURAL_FLAGS = -std=gnu++17 +RTNEURAL_FLAGS += -DBiquad=AidaBiquad +RTNEURAL_FLAGS += -Dconst_blas_data_mapper=Aida_const_blas_data_mapper +RTNEURAL_FLAGS += -Devaluator=Aida_evaluator RTNEURAL_FLAGS += -DSKIP_MINGW_FORMAT RTNEURAL_FLAGS += -DRTNEURAL_DEFAULT_ALIGNMENT=16 RTNEURAL_FLAGS += -DRTNEURAL_USE_EIGEN=1 From 6a547bea5f77d62d9c02c3d9f2d59594f2887878 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 12:57:49 +0200 Subject: [PATCH 335/451] Fix macOS build Signed-off-by: falkTX --- src/Makefile.cardinal.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index b2dafadc..04f88719 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -137,7 +137,7 @@ RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/fmt/libfmt.a endif RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sqlite-3.23.3/libsqlite.a RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libsst-plugininfra.a -ifneq ($(WINDOWS),true) +ifneq ($(MACOS)$(WINDOWS),true) RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/filesystem/libfilesystem.a endif RACK_EXTRA_LIBS += $(SURGE_DEP_PATH)/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a From 8aa100d4c2b9a140831929bd66961511a9de2505 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 15:42:11 +0200 Subject: [PATCH 336/451] Really fix macOS build Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 3cc44bd2..89b68c76 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -98,7 +98,7 @@ add_library(surgedep04 STATIC IMPORTED) add_library(surgedep05 STATIC IMPORTED) add_library(surgedep06 STATIC IMPORTED) add_library(surgedep07 STATIC IMPORTED) -add_library(surgedep08 STATIC IMPORTED) +#add_library(surgedep08 STATIC IMPORTED) add_library(surgedep09 STATIC IMPORTED) add_library(surgedep10 STATIC IMPORTED) @@ -109,7 +109,7 @@ set_property(TARGET surgedep04 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/lib set_property(TARGET surgedep05 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/fmt/libfmt.a") set_property(TARGET surgedep06 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sqlite-3.23.3/libsqlite.a") set_property(TARGET surgedep07 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libsst-plugininfra.a") -set_property(TARGET surgedep08 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/filesystem/libfilesystem.a") +#set_property(TARGET surgedep08 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/filesystem/libfilesystem.a") set_property(TARGET surgedep09 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/strnatcmp/libstrnatcmp.a") set_property(TARGET surgedep10 PROPERTY IMPORTED_LOCATION "${SURGE_DEP_PATH}/libs/sst/sst-plugininfra/libs/tinyxml/libtinyxml.a") @@ -212,7 +212,7 @@ target_link_libraries(Cardinal surgedep05 surgedep06 surgedep07 - surgedep08 + #surgedep08 surgedep09 surgedep10 libaubio @@ -314,7 +314,7 @@ target_link_libraries(CardinalFX surgedep05 surgedep06 surgedep07 - surgedep08 + #surgedep08 surgedep09 surgedep10 libaubio @@ -415,7 +415,7 @@ target_link_libraries(CardinalMIDI surgedep05 surgedep06 surgedep07 - surgedep08 + #surgedep08 surgedep09 surgedep10 libaubio @@ -516,7 +516,7 @@ target_link_libraries(CardinalSynth surgedep05 surgedep06 surgedep07 - surgedep08 + #surgedep08 surgedep09 surgedep10 libaubio From 5307b9f540cb257b63ea56de080e302420929f51 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Apr 2023 17:50:44 +0200 Subject: [PATCH 337/451] Fix macOS CI step Signed-off-by: falkTX --- .github/workflows/build.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 327c2204..2aeda4cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,15 +220,8 @@ jobs: mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - - name: Build macOS (intel packaging) - if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'intel' }} - env: - MACOS_ARCHS: 'x86_64' - run: | - source deps/PawPaw/local.env macos-${{ matrix.target }} - ./utils/create-macos-installer.sh - - name: Build macOS (universal packaging) - if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'universal' }} + - name: Build macOS (packaging) + if: steps.cache.outputs.cache-hit == 'true' env: MACOS_ARCHS: 'arm64,x86_64' run: | From 46ef748136437ad6e78fda463cbe7ef2761f9cc3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 3 May 2023 16:36:10 +0200 Subject: [PATCH 338/451] Update carla and dpf Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index fdccb45b..96b67721 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit fdccb45be790393923f75b7a309891254110400a +Subproject commit 96b67721b68585e3980a32b3e558160d59305050 diff --git a/dpf b/dpf index 79cd0a46..bd8cc43b 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 79cd0a46b2caaa242ac8fd8ad198ae067826e5ea +Subproject commit bd8cc43bd1cb5b02f5ef5f5963ecbd266ab03204 From fdca56ecfa7e887e00819a7924d741385728b7c7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 3 May 2023 16:38:20 +0200 Subject: [PATCH 339/451] Simplify juce-au handling Signed-off-by: falkTX --- .github/workflows/build.yml | 2 -- jucewrapper/CMakeLists.txt | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2aeda4cd..5246748c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -215,8 +215,6 @@ jobs: run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" source deps/PawPaw/local.env macos-${{ matrix.target }} - git clone --depth=1 -b v6.1.6 https://github.com/DISTRHO/JUCE.git jucewrapper/JUCE - ${{ matrix.target == 'intel' }} && sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h mkdir -p jucewrapper/build pushd jucewrapper/build; cmake -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 89b68c76..4e69b64d 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,7 +1,13 @@ cmake_minimum_required(VERSION 3.15) project(Cardinal VERSION 23.04) -add_subdirectory(JUCE) +include(FetchContent) +FetchContent_Declare(JUCE + GIT_REPOSITORY https://github.com/DISTRHO/JUCE.git + GIT_TAG v6.1.6 + GIT_SHALLOW TRUE +) +FetchContent_MakeAvailable(JUCE) # Config From 4679575a9533078aae430ecd6304f1a1001aa5f4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 3 May 2023 16:39:48 +0200 Subject: [PATCH 340/451] cursor lock disabled by default on wasm Signed-off-by: falkTX --- src/CardinalCommon.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index cc15d568..54733d18 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -378,11 +378,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB { using namespace rack; -#ifdef DISTRHO_OS_WASM - settings::allowCursorLock = true; -#else settings::allowCursorLock = false; -#endif settings::autoCheckUpdates = false; settings::autosaveInterval = 0; settings::devMode = true; From e39170b12bafea7d63068b7a040ff5ef2b86f728 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 17 May 2023 20:14:01 +0200 Subject: [PATCH 341/451] Update carla and dpf, tweak windows CI Signed-off-by: falkTX --- .github/workflows/build.yml | 8 ++------ carla | 2 +- dpf | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5246748c..652dfd03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -427,22 +427,18 @@ jobs: - name: Fix GitHub's mess run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list + sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq --allow-downgrades libgd3/jammy - sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 libzip4 + sudo apt-get install libc6:i386 libgcc-s1:i386 libstdc++6:i386 --allow-downgrades sudo apt-get clean - name: Set up dependencies if: ${{ matrix.target == 'win32' }} run: | - sudo dpkg --add-architecture i386 - sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 gperf qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - name: Set up dependencies if: ${{ matrix.target == 'win64' }} run: | - sudo dpkg --add-architecture i386 - sudo apt-get update -qq sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable gperf qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - name: Set up ccache diff --git a/carla b/carla index 96b67721..ad7def4b 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 96b67721b68585e3980a32b3e558160d59305050 +Subproject commit ad7def4bd0dbd9c2470a72cae79089a0a17dad7f diff --git a/dpf b/dpf index bd8cc43b..1736c842 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit bd8cc43bd1cb5b02f5ef5f5963ecbd266ab03204 +Subproject commit 1736c842c5c6d609fabce8f46de3e732d17e9c90 From b414498c6415ec5e81fbcc83efa5f2d5db86c90c Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 17 May 2023 20:51:36 +0200 Subject: [PATCH 342/451] Do not link against sfzero Signed-off-by: falkTX --- jucewrapper/CMakeLists.txt | 7 ------- src/Makefile.cardinal.mk | 1 - 2 files changed, 8 deletions(-) diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 4e69b64d..a289103a 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -43,9 +43,6 @@ set_property(TARGET lilv PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../ca add_library(rtmempool STATIC IMPORTED) set_property(TARGET rtmempool PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/rtmempool.a") -add_library(sfzero STATIC IMPORTED) -set_property(TARGET sfzero PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/sfzero.a") - add_library(water STATIC IMPORTED) set_property(TARGET water PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/${CMAKE_BUILD_TYPE}/water.a") @@ -206,7 +203,6 @@ target_link_libraries(Cardinal jackbridge lilv rtmempool - sfzero water ysfx zita_resampler @@ -308,7 +304,6 @@ target_link_libraries(CardinalFX jackbridge lilv rtmempool - sfzero water ysfx zita_resampler @@ -409,7 +404,6 @@ target_link_libraries(CardinalMIDI jackbridge lilv rtmempool - sfzero water ysfx zita_resampler @@ -510,7 +504,6 @@ target_link_libraries(CardinalSynth jackbridge lilv rtmempool - sfzero water ysfx zita_resampler diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 04f88719..cff6cfba 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -46,7 +46,6 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/audio_decoder CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/jackbridge.min.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a -CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/sfzero.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a From 16b1a0f89625187202e189c3a5050a2658ebda38 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 17 May 2023 20:52:49 +0200 Subject: [PATCH 343/451] Bump version Signed-off-by: falkTX --- Makefile | 2 +- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d6a94551..82f64a22 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ include $(ROOT)/Makefile.base.mk # jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 23.04 +VERSION = 23.05 # -------------------------------------------------------------- # Build targets diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index a289103a..2b47a161 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 23.04) +project(Cardinal VERSION 23.05) include(FetchContent) FetchContent_Declare(JUCE diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 54733d18..3611a23f 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -106,7 +106,7 @@ void destroyStaticPlugins(); } } -const std::string CARDINAL_VERSION = "23.04"; +const std::string CARDINAL_VERSION = "23.05"; START_NAMESPACE_DISTRHO diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 3ae25262..cce5b0ff 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -357,7 +357,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 23, 4); + return d_version(0, 23, 5); } int64_t getUniqueId() const override From 1ad3d130d409222e9de74ca2aff58ea47cff27ec Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 18 May 2023 15:39:41 +0200 Subject: [PATCH 344/451] Fix wasm build Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index ad7def4b..9c1cad53 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit ad7def4bd0dbd9c2470a72cae79089a0a17dad7f +Subproject commit 9c1cad538702767d51fc59d17080c74313c280cd diff --git a/dpf b/dpf index 1736c842..b4460beb 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 1736c842c5c6d609fabce8f46de3e732d17e9c90 +Subproject commit b4460beb094502c868dda5991e356623b13ce658 From 2823dcfe78383b63e1ad996ee366f5c4e268ae64 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 18 May 2023 18:49:46 +0200 Subject: [PATCH 345/451] implement all the DSP stuff for AIDA-X Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- Makefile | 9 + plugins/Cardinal/src/AIDA-X.cpp | 447 +++++++++++++++++++++++++++++--- 3 files changed, 422 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 652dfd03..6ecb1fe7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -429,7 +429,7 @@ jobs: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install libc6:i386 libgcc-s1:i386 libstdc++6:i386 --allow-downgrades + sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 sudo apt-get clean - name: Set up dependencies if: ${{ matrix.target == 'win32' }} diff --git a/Makefile b/Makefile index 82f64a22..345df3fd 100644 --- a/Makefile +++ b/Makefile @@ -200,6 +200,15 @@ else gen: endif +# -------------------------------------------------------------- +# extra rules, for quick testing + +jack: carla deps dgl plugins resources + $(MAKE) jack -C src $(CARLA_EXTRA_ARGS) + +native: carla deps dgl plugins resources + $(MAKE) native -C src $(CARLA_EXTRA_ARGS) + # -------------------------------------------------------------- # Packaging standalone for CI diff --git a/plugins/Cardinal/src/AIDA-X.cpp b/plugins/Cardinal/src/AIDA-X.cpp index 717c1813..eecb162e 100644 --- a/plugins/Cardinal/src/AIDA-X.cpp +++ b/plugins/Cardinal/src/AIDA-X.cpp @@ -34,6 +34,8 @@ static constexpr float MAP(const float x, const float in_min, const float in_max /* Defines for tone controls */ static constexpr const float COMMON_Q = 0.707f; +static constexpr const float DEPTH_FREQ = 75.f; +static constexpr const float PRESENCE_FREQ = 900.f; /* Defines for antialiasing filter */ static constexpr const float INLPF_MAX_CO = 0.99f * 0.5f; /* coeff * ((samplerate / 2) / samplerate) */ @@ -52,7 +54,7 @@ struct DynamicModel { // This function carries model calculations static inline -void applyModel(DynamicModel* model, float* const out, uint32_t numSamples) +void applyModelOffline(DynamicModel* model, float* const out, uint32_t numSamples) { const bool input_skip = model->input_skip; const float input_gain = model->input_gain; @@ -82,6 +84,54 @@ void applyModel(DynamicModel* model, float* const out, uint32_t numSamples) out[i] = custom_model.forward(out + i) * output_gain; } } + else if constexpr (ModelType::input_size == 2) + { + float inArray1 alignas(RTNEURAL_DEFAULT_ALIGNMENT)[2]; + + if (input_skip) + { + for (uint32_t i=0; iinput_skip; const float input_gain = model->input_gain; @@ -103,13 +153,13 @@ float applyModel(DynamicModel* model, float sample) sample *= input_gain; std::visit( - [&sample, input_skip, output_gain] (auto&& custom_model) + [&sample, input_skip, output_gain, param1, param2] (auto&& custom_model) { using ModelType = std::decay_t; - float* out = &sample; if constexpr (ModelType::input_size == 1) { + float* out = &sample; if (input_skip) { sample += custom_model.forward(out); @@ -120,6 +170,32 @@ float applyModel(DynamicModel* model, float sample) sample = custom_model.forward(out) * output_gain; } } + else if constexpr (ModelType::input_size == 2) + { + float inArray1 alignas(RTNEURAL_DEFAULT_ALIGNMENT)[2] = {sample, param1}; + if (input_skip) + { + sample += custom_model.forward(inArray1); + sample *= output_gain; + } + else + { + sample = custom_model.forward(inArray1) * output_gain; + } + } + else if constexpr (ModelType::input_size == 3) + { + float inArray2 alignas(RTNEURAL_DEFAULT_ALIGNMENT)[3] = {sample, param1, param2}; + if (input_skip) + { + sample += custom_model.forward(inArray2); + sample *= output_gain; + } + else + { + sample = custom_model.forward(inArray2) * output_gain; + } + } }, model->variant ); @@ -130,11 +206,35 @@ float applyModel(DynamicModel* model, float sample) // -------------------------------------------------------------------------------------------------------------------- struct AidaPluginModule : Module { - enum ParamIds { - PARAM_INPUT_LEVEL, - PARAM_OUTPUT_LEVEL, + enum Parameters { + kParameterINLPF, + kParameterINLEVEL, + kParameterNETBYPASS, + kParameterEQBYPASS, + kParameterEQPOS, + kParameterBASSGAIN, + kParameterBASSFREQ, + kParameterMIDGAIN, + kParameterMIDFREQ, + kParameterMIDQ, + kParameterMTYPE, + kParameterTREBLEGAIN, + kParameterTREBLEFREQ, + kParameterDEPTH, + kParameterPRESENCE, + kParameterOUTLEVEL, + kParameterPARAM1, + kParameterPARAM2, NUM_PARAMS }; + enum EqPos { + kEqPost, + kEqPre + }; + enum MidEqType { + kMidEqPeak, + kMidEqBandpass + }; enum InputIds { AUDIO_INPUT, NUM_INPUTS @@ -147,16 +247,20 @@ struct AidaPluginModule : Module { NUM_LIGHTS }; - enum Parameters { - kParameterCount - }; - CardinalPluginContext* const pcontext; bool fileChanged = false; std::string currentFile; Biquad dc_blocker { bq_type_highpass, 0.5f, COMMON_Q, 0.0f }; Biquad in_lpf { bq_type_lowpass, 0.5f, COMMON_Q, 0.0f }; + Biquad bass { bq_type_lowshelf, 0.5f, COMMON_Q, 0.0f }; + Biquad mid { bq_type_peak, 0.5f, COMMON_Q, 0.0f }; + Biquad treble { bq_type_highshelf, 0.5f, COMMON_Q, 0.0f }; + Biquad depth { bq_type_peak, 0.5f, COMMON_Q, 0.0f }; + Biquad presence { bq_type_highshelf, 0.5f, COMMON_Q, 0.0f }; + + float cachedParams[NUM_PARAMS] = {}; + dsp::ExponentialFilter inlevel; dsp::ExponentialFilter outlevel; DynamicModel* model = nullptr; @@ -169,8 +273,35 @@ struct AidaPluginModule : Module { configInput(AUDIO_INPUT, "Audio"); configOutput(AUDIO_OUTPUT, "Audio"); - configParam(PARAM_INPUT_LEVEL, -12.f, 12.f, 0.f, "Input level", " dB"); - configParam(PARAM_OUTPUT_LEVEL, -12.f, 12.f, 0.f, "Output level", " dB"); + configParam(kParameterINLPF, -0.f, 100.f, 66.216f, "ANTIALIASING", " %"); + configParam(kParameterINLEVEL, -12.f, 12.f, 0.f, "INPUT", " dB"); + configSwitch(kParameterNETBYPASS, 0.f, 1.f, 0.f, "NETBYPASS"); + configSwitch(kParameterEQBYPASS, 0.f, 1.f, 0.f, "EQBYPASS"); + configSwitch(kParameterEQPOS, 0.f, 1.f, 0.f, "NETBYPASS"); + configParam(kParameterBASSGAIN, -8.f, 8.f, 0.f, "BASS", " dB"); + configParam(kParameterBASSFREQ, 60.f, 305.f, 75.f, "BFREQ", " Hz"); + configParam(kParameterMIDGAIN, -8.f, 8.f, 0.f, "MID", " dB"); + configParam(kParameterMIDFREQ, 150.f, 5000.f, 750.f, "MFREQ", " Hz"); + configParam(kParameterMIDQ, 0.2f, 5.f, 0.707f, "MIDQ"); + configSwitch(kParameterMTYPE, 0.f, 1.f, 0.f, "MTYPE"); + configParam(kParameterTREBLEGAIN, -8.f, 8.f, 0.f, "TREBLE", " dB"); + configParam(kParameterTREBLEFREQ, 1000.f, 4000.f, 2000.f, "TFREQ", " Hz"); + configParam(kParameterDEPTH, -8.f, 8.f, 0.f, "DEPTH", " dB"); + configParam(kParameterPRESENCE, -8.f, 8.f, 0.f, "PRESENCE", " dB"); + configParam(kParameterOUTLEVEL, -15.f, 15.f, 0.f, "OUTPUT", " dB"); + configParam(kParameterPARAM1, 0.f, 1.f, 0.f, "PARAM1"); + configParam(kParameterPARAM2, 0.f, 1.f, 0.f, "PARAM2"); + + cachedParams[kParameterINLPF] = 66.216f; + cachedParams[kParameterBASSGAIN] = 0.f; + cachedParams[kParameterBASSFREQ] = 75.f; + cachedParams[kParameterMIDGAIN] = 0.f; + cachedParams[kParameterMIDFREQ] = 750.f; + cachedParams[kParameterMIDQ] = 0.707f; + cachedParams[kParameterTREBLEGAIN] = 0.f; + cachedParams[kParameterTREBLEFREQ] = 2000.f; + cachedParams[kParameterDEPTH] = 0.f; + cachedParams[kParameterPRESENCE] = 0.f; in_lpf.setFc(MAP(66.216f, 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO)); inlevel.setTau(1 / 30.f); @@ -240,7 +371,7 @@ struct AidaPluginModule : Module { /* Understand which model type to load */ input_size = model_json["in_shape"].back().get(); - if (input_size > 1) { // MAX_INPUT_SIZE + if (input_size > MAX_INPUT_SIZE) { throw std::invalid_argument("Value for input_size not supported"); } @@ -302,7 +433,7 @@ struct AidaPluginModule : Module { // Pre-buffer to avoid "clicks" during initialization float out[2048] = {}; - applyModel(newmodel.get(), out, ARRAY_SIZE(out)); + applyModelOffline(newmodel.get(), out, ARRAY_SIZE(out)); // swap active model DynamicModel* const oldmodel = model; @@ -315,30 +446,207 @@ struct AidaPluginModule : Module { delete oldmodel; } + MidEqType getMidType() const + { + return cachedParams[kParameterMTYPE] > 0.5f ? kMidEqBandpass : kMidEqPeak; + } + + float applyToneControls(float sample) + { + return getMidType() == kMidEqBandpass + ? mid.process(sample) + : presence.process( + treble.process( + mid.process( + bass.process( + depth.process(sample))))); + } + void process(const ProcessArgs& args) override { const float stime = args.sampleTime; - const float inlevelv = DB_CO(params[PARAM_INPUT_LEVEL].getValue()); - const float outlevelv = DB_CO(params[PARAM_OUTPUT_LEVEL].getValue()); + const float inlevelv = DB_CO(params[kParameterINLEVEL].getValue()); + const float outlevelv = DB_CO(params[kParameterOUTLEVEL].getValue()); + + const bool net_bypass = params[kParameterNETBYPASS].getValue() > 0.5f; + const bool eq_bypass = params[kParameterEQBYPASS].getValue() > 0.5f; + const EqPos eq_pos = params[kParameterEQPOS].getValue() > 0.5f ? kEqPre : kEqPost; + + // update tone controls + bool changed = false; + float value; + + value = params[kParameterINLPF].getValue(); + if (d_isNotEqual(cachedParams[kParameterINLPF], value)) + { + cachedParams[kParameterINLPF] = value; + in_lpf.setFc(MAP(value, 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO)); + } + + value = params[kParameterBASSGAIN].getValue(); + if (d_isNotEqual(cachedParams[kParameterBASSGAIN], value)) + { + cachedParams[kParameterBASSGAIN] = value; + changed = true; + } + + value = params[kParameterBASSFREQ].getValue(); + if (d_isNotEqual(cachedParams[kParameterBASSFREQ], value)) + { + cachedParams[kParameterBASSFREQ] = value; + changed = true; + } + + if (changed) + { + changed = false; + bass.setBiquad(bq_type_lowshelf, + cachedParams[kParameterBASSFREQ] / args.sampleRate, + COMMON_Q, + cachedParams[kParameterBASSGAIN]); + } + + value = params[kParameterMIDGAIN].getValue(); + if (d_isNotEqual(cachedParams[kParameterMIDGAIN], value)) + { + cachedParams[kParameterMIDGAIN] = value; + changed = true; + } + + value = params[kParameterMIDFREQ].getValue(); + if (d_isNotEqual(cachedParams[kParameterMIDFREQ], value)) + { + cachedParams[kParameterMIDFREQ] = value; + changed = true; + } + + value = params[kParameterMIDQ].getValue(); + if (d_isNotEqual(cachedParams[kParameterMIDQ], value)) + { + cachedParams[kParameterMIDQ] = value; + changed = true; + } + + value = params[kParameterMTYPE].getValue(); + if (d_isNotEqual(cachedParams[kParameterMTYPE], value)) + { + cachedParams[kParameterMTYPE] = value; + changed = true; + } + + if (changed) + { + changed = false; + mid.setBiquad(getMidType() == kMidEqBandpass ? bq_type_bandpass : bq_type_peak, + cachedParams[kParameterMIDFREQ] / args.sampleRate, + cachedParams[kParameterMIDQ], + cachedParams[kParameterMIDGAIN]); + } + + value = params[kParameterTREBLEGAIN].getValue(); + if (d_isNotEqual(cachedParams[kParameterTREBLEGAIN], value)) + { + cachedParams[kParameterTREBLEGAIN] = value; + changed = true; + } + + value = params[kParameterTREBLEFREQ].getValue(); + if (d_isNotEqual(cachedParams[kParameterTREBLEFREQ], value)) + { + cachedParams[kParameterTREBLEFREQ] = value; + changed = true; + } + + if (changed) + { + changed = false; + treble.setBiquad(bq_type_highshelf, + cachedParams[kParameterTREBLEFREQ] / args.sampleRate, + COMMON_Q, + cachedParams[kParameterTREBLEGAIN]); + } + + value = params[kParameterDEPTH].getValue(); + if (d_isNotEqual(cachedParams[kParameterDEPTH], value)) + { + cachedParams[kParameterDEPTH] = value; + depth.setPeakGain(value); + } + + value = params[kParameterPRESENCE].getValue(); + if (d_isNotEqual(cachedParams[kParameterPRESENCE], value)) + { + cachedParams[kParameterPRESENCE] = value; + presence.setPeakGain(value); + } // High frequencies roll-off (lowpass) float sample = in_lpf.process(inputs[AUDIO_INPUT].getVoltage() * 0.1f) * inlevel.process(stime, inlevelv); + // Equalizer section + if (!eq_bypass && eq_pos == kEqPre) + sample = applyToneControls(sample); + // run model - if (model != nullptr) + if (!net_bypass && model != nullptr) { activeModel.store(true); - sample = applyModel(model, sample); + sample = applyModel(model, sample, + params[kParameterPARAM1].getValue(), + params[kParameterPARAM2].getValue()); activeModel.store(false); } // DC blocker filter (highpass) - outputs[AUDIO_OUTPUT].setVoltage(dc_blocker.process(sample) * outlevel.process(stime, outlevelv) * 10.f); + sample = dc_blocker.process(sample); + + // Equalizer section + if (!eq_bypass && eq_pos == kEqPost) + sample = applyToneControls(sample); + + // Output volume + outputs[AUDIO_OUTPUT].setVoltage(sample * outlevel.process(stime, outlevelv) * 10.f); } void onSampleRateChange(const SampleRateChangeEvent& e) override { + cachedParams[kParameterBASSGAIN] = params[kParameterBASSGAIN].getValue(); + cachedParams[kParameterBASSFREQ] = params[kParameterBASSFREQ].getValue(); + cachedParams[kParameterMIDGAIN] = params[kParameterMIDGAIN].getValue(); + cachedParams[kParameterMIDFREQ] = params[kParameterMIDFREQ].getValue(); + cachedParams[kParameterMIDQ] = params[kParameterMIDQ].getValue(); + cachedParams[kParameterMTYPE] = params[kParameterMTYPE].getValue(); + cachedParams[kParameterTREBLEGAIN] = params[kParameterTREBLEGAIN].getValue(); + cachedParams[kParameterTREBLEFREQ] = params[kParameterTREBLEFREQ].getValue(); + cachedParams[kParameterDEPTH] = params[kParameterDEPTH].getValue(); + cachedParams[kParameterPRESENCE] = params[kParameterPRESENCE].getValue(); + dc_blocker.setFc(35.0f / e.sampleRate); + + bass.setBiquad(bq_type_lowshelf, + cachedParams[kParameterBASSFREQ] / e.sampleRate, + COMMON_Q, + cachedParams[kParameterBASSGAIN]); + + mid.setBiquad(getMidType() == kMidEqBandpass ? bq_type_bandpass : bq_type_peak, + cachedParams[kParameterMIDFREQ] / e.sampleRate, + cachedParams[kParameterMIDQ], + cachedParams[kParameterMIDGAIN]); + + treble.setBiquad(bq_type_highshelf, + cachedParams[kParameterTREBLEFREQ] / e.sampleRate, + COMMON_Q, + cachedParams[kParameterTREBLEGAIN]); + + depth.setBiquad(bq_type_peak, + DEPTH_FREQ / e.sampleRate, + COMMON_Q, + cachedParams[kParameterDEPTH]); + + presence.setBiquad(bq_type_highshelf, + PRESENCE_FREQ / e.sampleRate, + COMMON_Q, + cachedParams[kParameterPRESENCE]); } DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AidaPluginModule) @@ -501,15 +809,11 @@ struct AidaKnob : app::SvgKnob { }; struct AidaWidget : ModuleWidgetWithSideScrews<23> { - static constexpr const float previewBoxHeight = 80.0f; - static constexpr const float previewBoxBottom = 20.0f; - static constexpr const float previewBoxRect[] = {8.0f, - 380.0f - previewBoxHeight - previewBoxBottom, - 15.0f * 23 - 16.0f, - previewBoxHeight}; + static constexpr const uint kPedalMargin = 10; + static constexpr const uint kPedalMarginTop = 50; + static constexpr const float startY_list = startY - 2.0f; - static constexpr const float fileListHeight = 380.0f - startY_list - previewBoxHeight - previewBoxBottom * 1.5f; - static constexpr const float startY_preview = startY_list + fileListHeight; + static constexpr const float fileListHeight = 380.0f - startY_list - 110.0f; AidaPluginModule* const module; @@ -524,24 +828,97 @@ struct AidaWidget : ModuleWidgetWithSideScrews<23> { addInput(createInput(Vec(startX_In, 25), module, 0)); addOutput(createOutput(Vec(startX_Out, 25), module, 0)); - addChild(createParamCentered(Vec(box.size.x * 0.5f - 50, box.size.y - 60), - module, AidaPluginModule::PARAM_INPUT_LEVEL)); + addChild(createParamCentered(Vec(50, box.size.y - 60), + module, AidaPluginModule::kParameterINLEVEL)); + + addChild(createParamCentered(Vec(100, box.size.y - 60), + module, AidaPluginModule::kParameterBASSGAIN)); + + addChild(createParamCentered(Vec(150, box.size.y - 60), + module, AidaPluginModule::kParameterMIDGAIN)); + + addChild(createParamCentered(Vec(200, box.size.y - 60), + module, AidaPluginModule::kParameterTREBLEGAIN)); - addChild(createParamCentered(Vec(box.size.x * 0.5f + 50, box.size.y - 60), - module, AidaPluginModule::PARAM_OUTPUT_LEVEL)); + addChild(createParamCentered(Vec(250, box.size.y - 60), + module, AidaPluginModule::kParameterDEPTH)); + + addChild(createParamCentered(Vec(300, box.size.y - 60), + module, AidaPluginModule::kParameterPRESENCE)); + + addChild(createParamCentered(Vec(350, box.size.y - 60), + module, AidaPluginModule::kParameterOUTLEVEL)); if (m != nullptr) { AidaModelListWidget* const listw = new AidaModelListWidget(m); - listw->box.pos = Vec(0, startY_list); - listw->box.size = Vec(box.size.x, fileListHeight); + listw->box.pos = Vec(kPedalMargin, startY_list); + listw->box.size = Vec(box.size.x - kPedalMargin * 2, fileListHeight); addChild(listw); } } void draw(const DrawArgs& args) override { - drawBackground(args.vg); + const double widthPedal = box.size.x - kPedalMargin * 2; + const double heightPedal = box.size.y - kPedalMargin - kPedalMarginTop; + const int cornerRadius = 12; + + // outer bounds gradient + nvgBeginPath(args.vg); + nvgRect(args.vg, 0, 0, box.size.x, box.size.y); + nvgFillPaint(args.vg, + nvgLinearGradient(args.vg, + 0, 0, 0, box.size.y, + nvgRGB(0xff - 0xcd + 50, 0xff - 0xff + 50, 0xff), + nvgRGB(0xff - 0x8b + 50, 0xff - 0xf7 + 50, 0xff))); + nvgFill(args.vg); + + // outer bounds pattern + // TODO + + // box shadow + nvgBeginPath(args.vg); + nvgRect(args.vg, + kPedalMargin / 2, + kPedalMarginTop / 2, + kPedalMargin + widthPedal, + kPedalMarginTop + heightPedal); + nvgFillPaint(args.vg, + nvgBoxGradient(args.vg, + kPedalMargin, + kPedalMarginTop, + widthPedal, + heightPedal, + cornerRadius, + cornerRadius, + nvgRGBA(0,0,0,1.f), + nvgRGBA(0,0,0,0.f))); + nvgFill(args.vg); + + // .rt-neural .grid + nvgBeginPath(args.vg); + nvgRoundedRect(args.vg, kPedalMargin, kPedalMarginTop, widthPedal, heightPedal, cornerRadius); + nvgFillPaint(args.vg, + nvgLinearGradient(args.vg, + kPedalMargin, kPedalMarginTop, + kPedalMargin + box.size.x * 0.52f, 0, + nvgRGB(28, 23, 12), + nvgRGB(42, 34, 15))); + nvgFill(args.vg); + + nvgFillPaint(args.vg, + nvgLinearGradient(args.vg, + kPedalMargin + box.size.x * 0.5f, 0, + kPedalMargin + box.size.x, 0, + nvgRGB(42, 34, 15), + nvgRGB(19, 19, 19))); + nvgFill(args.vg); + + // extra + nvgStrokeColor(args.vg, nvgRGBA(150, 150, 150, 0.25f)); + nvgStroke(args.vg); + drawOutputJacksArea(args.vg); ModuleWidget::draw(args); From e7bb99c3cedeb4bcf46d39268eb90b67a9fdd692 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 18 May 2023 21:54:41 +0200 Subject: [PATCH 346/451] Allow usage of local user dir and config I held on for as long as I could, but plugin host caching needs it Signed-off-by: falkTX --- include/common.hpp | 10 +- patches/{init => templates}/fx.vcv | 0 patches/{init => templates}/main.vcv | 0 patches/{init => templates}/mini.vcv | 0 patches/{init => templates}/native.vcv | 0 patches/{init => templates}/synth.vcv | 0 src/CardinalCommon.cpp | 152 ++++++++++++++++++++----- src/CardinalCommon.hpp | 9 +- src/CardinalPlugin.cpp | 42 ++++--- src/CardinalUI.cpp | 26 ++++- src/custom/asset.cpp | 18 +-- src/override/MenuBar.cpp | 31 ++++- src/override/Scene.cpp | 2 +- 13 files changed, 220 insertions(+), 70 deletions(-) rename patches/{init => templates}/fx.vcv (100%) rename patches/{init => templates}/main.vcv (100%) rename patches/{init => templates}/mini.vcv (100%) rename patches/{init => templates}/native.vcv (100%) rename patches/{init => templates}/synth.vcv (100%) diff --git a/include/common.hpp b/include/common.hpp index 4de06be9..f5ccbfc5 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -97,3 +97,11 @@ void async_dialog_message(const char* message, std::function action); // opens a text input dialog, message and text can be null // action is always triggered on close (newText can be null), must be freed if not null void async_dialog_text_input(const char* message, const char* text, std::function action); + +// Cardinal specific config dir (might be equal to userDir) +namespace rack { +namespace asset { +extern std::string configDir; +std::string config(std::string filename = ""); +} +} diff --git a/patches/init/fx.vcv b/patches/templates/fx.vcv similarity index 100% rename from patches/init/fx.vcv rename to patches/templates/fx.vcv diff --git a/patches/init/main.vcv b/patches/templates/main.vcv similarity index 100% rename from patches/init/main.vcv rename to patches/templates/main.vcv diff --git a/patches/init/mini.vcv b/patches/templates/mini.vcv similarity index 100% rename from patches/init/mini.vcv rename to patches/templates/mini.vcv diff --git a/patches/init/native.vcv b/patches/templates/native.vcv similarity index 100% rename from patches/init/native.vcv rename to patches/templates/native.vcv diff --git a/patches/init/synth.vcv b/patches/templates/synth.vcv similarity index 100% rename from patches/init/synth.vcv rename to patches/templates/synth.vcv diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 3611a23f..747c751b 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -76,15 +76,15 @@ #endif #if CARDINAL_VARIANT_FX -# define CARDINAL_TEMPLATE_NAME "init/fx.vcv" +# define CARDINAL_VARIANT_NAME "fx" #elif CARDINAL_VARIANT_MINI -# define CARDINAL_TEMPLATE_NAME "init/mini.vcv" +# define CARDINAL_VARIANT_NAME "mini" #elif CARDINAL_VARIANT_NATIVE -# define CARDINAL_TEMPLATE_NAME "init/native.vcv" +# define CARDINAL_VARIANT_NAME "native" #elif CARDINAL_VARIANT_SYNTH -# define CARDINAL_TEMPLATE_NAME "init/synth.vcv" +# define CARDINAL_VARIANT_NAME "synth" #else -# define CARDINAL_TEMPLATE_NAME "init/main.vcv" +# define CARDINAL_VARIANT_NAME "main" #endif #ifdef DISTRHO_OS_WASM @@ -379,12 +379,8 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB using namespace rack; settings::allowCursorLock = false; - settings::autoCheckUpdates = false; - settings::autosaveInterval = 0; settings::devMode = true; settings::isPlugin = true; - settings::skipLoadOnLaunch = true; - settings::showTipsOnLaunch = false; settings::windowPos = math::Vec(0, 0); #ifdef HEADLESS_BEHAVIOUR settings::headless = true; @@ -446,27 +442,58 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB #elif defined(ARCH_MAC) asset::systemDir = "/Library/Application Support/Cardinal"; #elif defined(ARCH_WIN) - const std::string commonprogfiles = getSpecialPath(kSpecialPathCommonProgramFiles); - if (! commonprogfiles.empty()) - asset::systemDir = system::join(commonprogfiles, "Cardinal"); + asset::systemDir = system::join(getSpecialPath(kSpecialPathCommonProgramFiles), "Cardinal"); #else asset::systemDir = CARDINAL_PLUGIN_PREFIX "/share/cardinal"; #endif - asset::bundlePath = system::join(asset::systemDir, "PluginManifests"); } } + } - asset::userDir = asset::systemDir; + if (asset::userDir.empty()) + { + #if defined(DISTRHO_OS_WASM) + asset::userDir = "/userfiles"; + #elif defined(ARCH_MAC) + asset::userDir = system::join(homeDir(), "Documents", "Cardinal"); + #elif defined(ARCH_WIN) + asset::userDir = system::join(getSpecialPath(kSpecialPathMyDocuments), "Cardinal"); + #else + if (const char* const xdgEnv = getenv("XDG_DOCUMENTS_DIR")) + asset::userDir = system::join(xdgEnv, "Cardinal"); + else + asset::userDir = system::join(homeDir(), "Documents", "Cardinal"); + #endif + system::createDirectory(asset::userDir); } + #ifndef CARDINAL_COMMON_DSP_ONLY + if (asset::configDir.empty()) + { + #if defined(ARCH_MAC) || defined(ARCH_WIN) || defined(DISTRHO_OS_WASM) + asset::configDir = asset::userDir; + #else + if (const char* const xdgEnv = getenv("XDG_CONFIG_HOME")) + asset::configDir = system::join(xdgEnv, "Cardinal"); + else + asset::configDir = system::join(homeDir(), ".config", "Cardinal"); + system::createDirectory(asset::configDir); + #endif + } + #endif + + if (settings::settingsPath.empty()) + settings::settingsPath = asset::config(CARDINAL_VARIANT_NAME ".json"); + const std::string patchesPath = asset::patchesPath(); #ifdef DISTRHO_OS_WASM - templatePath = system::join(patchesPath, CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME); + templatePath = system::join(patchesPath, CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME ".vcv"); + factoryTemplatePath = system::join(patchesPath, "templates/" CARDINAL_VARIANT_NAME ".vcv"); #else - templatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); + templatePath = asset::user("templates/" CARDINAL_VARIANT_NAME ".vcv"); + factoryTemplatePath = system::join(patchesPath, "templates/" CARDINAL_VARIANT_NAME ".vcv"); #endif - factoryTemplatePath = system::join(patchesPath, CARDINAL_TEMPLATE_NAME); // Log environment INFO("%s %s %s, compatible with Rack version %s", APP_NAME.c_str(), APP_EDITION.c_str(), CARDINAL_VERSION.c_str(), APP_VERSION.c_str()); @@ -502,6 +529,27 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB INFO("Initializing plugin browser DB"); app::browserInit(); + if (! plugin->isDummyInstance()) + { + INFO("Loading settings"); + settings::load(); + } + + // enforce settings that do not make sense as anything else + settings::safeMode = false; + settings::token.clear(); + settings::windowMaximized = false; + settings::windowPos = math::Vec(0, 0); + settings::pixelRatio = 0.0; + settings::sampleRate = 0; + settings::threadCount = 1; + settings::frameSwapInterval = 1; + settings::autosaveInterval = 0; + settings::skipLoadOnLaunch = true; + settings::autoCheckUpdates = false; + settings::showTipsOnLaunch = false; + settings::tipIndex = -1; + #ifdef CARDINAL_INIT_OSC_THREAD INFO("Initializing OSC Remote control"); const char* port; @@ -538,6 +586,9 @@ Initializer::~Initializer() } #endif + INFO("Save settings"); + settings::save(); + INFO("Clearing asset paths"); asset::bundlePath.clear(); asset::systemDir.clear(); @@ -596,6 +647,8 @@ std::string getSpecialPath(const SpecialPath type) case kSpecialPathAppData: csidl = CSIDL_APPDATA; break; + case kSpecialPathMyDocuments: + csidl = CSIDL_MYDOCUMENTS; default: return {}; } @@ -617,14 +670,14 @@ char* patchStorageSlug = nullptr; std::string homeDir() { -# ifdef ARCH_WIN + #ifdef ARCH_WIN return getSpecialPath(kSpecialPathUserProfile); -# else + #else if (const char* const home = getenv("HOME")) return home; if (struct passwd* const pwd = getpwuid(getuid())) return pwd->pw_dir; -# endif + #endif return {}; } @@ -719,15 +772,38 @@ void loadSelectionDialog() }); } -void loadTemplateDialog() +void loadTemplate(const bool factory) { -#ifndef HEADLESS_BEHAVIOUR - promptClear("The current patch is unsaved. Clear it and start a new patch?", []() { - APP->patch->loadTemplate(); + try { + APP->patch->load(factory ? APP->patch->factoryTemplatePath : APP->patch->templatePath); + } + catch (Exception& e) { + // if user template failed, try the factory one + if (!factory) + return loadTemplate(true); - if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) - if (remoteDetails->autoDeploy) - remoteUtils::sendFullPatchToRemote(remoteDetails); + const std::string message = string::f("Could not load template patch, clearing rack: %s", e.what()); + asyncDialog::create(message.c_str()); + + APP->patch->clear(); + APP->patch->clearAutosave(); + } + + // load() sets the patch's original patch, but we don't want to use that. + APP->patch->path.clear(); + APP->history->setSaved(); + + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) + if (remoteDetails->autoDeploy) + remoteUtils::sendFullPatchToRemote(remoteDetails); +} + + +void loadTemplateDialog(const bool factory) +{ +#ifndef HEADLESS_BEHAVIOUR + promptClear("The current patch is unsaved. Clear it and start a new patch?", [factory]() { + loadTemplate(factory); }); #endif } @@ -772,9 +848,14 @@ static void saveAsDialog(const bool uncompressed) { std::string dir; if (! APP->patch->path.empty()) + { dir = system::getDirectory(APP->patch->path); + } else - dir = homeDir(); + { + dir = asset::user("patches"); + system::createDirectories(dir); + } CardinalPluginContext* const pcontext = static_cast(APP); DISTRHO_SAFE_ASSERT_RETURN(pcontext != nullptr,); @@ -806,6 +887,21 @@ void saveAsDialogUncompressed() #endif } +void saveTemplateDialog() +{ + asyncDialog::create("Overwrite template patch?", []{ + rack::system::createDirectories(system::getDirectory(APP->patch->templatePath)); + + try { + APP->patch->save(APP->patch->templatePath); + } + catch (Exception& e) { + asyncDialog::create(string::f("Could not save template patch: %s", e.what()).c_str()); + return; + } + }); +} + void openBrowser(const std::string& url) { #ifdef DISTRHO_OS_WASM diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 9de27b88..5c6e9c3c 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -44,6 +44,7 @@ enum SpecialPath { kSpecialPathCommonProgramFiles, kSpecialPathProgramFiles, kSpecialPathAppData, + kSpecialPathMyDocuments, }; std::string getSpecialPath(SpecialPath type); #endif @@ -54,6 +55,8 @@ extern char* patchRemoteURL; extern char* patchStorageSlug; #endif +std::string homeDir(); + } // namespace rack // ----------------------------------------------------------------------------------------------------------- @@ -63,11 +66,13 @@ namespace patchUtils { void loadDialog(); void loadPathDialog(const std::string& path, bool asTemplate = false); void loadSelectionDialog(); -void loadTemplateDialog(); +void loadTemplate(bool factory); +void loadTemplateDialog(bool factory); void revertDialog(); void saveDialog(const std::string& path); void saveAsDialog(); void saveAsDialogUncompressed(); +void saveTemplateDialog(); void appendSelectionContextMenu(rack::ui::Menu* menu); void openBrowser(const std::string& url); diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index cce5b0ff..ea1584b9 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -198,20 +198,20 @@ class CardinalPlugin : public CardinalBasePlugin fWasBypassed(false) { #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) - fWindowParameters[kWindowParameterShowTooltips] = 1.0f; - fWindowParameters[kWindowParameterCableOpacity] = 50.0f; - fWindowParameters[kWindowParameterCableTension] = 75.0f; - fWindowParameters[kWindowParameterRackBrightness] = 100.0f; - fWindowParameters[kWindowParameterHaloBrightness] = 25.0f; + fWindowParameters[kWindowParameterShowTooltips] = rack::settings::tooltips ? 1.f : 0.f; + fWindowParameters[kWindowParameterCableOpacity] = std::min(100.f, std::max(0.f, rack::settings::cableOpacity * 100)); + fWindowParameters[kWindowParameterCableTension] = std::min(100.f, std::max(0.f, rack::settings::cableTension * 100)); + fWindowParameters[kWindowParameterRackBrightness] = std::min(100.f, std::max(0.f, rack::settings::rackBrightness * 100)); + fWindowParameters[kWindowParameterHaloBrightness] = std::min(100.f, std::max(0.f, rack::settings::haloBrightness * 100)); fWindowParameters[kWindowParameterKnobMode] = 0.0f; - fWindowParameters[kWindowParameterWheelKnobControl] = 0.0f; - fWindowParameters[kWindowParameterWheelSensitivity] = 1.0f; - fWindowParameters[kWindowParameterLockModulePositions] = 0.0f; + fWindowParameters[kWindowParameterWheelKnobControl] = rack::settings::knobScroll ? 1.f : 0.f; + fWindowParameters[kWindowParameterWheelSensitivity] = std::min(10.f, std::max(0.1f, rack::settings::knobScrollSensitivity * 1000)); + fWindowParameters[kWindowParameterLockModulePositions] = rack::settings::lockModules ? 1.f : 0.f; fWindowParameters[kWindowParameterUpdateRateLimit] = 0.0f; fWindowParameters[kWindowParameterBrowserSort] = 3.0f; fWindowParameters[kWindowParameterBrowserZoom] = 50.0f; - fWindowParameters[kWindowParameterInvertZoom] = 0.0f; - fWindowParameters[kWindowParameterSqueezeModulePositions] = 1.0f; + fWindowParameters[kWindowParameterInvertZoom] = rack::settings::invertZoom ? 1.f : 0.f; + fWindowParameters[kWindowParameterSqueezeModulePositions] = rack::settings::squeezeModules ? 1.f : 0.f; #endif #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS std::memset(fMiniReportValues, 0, sizeof(fMiniReportValues)); @@ -283,8 +283,6 @@ class CardinalPlugin : public CardinalBasePlugin { context->patch->loadTemplate(); context->scene->rackScroll->reset(); - // swap to factory template after first load - context->patch->templatePath = context->patch->factoryTemplatePath; } #ifdef CARDINAL_INIT_OSC_THREAD @@ -463,7 +461,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 1.0f; + parameter.ranges.def = rack::settings::tooltips ? 1.f : 0.f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; break; @@ -475,7 +473,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 50.0f; + parameter.ranges.def = std::min(100.f, std::max(0.f, rack::settings::cableOpacity * 100)); parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; break; @@ -487,7 +485,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 75.0f; + parameter.ranges.def = std::min(100.f, std::max(0.f, rack::settings::cableTension * 100)); parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; break; @@ -499,7 +497,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 100.0f; + parameter.ranges.def = std::min(100.f, std::max(0.f, rack::settings::rackBrightness * 100)); parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; break; @@ -511,7 +509,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 25.0f; + parameter.ranges.def = std::min(100.f, std::max(0.f, rack::settings::haloBrightness * 100)); parameter.ranges.min = 0.0f; parameter.ranges.max = 100.0f; break; @@ -542,7 +540,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 0.0f; + parameter.ranges.def = rack::settings::knobScroll ? 1.f : 0.f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; break; @@ -553,7 +551,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 1.0f; + parameter.ranges.def = std::min(10.f, std::max(0.1f, rack::settings::knobScrollSensitivity * 1000)); parameter.ranges.min = 0.1f; parameter.ranges.max = 10.0f; break; @@ -564,7 +562,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 0.0f; + parameter.ranges.def = rack::settings::lockModules ? 1.f : 0.f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; break; @@ -650,7 +648,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 0.0f; + parameter.ranges.def = rack::settings::invertZoom ? 1.f : 0.f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; break; @@ -661,7 +659,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 1.0f; + parameter.ranges.def = rack::settings::squeezeModules ? 1.f : 0.f; parameter.ranges.min = 0.0f; parameter.ranges.max = 1.0f; break; diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index acdf923b..b28f216b 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -277,8 +277,8 @@ static void downloadRemotePatchSucceeded(const char* const filename) return; } + context->patch->path.clear(); context->scene->rackScroll->reset(); - context->patch->path = ""; context->history->setSaved(); } #endif @@ -415,8 +415,16 @@ class CardinalUI : public CardinalBaseUI, setGeometryConstraints(648 * scaleFactor, 538 * scaleFactor); - if (scaleFactor != 1.0) + if (rack::isStandalone() && rack::system::exists(rack::settings::settingsPath)) + { + const double width = std::max(648.f, rack::settings::windowSize.x) * scaleFactor; + 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); + } rack::window::WindowSetPluginUI(context->window, this); @@ -1137,10 +1145,15 @@ class CardinalUI : public CardinalBaseUI, WindowSetInternalSize(context->window, rack::math::Vec(ev.size.getWidth(), ev.size.getHeight())); const double scaleFactor = getScaleFactor(); - char sizeString[64]; - std::snprintf(sizeString, sizeof(sizeString), "%d:%d", - (int)(ev.size.getWidth() / scaleFactor), (int)(ev.size.getHeight() / scaleFactor)); + const int width = static_cast(ev.size.getWidth() / scaleFactor + 0.5); + const int height = static_cast(ev.size.getHeight() / scaleFactor + 0.5); + + char sizeString[64] = {}; + std::snprintf(sizeString, sizeof(sizeString), "%d:%d", width, height); setState("windowSize", sizeString); + + if (rack::isStandalone()) + rack::settings::windowSize = rack::math::Vec(width, height); } void uiFocus(const bool focus, CrossingMode) override @@ -1212,7 +1225,10 @@ class CardinalUI : public CardinalBaseUI, } context->patch->path = sfilename; + context->patch->pushRecentPath(sfilename); context->history->setSaved(); + + rack::settings::save(); } #if 0 diff --git a/src/custom/asset.cpp b/src/custom/asset.cpp index dcc40166..c1a2897a 100644 --- a/src/custom/asset.cpp +++ b/src/custom/asset.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -36,10 +36,19 @@ extern bool forceBlackScrew; extern bool forceSilverScrew; #endif -std::string userDir; // ignored +std::string configDir; // points to writable config dir (might be equal to userDir) +std::string userDir; // points to common writable dir std::string systemDir; // points to plugin resources dir (or installed/local Rack dir) std::string bundlePath; // points to plugin manifests dir (or empty) +std::string config(std::string filename) { + return system::join(configDir, filename); +} + +std::string user(std::string filename) { + return system::join(userDir, filename); +} + // get rid of "res/" prefix static inline std::string& trim(std::string& s) { @@ -48,11 +57,6 @@ static inline std::string& trim(std::string& s) return s; } -// ignored, returns the same as `system` -std::string user(std::string filename) { - return system(filename); -} - // get system resource, trimming "res/" prefix if we are loaded as a plugin bundle std::string system(std::string filename) { #ifndef HEADLESS diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index f8fdcb2b..659c7a44 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -127,20 +127,33 @@ struct FileButton : MenuButton { menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); #ifndef DISTRHO_OS_WASM - const char* const NewShortcut = RACK_MOD_CTRL_NAME "+N"; + constexpr const char* const NewShortcut = RACK_MOD_CTRL_NAME "+N"; #else - const char* const NewShortcut = ""; + constexpr const char* const NewShortcut = ""; #endif menu->addChild(createMenuItem("New", NewShortcut, []() { - patchUtils::loadTemplateDialog(); + patchUtils::loadTemplateDialog(false); })); #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifndef DISTRHO_OS_WASM + menu->addChild(createMenuItem("New (factory template)", "", []() { + patchUtils::loadTemplateDialog(true); + })); + menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { patchUtils::loadDialog(); })); + menu->addChild(createSubmenuItem("Open recent", "", [](ui::Menu* menu) { + for (const std::string& path : settings::recentPatchPaths) { + std::string name = system::getStem(path); + menu->addChild(createMenuItem(name, "", [=]() { + patchUtils::loadPathDialog(path, false); + })); + } + }, settings::recentPatchPaths.empty())); + menu->addChild(createMenuItem("Save", RACK_MOD_CTRL_NAME "+S", []() { // NOTE: will do nothing if path is empty, intentionally patchUtils::saveDialog(APP->patch->path); @@ -172,6 +185,10 @@ struct FileButton : MenuButton { patchUtils::revertDialog(); }, APP->patch->path.empty())); + menu->addChild(createMenuItem("Overwrite template", "", []() { + patchUtils::saveTemplateDialog(); + })); + #if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifdef __MOD_DEVICES__ #define REMOTE_NAME "MOD" @@ -728,6 +745,12 @@ struct HelpButton : MenuButton { menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuItem("Open user folder", "", [=]() { + system::openDirectory(asset::user("")); + })); + + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("Cardinal " + APP_EDITION + " " + CARDINAL_VERSION)); menu->addChild(createMenuLabel("Rack " + APP_VERSION + " Compatible")); } diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 58dd32e1..184507f1 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -261,7 +261,7 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { // DEBUG("key '%d '%c' scancode %d '%c' keyName '%s'", e.key, e.key, e.scancode, e.scancode, e.keyName.c_str()); if (e.keyName == "n" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { - patchUtils::loadTemplateDialog(); + patchUtils::loadTemplateDialog(false); e.consume(this); } if (e.keyName == "q" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { From 1946efad7e7d8571ab656e68620ffb33eb6e7087 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 18 May 2023 22:03:39 +0200 Subject: [PATCH 347/451] Fix build Signed-off-by: falkTX --- src/CardinalCommon.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 747c751b..f832b880 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -529,7 +529,9 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB INFO("Initializing plugin browser DB"); app::browserInit(); + #ifndef CARDINAL_COMMON_UI_ONLY if (! plugin->isDummyInstance()) + #endif { INFO("Loading settings"); settings::load(); From 64ba23c5e25bf1500148f0af1a98f1fb2e1c4753 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 18 May 2023 22:42:34 +0200 Subject: [PATCH 348/451] Finalize persistent settings stuff Signed-off-by: falkTX --- src/CardinalCommon.cpp | 21 +++++++++++++--- src/CardinalPlugin.cpp | 55 ++++++++++++++++++++++++++++++------------ 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index f832b880..162709e1 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -378,13 +378,28 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB { using namespace rack; + // Cardinal default settings, potentially overriding VCV Rack ones settings::allowCursorLock = false; + settings::tooltips = true; + settings::cableOpacity = 0.5f; + settings::cableTension = 0.75f; + settings::rackBrightness = 1.0f; + settings::haloBrightness = 0.25f; + settings::knobMode = settings::KNOB_MODE_LINEAR; + settings::knobScroll = false; + settings::knobScrollSensitivity = 0.001f; + settings::lockModules = false; + settings::browserSort = settings::BROWSER_SORT_UPDATED; + settings::browserZoom = -1.f; + settings::invertZoom = false; + settings::squeezeModules = true; + + // runtime behaviour settings::devMode = true; settings::isPlugin = true; - settings::windowPos = math::Vec(0, 0); -#ifdef HEADLESS_BEHAVIOUR + #ifdef HEADLESS_BEHAVIOUR settings::headless = true; -#endif + #endif // copied from https://community.vcvrack.com/t/16-colour-cable-palette/15951 settings::cableColors = { diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index ea1584b9..407d2f14 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -128,6 +128,26 @@ static char* getPatchStorageSlug() { }; #endif +#if CARDINAL_VARIANT_MINI || !defined(HEADLESS) +float RackKnobModeToFloat(const rack::settings::KnobMode knobMode) noexcept +{ + switch (knobMode) + { + case rack::settings::KNOB_MODE_LINEAR: + return 0.f; + case rack::settings::KNOB_MODE_ROTARY_ABSOLUTE: + return 1.f; + case rack::settings::KNOB_MODE_ROTARY_RELATIVE: + return 2.f; + // unused in Rack + case rack::settings::KNOB_MODE_SCALED_LINEAR: + break; + } + + return 0.f; +} +#endif + // ----------------------------------------------------------------------------------------------------------- struct ScopedContext { @@ -203,15 +223,18 @@ class CardinalPlugin : public CardinalBasePlugin fWindowParameters[kWindowParameterCableTension] = std::min(100.f, std::max(0.f, rack::settings::cableTension * 100)); fWindowParameters[kWindowParameterRackBrightness] = std::min(100.f, std::max(0.f, rack::settings::rackBrightness * 100)); fWindowParameters[kWindowParameterHaloBrightness] = std::min(100.f, std::max(0.f, rack::settings::haloBrightness * 100)); - fWindowParameters[kWindowParameterKnobMode] = 0.0f; + fWindowParameters[kWindowParameterKnobMode] = RackKnobModeToFloat(rack::settings::knobMode); fWindowParameters[kWindowParameterWheelKnobControl] = rack::settings::knobScroll ? 1.f : 0.f; fWindowParameters[kWindowParameterWheelSensitivity] = std::min(10.f, std::max(0.1f, rack::settings::knobScrollSensitivity * 1000)); fWindowParameters[kWindowParameterLockModulePositions] = rack::settings::lockModules ? 1.f : 0.f; - fWindowParameters[kWindowParameterUpdateRateLimit] = 0.0f; - fWindowParameters[kWindowParameterBrowserSort] = 3.0f; - fWindowParameters[kWindowParameterBrowserZoom] = 50.0f; + fWindowParameters[kWindowParameterBrowserSort] = std::min(rack::settings::BROWSER_SORT_RANDOM, + std::max(rack::settings::BROWSER_SORT_UPDATED, + rack::settings::browserSort)); + fWindowParameters[kWindowParameterBrowserZoom] = std::min(200.f, std::max(25.f, std::pow(2.f, rack::settings::browserZoom) * 100.0f)); fWindowParameters[kWindowParameterInvertZoom] = rack::settings::invertZoom ? 1.f : 0.f; fWindowParameters[kWindowParameterSqueezeModulePositions] = rack::settings::squeezeModules ? 1.f : 0.f; + // not saved + fWindowParameters[kWindowParameterUpdateRateLimit] = 0.0f; #endif #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS std::memset(fMiniReportValues, 0, sizeof(fMiniReportValues)); @@ -520,7 +543,7 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 0.0f; + parameter.ranges.def = RackKnobModeToFloat(rack::settings::knobMode); parameter.ranges.min = 0.0f; parameter.ranges.max = 2.0f; parameter.enumValues.count = 3; @@ -593,24 +616,26 @@ class CardinalPlugin : public CardinalBasePlugin #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS parameter.hints |= kParameterIsHidden; #endif - parameter.ranges.def = 3.0f; - parameter.ranges.min = 0.0f; - parameter.ranges.max = 5.0f; + parameter.ranges.def = std::min(rack::settings::BROWSER_SORT_RANDOM, + std::max(rack::settings::BROWSER_SORT_UPDATED, + rack::settings::browserSort)); + parameter.ranges.min = rack::settings::BROWSER_SORT_UPDATED; + parameter.ranges.max = rack::settings::BROWSER_SORT_RANDOM; parameter.enumValues.count = 6; parameter.enumValues.restrictedMode = true; parameter.enumValues.values = new ParameterEnumerationValue[6]; parameter.enumValues.values[0].label = "Updated"; - parameter.enumValues.values[0].value = 0.0f; + parameter.enumValues.values[0].value = rack::settings::BROWSER_SORT_UPDATED; parameter.enumValues.values[1].label = "Last used"; - parameter.enumValues.values[1].value = 1.0f; + parameter.enumValues.values[1].value = rack::settings::BROWSER_SORT_LAST_USED; parameter.enumValues.values[2].label = "Most used"; - parameter.enumValues.values[2].value = 2.0f; + parameter.enumValues.values[2].value = rack::settings::BROWSER_SORT_MOST_USED; parameter.enumValues.values[3].label = "Brand"; - parameter.enumValues.values[3].value = 3.0f; + parameter.enumValues.values[3].value = rack::settings::BROWSER_SORT_BRAND; parameter.enumValues.values[4].label = "Name"; - parameter.enumValues.values[4].value = 4.0f; + parameter.enumValues.values[4].value = rack::settings::BROWSER_SORT_NAME; parameter.enumValues.values[5].label = "Random"; - parameter.enumValues.values[5].value = 5.0f; + parameter.enumValues.values[5].value = rack::settings::BROWSER_SORT_RANDOM; break; case kWindowParameterBrowserZoom: parameter.name = "Browser zoom"; @@ -620,7 +645,7 @@ class CardinalPlugin : public CardinalBasePlugin parameter.hints |= kParameterIsHidden; #endif parameter.unit = "%"; - parameter.ranges.def = 50.0f; + parameter.ranges.def = std::min(200.f, std::max(25.f, std::pow(2.f, rack::settings::browserZoom) * 100.0f)); parameter.ranges.min = 25.0f; parameter.ranges.max = 200.0f; parameter.enumValues.count = 7; From d80c2e5c96af5344d5fe11280b59f79d2402d7a4 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 18 May 2023 23:51:01 +0200 Subject: [PATCH 349/451] Do not write settings to disk if only generating LV2 ttl Signed-off-by: falkTX --- src/CardinalCommon.cpp | 28 ++++++++++++++++++++-------- src/CardinalCommon.hpp | 1 + 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 162709e1..6019f2ad 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -426,6 +426,12 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB random::init(); ui::init(); + #ifdef CARDINAL_COMMON_UI_ONLY + constexpr const bool isRealInstance = true; + #else + const bool isRealInstance = !plugin->isDummyInstance(); + #endif + if (asset::systemDir.empty()) { if (const char* const bundlePath = (plugin != nullptr ? plugin->getBundlePath() : @@ -480,7 +486,9 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB else asset::userDir = system::join(homeDir(), "Documents", "Cardinal"); #endif - system::createDirectory(asset::userDir); + + if (isRealInstance) + system::createDirectory(asset::userDir); } #ifndef CARDINAL_COMMON_DSP_ONLY @@ -493,7 +501,9 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB asset::configDir = system::join(xdgEnv, "Cardinal"); else asset::configDir = system::join(homeDir(), ".config", "Cardinal"); - system::createDirectory(asset::configDir); + + if (isRealInstance) + system::createDirectory(asset::configDir); #endif } #endif @@ -544,14 +554,13 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB INFO("Initializing plugin browser DB"); app::browserInit(); - #ifndef CARDINAL_COMMON_UI_ONLY - if (! plugin->isDummyInstance()) - #endif + if (isRealInstance) { INFO("Loading settings"); settings::load(); + shouldSaveSettings = true; } - + // enforce settings that do not make sense as anything else settings::safeMode = false; settings::token.clear(); @@ -603,8 +612,11 @@ Initializer::~Initializer() } #endif - INFO("Save settings"); - settings::save(); + if (shouldSaveSettings) + { + INFO("Save settings"); + settings::save(); + } INFO("Clearing asset paths"); asset::bundlePath.clear(); diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 5c6e9c3c..dcbe375e 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -100,6 +100,7 @@ struct Initializer #endif std::string templatePath; std::string factoryTemplatePath; + bool shouldSaveSettings = false; Initializer(const CardinalBasePlugin* plugin, const CardinalBaseUI* ui); ~Initializer(); From 03055c2563aff934a3b8358fcd2270ff64f10846 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 19 May 2023 00:18:25 +0200 Subject: [PATCH 350/451] Fix persistence settings for VST2/3 instances Signed-off-by: falkTX --- src/CardinalCommon.cpp | 49 ++++++++++++++++++++++++------------------ src/CardinalCommon.hpp | 1 + src/CardinalPlugin.cpp | 4 ++++ 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 6019f2ad..80874acb 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -554,27 +554,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB INFO("Initializing plugin browser DB"); app::browserInit(); - if (isRealInstance) - { - INFO("Loading settings"); - settings::load(); - shouldSaveSettings = true; - } - - // enforce settings that do not make sense as anything else - settings::safeMode = false; - settings::token.clear(); - settings::windowMaximized = false; - settings::windowPos = math::Vec(0, 0); - settings::pixelRatio = 0.0; - settings::sampleRate = 0; - settings::threadCount = 1; - settings::frameSwapInterval = 1; - settings::autosaveInterval = 0; - settings::skipLoadOnLaunch = true; - settings::autoCheckUpdates = false; - settings::showTipsOnLaunch = false; - settings::tipIndex = -1; + loadSettings(isRealInstance); #ifdef CARDINAL_INIT_OSC_THREAD INFO("Initializing OSC Remote control"); @@ -636,6 +616,33 @@ Initializer::~Initializer() logger::destroy(); } +void Initializer::loadSettings(const bool isRealInstance) +{ + using namespace rack; + + if (isRealInstance) + { + INFO("Loading settings"); + settings::load(); + shouldSaveSettings = true; + } + + // enforce settings that do not make sense as anything else + settings::safeMode = false; + settings::token.clear(); + settings::windowMaximized = false; + settings::windowPos = math::Vec(0, 0); + settings::pixelRatio = 0.0; + settings::sampleRate = 0; + settings::threadCount = 1; + settings::frameSwapInterval = 1; + settings::autosaveInterval = 0; + settings::skipLoadOnLaunch = true; + settings::autoCheckUpdates = false; + settings::showTipsOnLaunch = false; + settings::tipIndex = -1; +} + // -------------------------------------------------------------------------------------------------------------------- END_NAMESPACE_DISTRHO diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index dcbe375e..0d1d28e6 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -104,6 +104,7 @@ struct Initializer Initializer(const CardinalBasePlugin* plugin, const CardinalBaseUI* ui); ~Initializer(); + void loadSettings(bool isRealInstance); }; #ifndef HEADLESS diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 407d2f14..db5ab1a6 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -217,6 +217,10 @@ class CardinalPlugin : public CardinalBasePlugin fNextExpectedFrame(0), fWasBypassed(false) { + // check if first time loading a real instance + if (!fInitializer->shouldSaveSettings && !isDummyInstance()) + fInitializer->loadSettings(true); + #if CARDINAL_VARIANT_MINI || !defined(HEADLESS) fWindowParameters[kWindowParameterShowTooltips] = rack::settings::tooltips ? 1.f : 0.f; fWindowParameters[kWindowParameterCableOpacity] = std::min(100.f, std::max(0.f, rack::settings::cableOpacity * 100)); From 1262f318da0e2f2b7c939a94f9ffc0783334182d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 20 May 2023 19:38:29 +0200 Subject: [PATCH 351/451] Update and adapt to Rack 2.3 Signed-off-by: falkTX --- Makefile.base.mk | 18 +- carla | 2 +- deps/Makefile | 23 +- include/simd-compat/emmintrin.h | 11 +- include/simd-compat/immintrin.h | 9 +- include/simd-compat/mmintrin.h | 9 +- include/simd-compat/pmmintrin.h | 20 +- include/simd-compat/xmmintrin.h | 11 +- include/simde | 1 - plugins/Makefile | 2 +- plugins/cf | 2 +- plugins/mscHack | 2 +- src/CardinalCommon.cpp | 12 +- src/CardinalCommon.hpp | 2 + src/Makefile | 4 + src/Rack | 2 +- src/custom/RemoteWindow.cpp | 8 +- src/custom/dep.cpp | 13 +- src/override/Engine.cpp | 27 +- src/override/MenuBar.cpp | 65 ++-- src/override/Model.cpp | 16 +- src/override/ModuleWidget.cpp | 45 +-- src/override/OpenGlWidget.cpp | 4 +- src/override/Scene.cpp | 6 +- src/override/Window.cpp | 54 ++-- src/override/common.cpp | 9 +- src/override/context.cpp | 5 +- src/override/diffs/Engine.cpp.diff | 378 ++++++++++++++--------- src/override/diffs/MenuBar.cpp.diff | 232 ++++++++------ src/override/diffs/Model.cpp.diff | 48 +-- src/override/diffs/ModuleWidget.cpp.diff | 123 ++++---- src/override/diffs/OpenGlWidget.cpp.diff | 8 +- src/override/diffs/Scene.cpp.diff | 58 ++-- src/override/diffs/Window.cpp.diff | 274 ++++++++-------- src/override/diffs/blendish.c.diff | 4 +- src/override/diffs/common.cpp.diff | 25 +- src/override/diffs/context.cpp.diff | 27 +- src/override/diffs/minblep.cpp.diff | 8 +- src/override/diffs/plugin.cpp.diff | 41 ++- src/override/minblep.cpp | 4 +- src/override/plugin.cpp | 6 +- 41 files changed, 896 insertions(+), 722 deletions(-) delete mode 160000 include/simde diff --git a/Makefile.base.mk b/Makefile.base.mk index b248d893..24852bd5 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -94,6 +94,21 @@ endif BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing +# ----------------------------------------------------------------------------- +# simde flags + +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/simde) +BASE_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 +BASE_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE +BASE_FLAGS += -DSIMDE_FAST_MATH +BASE_FLAGS += -DSIMDE_FAST_NANS +BASE_FLAGS += -DSIMDE_FAST_ROUND_MODE +BASE_FLAGS += -DSIMDE_FAST_ROUND_TIES + +# unwanted +BASE_FLAGS += -DSIMDE_X86_SSE4_1_H +BASE_FLAGS += -DSIMDE_X86_SSE4_2_H + # ----------------------------------------------------------------------------- # Rack build flags @@ -163,8 +178,6 @@ endif BASE_FLAGS += -I$(abspath $(ROOT)/dpf/dgl/src/nanovg) BASE_FLAGS += -I$(abspath $(ROOT)/dpf/distrho) -BASE_FLAGS += -I$(abspath $(ROOT)/include/simde) - BASE_FLAGS += -I$(abspath $(ROOT)/src) BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/include) BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/include/dsp) @@ -174,6 +187,7 @@ BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/glfw/include) BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/nanosvg/src) BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/oui-blendish) BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/pffft) +BASE_FLAGS += -I$(abspath $(ROOT)/src/Rack/dep/tinyexpr) BUILD_C_FLAGS += -std=gnu11 diff --git a/carla b/carla index 9c1cad53..e58f7a8c 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 9c1cad538702767d51fc59d17080c74313c280cd +Subproject commit e58f7a8c7a8797656747b11a2608fc8b6ec90b8e diff --git a/deps/Makefile b/deps/Makefile index 97c986a1..c845a97e 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -197,14 +197,10 @@ $(RACK_DEP_PATH)/libsamplerate-0.1.9/.stamp-patched: touch $@ # libspeexdsp: hide symbols -$(RACK_DEP_PATH)/lib/libspeexdsp.a: $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched - -$(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched: - $(DEP_MAKE2) -C $(RACK_DEP_PATH) speexdsp-SpeexDSP-1.2rc3 \ - WGET="wget -c http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz && mv speexdsp-1.2rc3.tar.gz speexdsp-SpeexDSP-1.2rc3.tgz #" \ - SHA256SUM="true" \ - UNTAR="mkdir -p speexdsp-SpeexDSP-1.2rc3 && tar -x --strip-components=1 --directory=$(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 -f" - sed -i -e "s/#pragma GCC visibility push/#error we dont want this/" $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/configure +$(RACK_DEP_PATH)/lib/libspeexdsp.a: $(RACK_DEP_PATH)/speexdsp/.stamp-patched + +$(RACK_DEP_PATH)/speexdsp/.stamp-patched: + sed -i -e 's/__attribute__((visibility("default")))//' $(RACK_DEP_PATH)/speexdsp/configure.ac touch $@ # custom zstd build for only building static libs @@ -279,12 +275,7 @@ endif endif # same flags as applied to main build -SURGE_CXX_FLAGS += -DSIMDE_ACCURACY_PREFERENCE=0 -SURGE_CXX_FLAGS += -DSIMDE_FAST_CONVERSION_RANGE -SURGE_CXX_FLAGS += -DSIMDE_FAST_MATH -SURGE_CXX_FLAGS += -DSIMDE_FAST_NANS -SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_MODE -SURGE_CXX_FLAGS += -DSIMDE_FAST_ROUND_TIES +SURGE_CXX_FLAGS += -I$(abspath ../src/Rack/dep/simde) # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) @@ -315,7 +306,7 @@ $(SURGE_DEP_PATH)/Makefile: $(SURGE_SRC_PATH)/CMakeLists.txt -DSURGE_SKIP_LUA=TRUE \ -DSURGE_SKIP_ODDSOUND_MTS=TRUE \ -DSURGE_JUCE_PATH=$(abspath ../carla/source) \ - -DSURGE_SIMDE_PATH=$(abspath ../include/simde) \ + -DSURGE_SIMDE_PATH=$(abspath ../src/Rack/dep/simde) \ $(SURGE_SRC_PATH) # -------------------------------------------------------------- @@ -352,7 +343,6 @@ clean: rm -rf $(RACK_DEP_PATH)/jansson-2.12 rm -rf $(RACK_DEP_PATH)/libarchive-3.4.3 rm -rf $(RACK_DEP_PATH)/libsamplerate-0.1.9 - rm -rf $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3 rm -rf $(RACK_DEP_PATH)/zstd-1.4.5 rm -rf $(SURGE_DEP_PATH) @@ -360,7 +350,6 @@ download: \ $(RACK_DEP_PATH)/jansson-2.12 \ $(RACK_DEP_PATH)/libarchive-3.4.3/.stamp-patched \ $(RACK_DEP_PATH)/libsamplerate-0.1.9/.stamp-patched \ - $(RACK_DEP_PATH)/speexdsp-SpeexDSP-1.2rc3/.stamp-patched \ $(RACK_DEP_PATH)/zstd-1.4.5/.stamp-patched quickjs: $(RACK_DEP_PATH)/lib/libquickjs.a diff --git a/include/simd-compat/emmintrin.h b/include/simd-compat/emmintrin.h index f3f798ba..1fc6dc07 100644 --- a/include/simd-compat/emmintrin.h +++ b/include/simd-compat/emmintrin.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,12 +20,7 @@ #if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else -# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES -# define SIMDE_FAST_CONVERSION_RANGE -# define SIMDE_FAST_MATH -# define SIMDE_FAST_NANS -# define SIMDE_FAST_ROUND_MODE -# define SIMDE_FAST_ROUND_TIES -# include "../simde/simde/x86/sse.h" +# include "simde/x86/sse.h" +# undef SIMDE_ENABLE_NATIVE_ALIASES #endif diff --git a/include/simd-compat/immintrin.h b/include/simd-compat/immintrin.h index 20fe5e44..3490cb80 100644 --- a/include/simd-compat/immintrin.h +++ b/include/simd-compat/immintrin.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,13 +20,8 @@ #if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else -# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES -# define SIMDE_FAST_CONVERSION_RANGE -# define SIMDE_FAST_MATH -# define SIMDE_FAST_NANS -# define SIMDE_FAST_ROUND_MODE -# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/sse.h" # include "../simde/simde/x86/sse2.h" +# undef SIMDE_ENABLE_NATIVE_ALIASES #endif diff --git a/include/simd-compat/mmintrin.h b/include/simd-compat/mmintrin.h index 92d9b458..3ca24af5 100644 --- a/include/simd-compat/mmintrin.h +++ b/include/simd-compat/mmintrin.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -22,12 +22,7 @@ #elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) # include #else -# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES -# define SIMDE_FAST_CONVERSION_RANGE -# define SIMDE_FAST_MATH -# define SIMDE_FAST_NANS -# define SIMDE_FAST_ROUND_MODE -# define SIMDE_FAST_ROUND_TIES # include "../simde/simde/x86/mmx.h" +# undef SIMDE_ENABLE_NATIVE_ALIASES #endif diff --git a/include/simd-compat/pmmintrin.h b/include/simd-compat/pmmintrin.h index d16f1bf4..8ba6b36d 100644 --- a/include/simd-compat/pmmintrin.h +++ b/include/simd-compat/pmmintrin.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -32,7 +32,7 @@ // assume SSE3 only on macOS # ifndef ARCH_MAC -# include "../simde/simde/x86/sse3.h" +# include "simde/x86/sse3.h" # endif # ifdef _WIN32_WAS_DEFINED @@ -40,6 +40,9 @@ # undef _WIN32_WAS_DEFINED # endif +# undef SIMDE_X86_SSE2_NATIVE +# undef SIMDE_X86_SSE3_ENABLE_NATIVE_ALIASES + #elif defined(__EMSCRIPTEN__) && !defined(CARDINAL_NOSIMD) # include_next @@ -67,14 +70,9 @@ __m64 _mm_set1_pi16(short w) */ #else -# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES -# define SIMDE_FAST_CONVERSION_RANGE -# define SIMDE_FAST_MATH -# define SIMDE_FAST_NANS -# define SIMDE_FAST_ROUND_MODE -# define SIMDE_FAST_ROUND_TIES -# include "../simde/simde/x86/sse.h" -# include "../simde/simde/x86/sse2.h" -# include "../simde/simde/x86/sse3.h" +# include "simde/x86/sse.h" +# include "simde/x86/sse2.h" +# include "simde/x86/sse3.h" +# undef SIMDE_ENABLE_NATIVE_ALIASES #endif diff --git a/include/simd-compat/xmmintrin.h b/include/simd-compat/xmmintrin.h index 9a860e58..35008937 100644 --- a/include/simd-compat/xmmintrin.h +++ b/include/simd-compat/xmmintrin.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,12 +20,7 @@ #if (defined(__i386__) || defined(__x86_64__) || defined(__EMSCRIPTEN__)) && !defined(CARDINAL_NOSIMD) # include_next #else -# define SIMDE_ACCURACY_PREFERENCE 0 # define SIMDE_ENABLE_NATIVE_ALIASES -# define SIMDE_FAST_CONVERSION_RANGE -# define SIMDE_FAST_MATH -# define SIMDE_FAST_NANS -# define SIMDE_FAST_ROUND_MODE -# define SIMDE_FAST_ROUND_TIES -# include "../simde/simde/x86/avx.h" +# include "simde/x86/avx.h" +# undef SIMDE_ENABLE_NATIVE_ALIASES #endif diff --git a/include/simde b/include/simde deleted file mode 160000 index dd0b662f..00000000 --- a/include/simde +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd0b662fd8cf4b1617dbbb4d08aa053e512b08e4 diff --git a/plugins/Makefile b/plugins/Makefile index 6d7cf819..76df0ad9 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -643,7 +643,7 @@ CATROMODULO_CUSTOM = LowFrequencyOscillator NumDisplayWidget PLUGIN_FILES += $(filter-out cf/src/plugin.cpp,$(wildcard cf/src/*.cpp)) # modules/types which are present in other plugins -CF_CUSTOM = $(DRWAV) +CF_CUSTOM = $(DRWAV) ledTrigger # -------------------------------------------------------------- # dBiz diff --git a/plugins/cf b/plugins/cf index b6c4a66f..8aca80cb 160000 --- a/plugins/cf +++ b/plugins/cf @@ -1 +1 @@ -Subproject commit b6c4a66ffc153d78c7efa00fa886657eb182b15d +Subproject commit 8aca80cbaa30787e0aed1edb886767fa756b9846 diff --git a/plugins/mscHack b/plugins/mscHack index 80883512..e5c60480 160000 --- a/plugins/mscHack +++ b/plugins/mscHack @@ -1 +1 @@ -Subproject commit 80883512cc397c173e40e3bc014640b838ab343a +Subproject commit e5c6048071b9e1fc34b4a97072f1966b88235455 diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 80874acb..16c04d1d 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -393,6 +393,8 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB settings::browserZoom = -1.f; settings::invertZoom = false; settings::squeezeModules = true; + settings::darkMode = true; + settings::uiTheme = "dark"; // runtime behaviour settings::devMode = true; @@ -635,12 +637,20 @@ void Initializer::loadSettings(const bool isRealInstance) settings::pixelRatio = 0.0; settings::sampleRate = 0; settings::threadCount = 1; - settings::frameSwapInterval = 1; settings::autosaveInterval = 0; settings::skipLoadOnLaunch = true; settings::autoCheckUpdates = false; settings::showTipsOnLaunch = false; settings::tipIndex = -1; + + if (settings::uiTheme != "dark" && settings::uiTheme != "light") + { + settings::uiTheme = "dark"; + rack::ui::refreshTheme(); + } + + // reload dark/light mode as necessary + switchDarkMode(settings::uiTheme == "dark"); } // -------------------------------------------------------------------------------------------------------------------- diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 0d1d28e6..6fa736ff 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -57,6 +57,8 @@ extern char* patchStorageSlug; std::string homeDir(); +void switchDarkMode(bool darkMode); + } // namespace rack // ----------------------------------------------------------------------------------------------------------- diff --git a/src/Makefile b/src/Makefile index 9e7cf1b3..3c45e8f5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -62,6 +62,7 @@ IGNORED_FILES += Rack/src/gamepad.cpp IGNORED_FILES += Rack/src/keyboard.cpp IGNORED_FILES += Rack/src/library.cpp IGNORED_FILES += Rack/src/midi.cpp +IGNORED_FILES += Rack/src/midiloopback.cpp IGNORED_FILES += Rack/src/network.cpp IGNORED_FILES += Rack/src/plugin.cpp IGNORED_FILES += Rack/src/rtaudio.cpp @@ -79,6 +80,7 @@ IGNORED_FILES += Rack/src/widget/OpenGlWidget.cpp IGNORED_FILES += Rack/src/window/Window.cpp IGNORED_FILES += $(wildcard Rack/src/core/*.cpp) +RACK_FILES += Rack/dep/tinyexpr/tinyexpr.c RACK_FILES += $(wildcard Rack/src/*.c) RACK_FILES += $(wildcard Rack/src/*/*.c) RACK_FILES += $(filter-out $(IGNORED_FILES),$(wildcard Rack/src/*.cpp)) @@ -190,6 +192,8 @@ $(BUILD_DIR)/%.cpp.o: %.cpp $(BUILD_DIR)/emscripten/WasmUtils.cpp.o: BUILD_CXX_FLAGS += -fno-exceptions +$(BUILD_DIR)/Rack/dep/tinyexpr/tinyexpr.c.o: BUILD_C_FLAGS += -DTE_POW_FROM_RIGHT -DTE_NAT_LOG + # -------------------------------------------------------------- -include $(RACK_OBJS:%.o=%.d) diff --git a/src/Rack b/src/Rack index 5551617a..f1576e2b 160000 --- a/src/Rack +++ b/src/Rack @@ -1 +1 @@ -Subproject commit 5551617afff182925940908eaf73a7d7361303cc +Subproject commit f1576e2bb870da297789300117accb9d5fe44c5e diff --git a/src/custom/RemoteWindow.cpp b/src/custom/RemoteWindow.cpp index 29a3cff4..e0e9fab9 100644 --- a/src/custom/RemoteWindow.cpp +++ b/src/custom/RemoteWindow.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's Window.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -108,8 +108,8 @@ void Window::step() { } -void Window::activateContext() { -} +// void Window::activateContext() { +// } void Window::screenshot(const std::string&) { diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 5efde7c1..6c5ba805 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -64,6 +64,10 @@ void updateForcingBlackSilverScrewMode(std::string slug) { namespace settings { bool darkMode = true; int rateLimit = 0; +extern std::string uiTheme; +} +namespace ui { +void refreshTheme(); } } @@ -1468,13 +1472,17 @@ void nsvgDeleteCardinal(NSVGimage* const handle) nsvgDelete(handle); } +namespace rack { + void switchDarkMode(const bool darkMode) { #ifndef HEADLESS - if (rack::settings::darkMode == darkMode) + if (settings::darkMode == darkMode) return; - rack::settings::darkMode = darkMode; + settings::darkMode = darkMode; + settings::uiTheme = darkMode ? "dark" : "light"; + ui::refreshTheme(); for (ExtendedNSVGimage& ext : loadedDarkSVGs) { @@ -1494,7 +1502,6 @@ void switchDarkMode(const bool darkMode) #endif } -namespace rack { namespace asset { void destroy() { diff --git a/src/override/Engine.cpp b/src/override/Engine.cpp index 2a9deebd..de598426 100644 --- a/src/override/Engine.cpp +++ b/src/override/Engine.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's engine/Engine.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -83,8 +83,8 @@ struct Engine::Internal { float sampleRate = 0.f; float sampleTime = 0.f; - int64_t block = 0; int64_t frame = 0; + int64_t block = 0; int64_t blockFrame = 0; double blockTime = 0.0; int blockFrames = 0; @@ -653,18 +653,13 @@ void Engine::yieldWorkers() { } -int64_t Engine::getBlock() { - return internal->block; -} - - int64_t Engine::getFrame() { return internal->frame; } -void Engine::setFrame(int64_t frame) { - internal->frame = frame; +int64_t Engine::getBlock() { + return internal->block; } @@ -758,8 +753,6 @@ void Engine::addModule(Module* module) { DISTRHO_SAFE_ASSERT_RETURN(it == internal->modules.end(),); auto tit = std::find(internal->terminalModules.begin(), internal->terminalModules.end(), module); DISTRHO_SAFE_ASSERT_RETURN(tit == internal->terminalModules.end(),); - // Reinitialize random module since it uses thread-local RNG state - random::init(); // Set ID if unset or collides with an existing ID while (module->id < 0 || internal->modulesCache.find(module->id) != internal->modulesCache.end()) { // Randomly generate ID @@ -1005,8 +998,6 @@ void Engine::addCable(Cable* cable) { if (cable2->outputModule == cable->outputModule && cable2->outputId == cable->outputId) outputWasConnected = true; } - // Reinitialize random module since it uses thread-local RNG state - random::init(); // Set ID if unset or collides with an existing ID while (cable->id < 0 || internal->cablesCache.find(cable->id) != internal->cablesCache.end()) { // Randomly generate ID @@ -1106,19 +1097,19 @@ void Engine::setParamValue(Module* module, int paramId, float value) { if (internal->remoteDetails != nullptr) { sendParamChangeToRemote(internal->remoteDetails, module->id, paramId, value); } - module->params[paramId].value = value; + module->params[paramId].setValue(value); } float Engine::getParamValue(Module* module, int paramId) { - return module->params[paramId].value; + return module->params[paramId].getValue(); } void Engine::setParamSmoothValue(Module* module, int paramId, float value) { // If another param is being smoothed, jump value if (internal->smoothModule && !(internal->smoothModule == module && internal->smoothParamId == paramId)) { - internal->smoothModule->params[internal->smoothParamId].value = internal->smoothValue; + internal->smoothModule->params[internal->smoothParamId].setValue(internal->smoothValue); } internal->smoothParamId = paramId; internal->smoothValue = value; @@ -1130,7 +1121,7 @@ void Engine::setParamSmoothValue(Module* module, int paramId, float value) { float Engine::getParamSmoothValue(Module* module, int paramId) { if (internal->smoothModule == module && internal->smoothParamId == paramId) return internal->smoothValue; - return module->params[paramId].value; + return module->params[paramId].getValue(); } diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 659c7a44..62bfbacf 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's app/MenuBar.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -60,8 +60,6 @@ # include #endif -void switchDarkMode(bool darkMode); - namespace rack { namespace asset { std::string patchesPath(); @@ -739,7 +737,7 @@ struct HelpButton : MenuButton { patchUtils::openBrowser("https://vcvrack.com/manual"); })); - menu->addChild(createMenuItem("Cardinal Project page", "", [=]() { + menu->addChild(createMenuItem("Cardinal project page", "", [=]() { patchUtils::openBrowser("https://github.com/DISTRHO/Cardinal/"); })); @@ -751,7 +749,6 @@ struct HelpButton : MenuButton { menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("Cardinal " + APP_EDITION + " " + CARDINAL_VERSION)); menu->addChild(createMenuLabel("Rack " + APP_VERSION + " Compatible")); } }; @@ -762,23 +759,25 @@ struct HelpButton : MenuButton { //////////////////// -struct MeterLabel : ui::Label { - int frameIndex = 0; +struct InfoLabel : ui::Label { + int frameCount = 0; double frameDurationTotal = 0.0; - double frameDurationAvg = 0.0; - double uiLastTime = 0.0; - double uiLastThreadTime = 0.0; - double uiFrac = 0.0; + double frameDurationAvg = NAN; + // double uiLastTime = 0.0; + // double uiLastThreadTime = 0.0; + // double uiFrac = 0.0; void step() override { // Compute frame rate double frameDuration = APP->window->getLastFrameDuration(); - frameDurationTotal += frameDuration; - frameIndex++; + if (std::isfinite(frameDuration)) { + frameDurationTotal += frameDuration; + frameCount++; + } if (frameDurationTotal >= 1.0) { - frameDurationAvg = frameDurationTotal / frameIndex; + frameDurationAvg = frameDurationTotal / frameCount; frameDurationTotal = 0.0; - frameIndex = 0; + frameCount = 0; } // Compute UI thread CPU @@ -791,13 +790,21 @@ struct MeterLabel : ui::Label { // uiLastTime = time; // } + text = ""; + + if (box.size.x >= 400) { + double fps = std::isfinite(frameDurationAvg) ? 1.0 / frameDurationAvg : 0.0; #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS - double meterAverage = APP->engine->getMeterAverage(); - double meterMax = APP->engine->getMeterMax(); - text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100); + double meterAverage = APP->engine->getMeterAverage(); + double meterMax = APP->engine->getMeterMax(); + text = string::f("%.1f fps %.1f%% avg %.1f%% max", fps, meterAverage * 100, meterMax * 100); #else - text = string::f("%.1f fps", 1.0 / frameDurationAvg); + text = string::f("%.1f fps", fps); #endif + text += " "; + } + + text += "Cardinal " + APP_EDITION + " " + CARDINAL_VERSION; Label::step(); } @@ -805,7 +812,7 @@ struct MeterLabel : ui::Label { struct MenuBar : widget::OpaqueWidget { - MeterLabel* meterLabel; + InfoLabel* infoLabel; MenuBar(const bool isStandalone) : widget::OpaqueWidget() @@ -840,16 +847,10 @@ struct MenuBar : widget::OpaqueWidget { helpButton->text = "Help"; layout->addChild(helpButton); - // ui::Label* titleLabel = new ui::Label; - // titleLabel->color.a = 0.5; - // layout->addChild(titleLabel); - - meterLabel = new MeterLabel; - meterLabel->box.pos.y = margin; - meterLabel->box.size.x = 300; - meterLabel->alignment = ui::Label::RIGHT_ALIGNMENT; - meterLabel->color.a = 0.5; - addChild(meterLabel); + infoLabel = new InfoLabel; + infoLabel->box.size.x = 600; + infoLabel->alignment = ui::Label::RIGHT_ALIGNMENT; + layout->addChild(infoLabel); } void draw(const DrawArgs& args) override { @@ -860,8 +861,10 @@ struct MenuBar : widget::OpaqueWidget { } void step() override { - meterLabel->box.pos.x = box.size.x - meterLabel->box.size.x - 5; Widget::step(); + infoLabel->box.size.x = box.size.x - infoLabel->box.pos.x - 5; + // Setting 50% alpha prevents Label from using the default UI theme color, so set the color manually here. + infoLabel->color = color::alpha(bndGetTheme()->regularTheme.textColor, 0.5); } }; diff --git a/src/override/Model.cpp b/src/override/Model.cpp index a2541be1..454292bb 100644 --- a/src/override/Model.cpp +++ b/src/override/Model.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's plugin/Model.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -85,9 +85,12 @@ void Model::fromJson(json_t* rootJ) { // hidden json_t* hiddenJ = json_object_get(rootJ, "hidden"); - // Use `disabled` as an alias which was deprecated in Rack 2.0 + // "disabled" was a deprecated alias in Rack <2 if (!hiddenJ) hiddenJ = json_object_get(rootJ, "disabled"); + // "deprecated" was a deprecated alias in Rack <2.2.4 + if (!hiddenJ) + hiddenJ = json_object_get(rootJ, "deprecated"); if (hiddenJ) { // Don't un-hide Model if already hidden by C++ if (json_boolean_value(hiddenJ)) @@ -185,6 +188,13 @@ void Model::appendContextMenu(ui::Menu* menu, bool inBrowser) { })); } + // author email + if (plugin->authorEmail != "") { + menu->addChild(createMenuItem("Author email", "Copy to clipboard", [=]() { + glfwSetClipboardString(APP->window->win, plugin->authorEmail.c_str()); + })); + } + // Favorite std::string favoriteRightText = inBrowser ? (RACK_MOD_CTRL_NAME "+click") : ""; if (isFavorite()) diff --git a/src/override/ModuleWidget.cpp b/src/override/ModuleWidget.cpp index 002c510f..36423e3f 100644 --- a/src/override/ModuleWidget.cpp +++ b/src/override/ModuleWidget.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's ModuleWidget.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -30,8 +30,6 @@ #include #include -#include - #include #include #include @@ -420,6 +418,7 @@ void ModuleWidget::onButton(const ButtonEvent& e) { // If module positions are locked, don't consume left-click if (settings::lockModules) { + e.consume(NULL); return; } @@ -449,6 +448,7 @@ void ModuleWidget::onButton(const ButtonEvent& e) { // If module positions are locked, don't consume left-click if (settings::lockModules) { + e.consume(NULL); return; } @@ -700,7 +700,7 @@ void ModuleWidget::save(std::string filename) { FILE* file = std::fopen(filename.c_str(), "w"); if (!file) { std::string message = string::f("Could not save preset to file %s", filename.c_str()); - osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, message.c_str()); + async_dialog_message(message.c_str()); return; } DEFER({std::fclose(file);}); @@ -718,10 +718,12 @@ void ModuleWidget::saveTemplate() { void ModuleWidget::saveTemplateDialog() { if (hasTemplate()) { std::string message = string::f("Overwrite default preset for %s?", model->getFullName().c_str()); - if (!osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, message.c_str())) - return; + WeakPtr weakThis = this; + async_dialog_message(message.c_str(), [=]{ + if (weakThis) + weakThis->saveTemplate(); + }); } - saveTemplate(); } bool ModuleWidget::hasTemplate() { @@ -738,9 +740,11 @@ void ModuleWidget::clearTemplate() { void ModuleWidget::clearTemplateDialog() { std::string message = string::f("Delete default preset for %s?", model->getFullName().c_str()); - if (!osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, message.c_str())) - return; - clearTemplate(); + WeakPtr weakThis = this; + async_dialog_message(message.c_str(), [=]{ + if (weakThis) + weakThis->clearTemplate(); + }); } void ModuleWidget::saveDialog() { @@ -978,12 +982,16 @@ static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget std::regex r("^\\d+_"); name = std::regex_replace(name, r, ""); - if (false) { + if (system::isDirectory(path)) { + hasPresets = true; + + menu->addChild(createSubmenuItem(name, "", [=](ui::Menu* menu) { + if (!moduleWidget) + return; + appendPresetItems(menu, moduleWidget, path); + })); } else if (system::getExtension(path) == ".vcvm" && name != "template") { - if (!hasPresets) - menu->addChild(new ui::MenuSeparator); - hasPresets = true; menu->addChild(createMenuItem(name, "", [=]() { @@ -999,6 +1007,9 @@ static void appendPresetItems(ui::Menu* menu, WeakPtr moduleWidget } } } + if (!hasPresets) { + menu->addChild(createMenuLabel("(None)")); + } }; @@ -1037,7 +1048,6 @@ void ModuleWidget::createContextMenu() { weakThis->loadDialog(); })); - /* TODO requires setting up user dir menu->addChild(createMenuItem("Save as", "", [=]() { if (!weakThis) return; @@ -1060,13 +1070,10 @@ void ModuleWidget::createContextMenu() { menu->addChild(new ui::MenuSeparator); menu->addChild(createMenuLabel("User presets")); appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); - */ // Scan `/presets/` for presets. - /* TODO enable only after setting up user dir menu->addChild(new ui::MenuSeparator); menu->addChild(createMenuLabel("Factory presets")); - */ appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); })); diff --git a/src/override/OpenGlWidget.cpp b/src/override/OpenGlWidget.cpp index a8aad193..da448d0f 100644 --- a/src/override/OpenGlWidget.cpp +++ b/src/override/OpenGlWidget.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's OpenGlWidget.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 184507f1..fcb23178 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's app/Scene.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -343,6 +343,8 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { #ifdef DISTRHO_OS_WASM if (e.key == GLFW_KEY_F11 && (e.mods & RACK_MOD_MASK) == 0) { APP->window->setFullScreen(!APP->window->isFullScreen()); + // The MenuBar will be hidden when the mouse moves over the RackScrollWidget. + // menuBar->hide(); e.consume(this); } #endif diff --git a/src/override/Window.cpp b/src/override/Window.cpp index af99839a..66b62d34 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's window/Window.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -172,13 +172,12 @@ struct Window::Internal { int currentRateLimit = 0; int frame = 0; - int frameSwapInterval = 1; #ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS int generateScreenshotStep = kScreenshotStepNone; #endif double monitorRefreshRate = 60.0; - double frameTime = 0.0; - double lastFrameDuration = 0.0; + double frameTime = NAN; + double lastFrameDuration = NAN; std::map> fontCache; std::map> imageCache; @@ -610,11 +609,12 @@ void Window::step() { return; double frameTime = system::getTime(); - double lastFrameTime = internal->frameTime; + if (std::isfinite(internal->frameTime)) { + internal->lastFrameDuration = frameTime - internal->frameTime; + } internal->frameTime = frameTime; - internal->lastFrameDuration = frameTime - lastFrameTime; internal->fbCount = 0; - // DEBUG("%.2lf Hz", 1.0 / internal->lastFrameDuration); + // double t1 = 0.0, t2 = 0.0, t3 = 0.0, t4 = 0.0, t5 = 0.0; // Make event handlers and step() have a clean NanoVG context nvgReset(vg); @@ -659,28 +659,31 @@ void Window::step() { // Get framebuffer/window ratio int winWidth = internal->tlw->getWidth(); int winHeight = internal->tlw->getHeight(); - int fbWidth = winWidth;// * newPixelRatio; - int fbHeight = winHeight;// * newPixelRatio; + int fbWidth = winWidth; + int fbHeight = winHeight; windowRatio = (float)fbWidth / winWidth; + // t1 = system::getTime(); if (APP->scene) { // DEBUG("%f %f %d %d", pixelRatio, windowRatio, fbWidth, winWidth); // Resize scene - APP->scene->box.size = math::Vec(fbWidth, fbHeight).div(newPixelRatio); + APP->scene->box.size = math::Vec(fbWidth, fbHeight).div(pixelRatio); // Step scene APP->scene->step(); + // t2 = system::getTime(); // Render scene { // Update and render - nvgScale(vg, newPixelRatio, newPixelRatio); + nvgScale(vg, pixelRatio, pixelRatio); // Draw scene widget::Widget::DrawArgs args; args.vg = vg; args.clipBox = APP->scene->box.zeroPos(); APP->scene->draw(args); + // t3 = system::getTime(); glViewport(0, 0, fbWidth, fbHeight); #ifdef CARDINAL_TRANSPARENT_SCREENSHOTS @@ -690,8 +693,18 @@ void Window::step() { #endif glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } + // t4 = system::getTime(); } + // t5 = system::getTime(); + // DEBUG("pre-step %6.1f step %6.1f draw %6.1f nvgEndFrame %6.1f glfwSwapBuffers %6.1f total %6.1f", + // (t1 - frameTime) * 1e3f, + // (t2 - t1) * 1e3f, + // (t3 - t2) * 1e3f, + // (t4 - t3) * 1e3f, + // (t5 - t4) * 1e3f, + // (t5 - frameTime) * 1e3f + // ); ++internal->frame; #ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS @@ -739,15 +752,11 @@ void Window::step() { } -void Window::activateContext() { +void Window::screenshot(const std::string& screenshotPath) { } -void Window::screenshot(const std::string&) { -} - - -void Window::screenshotModules(const std::string&, float) { +void Window::screenshotModules(const std::string& screenshotsDir, float zoom) { } @@ -793,9 +802,9 @@ int Window::getMods() { } -void Window::setFullScreen(const bool fullscreen) { +void Window::setFullScreen(bool fullScreen) { #ifdef DISTRHO_OS_WASM - if (fullscreen) + if (fullScreen) emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false); else emscripten_exit_fullscreen(); @@ -816,6 +825,7 @@ bool Window::isFullScreen() { #endif } + double Window::getMonitorRefreshRate() { return internal->monitorRefreshRate; } @@ -832,8 +842,8 @@ double Window::getLastFrameDuration() { double Window::getFrameDurationRemaining() { - double frameDurationDesired = internal->frameSwapInterval / internal->monitorRefreshRate; - return frameDurationDesired - (system::getTime() - internal->frameTime); + double frameDuration = 1.f / internal->monitorRefreshRate; + return frameDuration - (system::getTime() - internal->frameTime); } diff --git a/src/override/common.cpp b/src/override/common.cpp index b61839f0..32b9962b 100644 --- a/src/override/common.cpp +++ b/src/override/common.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's common.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -63,13 +63,16 @@ const std::string APP_NAME = "Cardinal"; const std::string APP_EDITION = getPluginFormatName(); const std::string APP_EDITION_NAME = "Audio Plugin"; const std::string APP_VERSION_MAJOR = "2"; -const std::string APP_VERSION = "2.1.2"; +const std::string APP_VERSION = "2.3.0"; #if defined ARCH_WIN const std::string APP_OS = "win"; + const std::string APP_OS_NAME = "Windows"; #elif defined ARCH_MAC const std::string APP_OS = "mac"; + const std::string APP_OS_NAME = "macOS"; #elif defined ARCH_LIN const std::string APP_OS = "lin"; + const std::string APP_OS_NAME = "Linux"; #else #error ARCH_LIN undefined #endif diff --git a/src/override/context.cpp b/src/override/context.cpp index 3f08e741..f1ce13b6 100644 --- a/src/override/context.cpp +++ b/src/override/context.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's context.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -31,7 +31,6 @@ #include #include #include -#include #ifdef NDEBUG # undef DEBUG diff --git a/src/override/diffs/Engine.cpp.diff b/src/override/diffs/Engine.cpp.diff index b3609d47..7470727e 100644 --- a/src/override/diffs/Engine.cpp.diff +++ b/src/override/diffs/Engine.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/engine/Engine.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ Engine.cpp 2022-12-29 16:15:36.061769776 +0000 +--- ../Rack/src/engine/Engine.cpp 2023-05-20 17:03:33.006081772 +0200 ++++ Engine.cpp 2023-05-20 19:35:00.711346791 +0200 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's engine/Engine.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -31,10 +31,14 @@ #include #include #include -@@ -6,183 +33,39 @@ +@@ -5,192 +32,47 @@ + #include #include #include - #include +-#if defined ARCH_X64 +- #include +-#endif ++#include +#include #include @@ -48,14 +52,12 @@ #include +#include -+#ifdef NDEBUG -+# undef DEBUG -+#endif - +- -namespace rack { -namespace engine { - - +-#if defined ARCH_X64 -static void initMXCSR() { - // Set CPU to flush-to-zero (FTZ) and denormals-are-zero (DAZ) mode - // https://software.intel.com/en-us/node/682949 @@ -64,8 +66,13 @@ - // Reset other flags - _MM_SET_ROUNDING_MODE(_MM_ROUND_NEAREST); -} -- -- ++#ifdef NDEBUG ++# undef DEBUG + #endif + ++#include "../CardinalRemote.hpp" ++#include "DistrhoUtils.hpp" + -/** Barrier based on mutexes. -Not finished or tested, do not use. -*/ @@ -98,25 +105,21 @@ - }); - } -}; -+#include "../CardinalRemote.hpp" -+#include "DistrhoUtils.hpp" - - +- +- -/** 2-phase barrier based on spin-locking. -*/ -struct SpinBarrier { - std::atomic count{0}; - std::atomic step{0}; - int threads = 0; -+// known terminal modules -+extern std::vector hostTerminalModels; - +- - /** Must be called when no threads are calling wait(). - */ - void setThreads(int threads) { - this->threads = threads; - } - +- - void wait() { - uint8_t s = step; - if (count.fetch_add(1, std::memory_order_acquire) + 1 >= threads) { @@ -131,12 +134,16 @@ - while (true) { - if (step.load(std::memory_order_relaxed) != s) - return; +-#if defined ARCH_X64 - __builtin_ia32_pause(); +-#endif - } - } -}; -- -- + ++// known terminal modules ++extern std::vector hostTerminalModels; + -/** Barrier that spin-locks until yield() is called, and then all threads switch to a mutex. -yield() should be called if it is likely that all threads will block for a while and continuing to spin-lock is unnecessary. -Saves CPU power after yield is called. @@ -173,12 +180,14 @@ - } - return; - } -- + - // Spin until the last thread begins waiting - while (!yielded.load(std::memory_order_relaxed)) { - if (step.load(std::memory_order_relaxed) != s) - return; +-#if defined ARCH_X64 - __builtin_ia32_pause(); +-#endif - } - - // Wait on mutex CV @@ -195,7 +204,9 @@ - int id; - std::thread thread; - bool running = false; -- ++namespace rack { ++namespace engine { + - void start() { - assert(!running); - running = true; @@ -203,7 +214,7 @@ - run(); - }); - } -- + - void requestStop() { - running = false; - } @@ -215,8 +226,11 @@ - - void run(); -}; -+namespace rack { -+namespace engine { ++static constexpr const int PORT_DIVIDER = 7; ++// Arbitrary prime number so it doesn't over- or under-estimate time of buffered processors. ++static constexpr const int METER_DIVIDER = 37; ++static constexpr const int METER_BUFFER_LEN = 32; ++static constexpr const float METER_TIME = 1.f; struct Engine::Internal { @@ -228,7 +242,7 @@ // moduleId std::map modulesCache; -@@ -198,7 +81,9 @@ +@@ -206,7 +88,9 @@ int64_t blockFrame = 0; double blockTime = 0.0; int blockFrames = 0; @@ -238,7 +252,7 @@ // Meter int meterCount = 0; double meterTotal = 0.0; -@@ -206,33 +91,21 @@ +@@ -214,33 +98,32 @@ double meterLastTime = -INFINITY; double meterLastAverage = 0.0; double meterLastMax = 0.0; @@ -260,7 +274,9 @@ - /** Mutex that guards stepBlock() so it's not called simultaneously. - */ - std::mutex blockMutex; -- ++}; ++ + - int threadCount = 0; - std::vector workers; - HybridBarrier engineBarrier; @@ -273,10 +289,18 @@ - std::thread fallbackThread; - std::mutex fallbackMutex; - std::condition_variable fallbackCv; ++struct Module::Internal { ++ bool bypassed = false; ++ ++ int meterSamples = 0; ++ float meterDurationTotal = 0.f; ++ ++ float meterBuffer[METER_BUFFER_LEN] = {}; ++ int meterIndex = 0; }; -@@ -260,76 +133,11 @@ +@@ -268,89 +151,134 @@ } @@ -284,28 +308,66 @@ - Engine::Internal* internal = that->internal; - if (threadCount == internal->threadCount) - return; -- ++static void Cable_step(Cable* that) { ++ Output* output = &that->outputModule->outputs[that->outputId]; ++ Input* input = &that->inputModule->inputs[that->inputId]; ++ // Match number of polyphonic channels to output port ++ const int channels = output->channels; ++ // Copy all voltages from output to input ++ for (int c = 0; c < channels; c++) { ++ if (!std::isfinite(output->voltages[c])) ++ __builtin_unreachable(); ++ input->voltages[c] = output->voltages[c]; ++ } ++ // Set higher channel voltages to 0 ++ for (int c = channels; c < input->channels; c++) { ++ input->voltages[c] = 0.f; ++ } ++ input->channels = channels; ++} + - if (internal->threadCount > 0) { - // Stop engine workers - for (EngineWorker& worker : internal->workers) { - worker.requestStop(); - } - internal->engineBarrier.wait(); -- + - // Join and destroy engine workers - for (EngineWorker& worker : internal->workers) { - worker.join(); - } - internal->workers.resize(0); -- } -- ++#ifndef HEADLESS ++static void Port_step(Port* that, float deltaTime) { ++ // Set plug lights ++ if (that->channels == 0) { ++ that->plugLights[0].setBrightness(0.f); ++ that->plugLights[1].setBrightness(0.f); ++ that->plugLights[2].setBrightness(0.f); ++ } ++ else if (that->channels == 1) { ++ float v = that->getVoltage() / 10.f; ++ that->plugLights[0].setSmoothBrightness(-v, deltaTime); ++ that->plugLights[1].setSmoothBrightness(v, deltaTime); ++ that->plugLights[2].setBrightness(0.f); + } ++ else { ++ float v = that->getVoltageRMS() / 10.f; ++ that->plugLights[0].setBrightness(0.f); ++ that->plugLights[1].setBrightness(0.f); ++ that->plugLights[2].setSmoothBrightness(v, deltaTime); ++ } ++} ++#endif + - // Configure engine - internal->threadCount = threadCount; - - // Set barrier counts - internal->engineBarrier.setThreads(threadCount); - internal->workerBarrier.setThreads(threadCount); -- + - if (threadCount > 0) { - // Create and start engine workers - internal->workers.resize(threadCount - 1); @@ -314,17 +376,41 @@ - worker.id = id; - worker.engine = that; - worker.start(); -- } -- } --} -- -- ++static void TerminalModule__doProcess(TerminalModule* const terminalModule, const Module::ProcessArgs& args, bool input) { ++ // Step module ++ if (input) { ++ terminalModule->processTerminalInput(args); ++ for (Output& output : terminalModule->outputs) { ++ for (Cable* cable : output.cables) ++ Cable_step(cable); ++ } ++ } else { ++ terminalModule->processTerminalOutput(args); ++ } ++ ++#ifndef HEADLESS ++ // Iterate ports to step plug lights ++ if (args.frame % PORT_DIVIDER == 0) { ++ float portTime = args.sampleTime * PORT_DIVIDER; ++ for (Input& input : terminalModule->inputs) { ++ Port_step(&input, portTime); ++ } ++ for (Output& output : terminalModule->outputs) { ++ Port_step(&output, portTime); + } + } ++#endif + } + + -static void Engine_stepWorker(Engine* that, int threadId) { - Engine::Internal* internal = that->internal; - - // int threadCount = internal->threadCount; - int modulesLen = internal->modules.size(); -- ++static void Module__doProcess(Module* const module, const Module::ProcessArgs& args) { ++ Module::Internal* const internal = module->internal; + - // Build ProcessArgs - Module::ProcessArgs processArgs; - processArgs.sampleRate = internal->sampleRate; @@ -341,74 +427,83 @@ - - Module* module = internal->modules[i]; - module->doProcess(processArgs); -- } ++#ifndef HEADLESS ++ // This global setting can change while the function is running, so use a local variable. ++ bool meterEnabled = settings::cpuMeter && (args.frame % METER_DIVIDER == 0); ++ ++ // Start CPU timer ++ double startTime; ++ if (meterEnabled) { ++ startTime = system::getTime(); + } -} - -- - static void Cable_step(Cable* that) { - Output* output = &that->outputModule->outputs[that->outputId]; - Input* input = &that->inputModule->inputs[that->inputId]; - // Match number of polyphonic channels to output port -- int channels = output->channels; -+ const int channels = output->channels; - // Copy all voltages from output to input - for (int c = 0; c < channels; c++) { - float v = output->voltages[c]; -@@ -346,6 +154,53 @@ - } - ++#endif -+static void Port_step(Port* that, float deltaTime) { -+ // Set plug lights -+ if (that->channels == 0) { -+ that->plugLights[0].setBrightness(0.f); -+ that->plugLights[1].setBrightness(0.f); -+ that->plugLights[2].setBrightness(0.f); -+ } -+ else if (that->channels == 1) { -+ float v = that->getVoltage() / 10.f; -+ that->plugLights[0].setSmoothBrightness(-v, deltaTime); -+ that->plugLights[1].setSmoothBrightness(v, deltaTime); -+ that->plugLights[2].setBrightness(0.f); -+ } -+ else { -+ float v = that->getVoltageRMS() / 10.f; -+ that->plugLights[0].setBrightness(0.f); -+ that->plugLights[1].setBrightness(0.f); -+ that->plugLights[2].setSmoothBrightness(v, deltaTime); -+ } -+} +-static void Cable_step(Cable* that) { +- Output* output = &that->outputModule->outputs[that->outputId]; +- Input* input = &that->inputModule->inputs[that->inputId]; +- // Match number of polyphonic channels to output port +- int channels = output->channels; +- // Copy all voltages from output to input +- for (int c = 0; c < channels; c++) { +- float v = output->voltages[c]; +- // Set 0V if infinite or NaN +- if (!std::isfinite(v)) +- v = 0.f; +- input->voltages[c] = v; ++ // Step module ++ if (!internal->bypassed) ++ module->process(args); ++ else ++ module->processBypass(args); + ++#ifndef HEADLESS ++ // Stop CPU timer ++ if (meterEnabled) { ++ double endTime = system::getTime(); ++ // Subtract call time of getTime() itself, since we only want to measure process() time. ++ double endTime2 = system::getTime(); ++ float duration = (endTime - startTime) - (endTime2 - endTime); + -+static void TerminalModule__doProcess(TerminalModule* terminalModule, const Module::ProcessArgs& args, bool input) { -+ // Step module -+ if (input) { -+ terminalModule->processTerminalInput(args); -+ for (Output& output : terminalModule->outputs) { -+ for (Cable* cable : output.cables) -+ Cable_step(cable); ++ internal->meterSamples++; ++ internal->meterDurationTotal += duration; ++ ++ // Seconds we've been measuring ++ float meterTime = internal->meterSamples * METER_DIVIDER * args.sampleTime; ++ ++ if (meterTime >= METER_TIME) { ++ // Push time to buffer ++ if (internal->meterSamples > 0) { ++ internal->meterIndex++; ++ internal->meterIndex %= METER_BUFFER_LEN; ++ internal->meterBuffer[internal->meterIndex] = internal->meterDurationTotal / internal->meterSamples; ++ } ++ // Reset total ++ internal->meterSamples = 0; ++ internal->meterDurationTotal = 0.f; + } -+ } else { -+ terminalModule->processTerminalOutput(args); -+ } + } +- // Set higher channel voltages to 0 +- for (int c = channels; c < input->channels; c++) { +- input->voltages[c] = 0.f; + + // Iterate ports to step plug lights -+ if (args.frame % 7 /* PORT_DIVIDER */ == 0) { -+ float portTime = args.sampleTime * 7 /* PORT_DIVIDER */; -+ for (Input& input : terminalModule->inputs) { ++ if (args.frame % PORT_DIVIDER == 0) { ++ float portTime = args.sampleTime * PORT_DIVIDER; ++ for (Input& input : module->inputs) { + Port_step(&input, portTime); + } -+ for (Output& output : terminalModule->outputs) { ++ for (Output& output : module->outputs) { + Port_step(&output, portTime); + } -+ } -+} -+ -+ - /** Steps a single frame - */ - static void Engine_stepFrame(Engine* that) { -@@ -358,10 +213,16 @@ + } +- input->channels = channels; ++#endif + } + + +@@ -366,10 +294,16 @@ float smoothValue = internal->smoothValue; Param* smoothParam = &smoothModule->params[smoothParamId]; float value = smoothParam->value; @@ -429,7 +524,7 @@ // Snap to actual smooth value if the value doesn't change enough (due to the granularity of floats) smoothParam->setValue(smoothValue); internal->smoothModule = NULL; -@@ -372,13 +233,8 @@ +@@ -380,13 +314,8 @@ } } @@ -444,7 +539,7 @@ if (module->leftExpander.messageFlipRequested) { std::swap(module->leftExpander.producerMessage, module->leftExpander.consumerMessage); module->leftExpander.messageFlipRequested = false; -@@ -389,13 +245,32 @@ +@@ -397,13 +326,32 @@ } } @@ -463,10 +558,11 @@ + for (TerminalModule* terminalModule : internal->terminalModules) { + TerminalModule__doProcess(terminalModule, processArgs, true); + } -+ + +- internal->frame++; + // Step each module and cables + for (Module* module : internal->modules) { -+ module->doProcess(processArgs); ++ Module__doProcess(module, processArgs); + for (Output& output : module->outputs) { + for (Cable* cable : output.cables) + Cable_step(cable); @@ -477,13 +573,12 @@ + for (TerminalModule* terminalModule : internal->terminalModules) { + TerminalModule__doProcess(terminalModule, processArgs, false); + } - -- internal->frame++; ++ + ++internal->frame; } -@@ -414,35 +289,119 @@ +@@ -422,35 +370,119 @@ } @@ -604,17 +699,17 @@ - Port_setDisconnected(port); + for (Input* input : disconnectedInputs) { + Port_setDisconnected(input); -+ } + } + for (Output* output : disconnectedOutputs) { + Port_setDisconnected(output); + DISTRHO_SAFE_ASSERT(output->cables.empty()); - } ++ } + // Order the modules according to their connections + Engine_orderModules(that); } -@@ -460,37 +419,23 @@ +@@ -468,37 +500,23 @@ Engine::Engine() { internal = new Internal; @@ -660,7 +755,7 @@ delete internal; } -@@ -519,18 +464,22 @@ +@@ -527,20 +545,22 @@ removeModule_NoLock(module); delete module; } @@ -681,12 +776,14 @@ - std::lock_guard stepLock(internal->blockMutex); SharedLock lock(internal->mutex); // Configure thread +-#if defined ARCH_X64 - uint32_t csr = _mm_getcsr(); - initMXCSR(); +-#endif random::init(); internal->blockFrame = internal->frame; -@@ -543,18 +492,14 @@ +@@ -553,18 +573,14 @@ Engine_updateExpander_NoLock(this, module, true); } @@ -706,14 +803,15 @@ // Stop timer double endTime = system::getTime(); double meter = (endTime - startTime) / (frames * internal->sampleTime); -@@ -572,47 +517,20 @@ +@@ -582,49 +598,20 @@ internal->meterTotal = 0.0; internal->meterMax = 0.0; } - +-#if defined ARCH_X64 - // Reset MXCSR back to original value - _mm_setcsr(csr); -+#endif + #endif } @@ -756,7 +854,7 @@ } -@@ -635,20 +553,13 @@ +@@ -647,20 +634,13 @@ for (Module* module : internal->modules) { module->onSampleRateChange(e); } @@ -780,7 +878,7 @@ } -@@ -658,7 +569,6 @@ +@@ -670,7 +650,6 @@ void Engine::yieldWorkers() { @@ -788,7 +886,7 @@ } -@@ -698,17 +608,25 @@ +@@ -705,17 +684,25 @@ double Engine::getMeterAverage() { @@ -815,7 +913,7 @@ } -@@ -718,8 +636,12 @@ +@@ -725,8 +712,12 @@ for (Module* m : internal->modules) { if (i >= len) break; @@ -830,7 +928,7 @@ } return i; } -@@ -728,27 +650,43 @@ +@@ -735,27 +726,43 @@ std::vector Engine::getModuleIds() { SharedLock lock(internal->mutex); std::vector moduleIds; @@ -878,7 +976,7 @@ internal->modulesCache[module->id] = module; // Dispatch AddEvent Module::AddEvent eAdd; -@@ -763,6 +701,9 @@ +@@ -770,6 +777,9 @@ if (paramHandle->moduleId == module->id) paramHandle->module = module; } @@ -888,7 +986,7 @@ } -@@ -772,11 +713,11 @@ +@@ -779,11 +789,11 @@ } @@ -905,7 +1003,7 @@ // Dispatch RemoveEvent Module::RemoveEvent eRemove; module->onRemove(eRemove); -@@ -785,18 +726,14 @@ +@@ -792,18 +802,14 @@ if (paramHandle->moduleId == module->id) paramHandle->module = NULL; } @@ -926,7 +1024,7 @@ } // Update expanders of other modules for (Module* m : internal->modules) { -@@ -809,14 +746,31 @@ +@@ -816,14 +822,31 @@ m->rightExpander.module = NULL; } } @@ -961,7 +1059,7 @@ } -@@ -824,7 +778,8 @@ +@@ -831,7 +854,8 @@ SharedLock lock(internal->mutex); // TODO Performance could be improved by searching modulesCache, but more testing would be needed to make sure it's always valid. auto it = std::find(internal->modules.begin(), internal->modules.end(), module); @@ -971,7 +1069,7 @@ } -@@ -844,7 +799,7 @@ +@@ -851,7 +875,7 @@ void Engine::resetModule(Module* module) { std::lock_guard lock(internal->mutex); @@ -980,7 +1078,7 @@ Module::ResetEvent eReset; module->onReset(eReset); -@@ -853,7 +808,7 @@ +@@ -860,7 +884,7 @@ void Engine::randomizeModule(Module* module) { std::lock_guard lock(internal->mutex); @@ -989,7 +1087,7 @@ Module::RandomizeEvent eRandomize; module->onRandomize(eRandomize); -@@ -861,7 +816,7 @@ +@@ -868,7 +892,7 @@ void Engine::bypassModule(Module* module, bool bypassed) { @@ -998,7 +1096,7 @@ if (module->isBypassed() == bypassed) return; -@@ -907,11 +862,17 @@ +@@ -914,11 +938,17 @@ void Engine::prepareSave() { @@ -1016,7 +1114,7 @@ } -@@ -946,16 +907,16 @@ +@@ -953,16 +983,16 @@ void Engine::addCable(Cable* cable) { std::lock_guard lock(internal->mutex); @@ -1038,7 +1136,7 @@ // Get connected status of output, to decide whether we need to call a PortChangeEvent. // It's best to not trust `cable->outputModule->outputs[cable->outputId]->isConnected()` if (cable2->outputModule == cable->outputModule && cable2->outputId == cable->outputId) -@@ -969,6 +930,8 @@ +@@ -976,6 +1006,8 @@ // Add the cable internal->cables.push_back(cable); internal->cablesCache[cable->id] = cable; @@ -1047,7 +1145,7 @@ Engine_updateConnected(this); // Dispatch input port event { -@@ -996,10 +959,12 @@ +@@ -1003,10 +1035,12 @@ void Engine::removeCable_NoLock(Cable* cable) { @@ -1062,17 +1160,17 @@ // Remove the cable internal->cablesCache.erase(cable->id); internal->cables.erase(it); -@@ -1053,6 +1018,9 @@ +@@ -1060,6 +1094,9 @@ internal->smoothModule = NULL; internal->smoothParamId = 0; } + if (internal->remoteDetails != nullptr) { + sendParamChangeToRemote(internal->remoteDetails, module->id, paramId, value); + } - module->params[paramId].value = value; + module->params[paramId].setValue(value); } -@@ -1085,11 +1053,11 @@ +@@ -1092,11 +1129,11 @@ std::lock_guard lock(internal->mutex); // New ParamHandles must be blank. // This means we don't have to refresh the cache. @@ -1086,7 +1184,7 @@ // Add it internal->paramHandles.insert(paramHandle); -@@ -1106,7 +1074,7 @@ +@@ -1113,7 +1150,7 @@ void Engine::removeParamHandle_NoLock(ParamHandle* paramHandle) { // Check that the ParamHandle is already added auto it = internal->paramHandles.find(paramHandle); @@ -1095,7 +1193,7 @@ // Remove it paramHandle->module = NULL; -@@ -1143,7 +1111,7 @@ +@@ -1150,7 +1187,7 @@ void Engine::updateParamHandle_NoLock(ParamHandle* paramHandle, int64_t moduleId, int paramId, bool overwrite) { // Check that it exists auto it = internal->paramHandles.find(paramHandle); @@ -1104,7 +1202,7 @@ // Set IDs paramHandle->moduleId = moduleId; -@@ -1187,6 +1155,10 @@ +@@ -1194,6 +1231,10 @@ json_t* moduleJ = module->toJson(); json_array_append_new(modulesJ, moduleJ); } @@ -1115,7 +1213,7 @@ json_object_set_new(rootJ, "modules", modulesJ); // cables -@@ -1197,11 +1169,6 @@ +@@ -1204,11 +1245,6 @@ } json_object_set_new(rootJ, "cables", cablesJ); @@ -1127,7 +1225,7 @@ return rootJ; } -@@ -1225,14 +1192,20 @@ +@@ -1232,14 +1268,20 @@ } catch (Exception& e) { WARN("Cannot load model: %s", e.what()); @@ -1152,7 +1250,7 @@ try { // This doesn't need a lock because the Module is not added to the Engine yet. -@@ -1248,7 +1221,8 @@ +@@ -1255,7 +1297,8 @@ } catch (Exception& e) { WARN("Cannot load module: %s", e.what()); @@ -1162,7 +1260,7 @@ delete module; continue; } -@@ -1285,67 +1259,20 @@ +@@ -1292,69 +1335,20 @@ continue; } } @@ -1180,7 +1278,9 @@ - // Configure thread - contextSet(engine->internal->context); - system::setThreadName(string::f("Worker %d", id)); +-#if defined ARCH_X64 - initMXCSR(); +-#endif - random::init(); - - while (true) { diff --git a/src/override/diffs/MenuBar.cpp.diff b/src/override/diffs/MenuBar.cpp.diff index e34016e2..167fcbe9 100644 --- a/src/override/diffs/MenuBar.cpp.diff +++ b/src/override/diffs/MenuBar.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/app/MenuBar.cpp 2022-09-21 19:49:12.198540676 +0100 -+++ MenuBar.cpp 2022-12-30 14:50:06.801891005 +0000 +--- ../Rack/src/app/MenuBar.cpp 2023-05-20 17:03:33.005081737 +0200 ++++ MenuBar.cpp 2023-05-20 19:32:57.019576570 +0200 @@ -1,8 +1,33 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's app/MenuBar.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -44,7 +44,7 @@ #include #include #include -@@ -25,8 +51,28 @@ +@@ -25,8 +51,26 @@ #include #include @@ -56,8 +56,6 @@ +#ifdef HAVE_LIBLO +# include +#endif -+ -+void switchDarkMode(bool darkMode); namespace rack { +namespace asset { @@ -73,7 +71,7 @@ namespace app { namespace menuBar { -@@ -48,79 +94,160 @@ +@@ -48,79 +92,180 @@ }; @@ -97,15 +95,16 @@ struct FileButton : MenuButton { + const bool isStandalone; -+#if ! CARDINAL_VARIANT_MINI + std::vector demoPatches; -+#endif + + FileButton(const bool standalone) + : MenuButton(), isStandalone(standalone) + { -+#if ! CARDINAL_VARIANT_MINI ++#if CARDINAL_VARIANT_MINI ++ const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "mini"; ++#else + const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples"; ++#endif + + if (system::isDirectory(patchesDir)) + { @@ -114,7 +113,6 @@ + return string::lowercase(a) < string::lowercase(b); + }); + } -+#endif + } + void onAction(const ActionEvent& e) override { @@ -125,31 +123,36 @@ - menu->addChild(createMenuItem("New", RACK_MOD_CTRL_NAME "+N", []() { - APP->patch->loadTemplateDialog(); +#ifndef DISTRHO_OS_WASM -+ const char* const NewShortcut = RACK_MOD_CTRL_NAME "+N"; ++ constexpr const char* const NewShortcut = RACK_MOD_CTRL_NAME "+N"; +#else -+ const char* const NewShortcut = ""; ++ constexpr const char* const NewShortcut = ""; +#endif + menu->addChild(createMenuItem("New", NewShortcut, []() { -+ patchUtils::loadTemplateDialog(); ++ patchUtils::loadTemplateDialog(false); ++ })); ++ ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++#ifndef DISTRHO_OS_WASM ++ menu->addChild(createMenuItem("New (factory template)", "", []() { ++ patchUtils::loadTemplateDialog(true); })); - menu->addChild(createMenuItem("Open", RACK_MOD_CTRL_NAME "+O", []() { - APP->patch->loadDialog(); -+#if ! CARDINAL_VARIANT_MINI -+#ifndef DISTRHO_OS_WASM + menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { + patchUtils::loadDialog(); })); -- menu->addChild(createSubmenuItem("Open recent", "", [](ui::Menu* menu) { -- for (const std::string& path : settings::recentPatchPaths) { -- std::string name = system::getStem(path); -- menu->addChild(createMenuItem(name, "", [=]() { + menu->addChild(createSubmenuItem("Open recent", "", [](ui::Menu* menu) { + for (const std::string& path : settings::recentPatchPaths) { + std::string name = system::getStem(path); + menu->addChild(createMenuItem(name, "", [=]() { - APP->patch->loadPathDialog(path); -- })); -- } -- }, settings::recentPatchPaths.empty())); -- ++ patchUtils::loadPathDialog(path, false); + })); + } + }, settings::recentPatchPaths.empty())); + menu->addChild(createMenuItem("Save", RACK_MOD_CTRL_NAME "+S", []() { - APP->patch->saveDialog(); + // NOTE: will do nothing if path is empty, intentionally @@ -188,20 +191,31 @@ + patchUtils::revertDialog(); + }, APP->patch->path.empty())); -- menu->addChild(createMenuItem("Overwrite template", "", []() { + menu->addChild(createMenuItem("Overwrite template", "", []() { - APP->patch->saveTemplateDialog(); -- })); -+#if defined(HAVE_LIBLO) && ! CARDINAL_VARIANT_MINI -+ menu->addChild(new ui::MenuSeparator); -+ ++ patchUtils::saveTemplateDialog(); + })); + ++#if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS ++#ifdef __MOD_DEVICES__ ++#define REMOTE_NAME "MOD" ++#else ++#define REMOTE_NAME "Remote" ++#endif + menu->addChild(new ui::MenuSeparator); + +- // Load selection +- menu->addChild(createMenuItem("Import selection", "", [=]() { +- APP->scene->rack->loadSelectionDialog(); +- }, false, true)); + remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote(); + + if (remoteDetails != nullptr && remoteDetails->connected) { -+ menu->addChild(createMenuItem("Deploy to MOD", "F7", [remoteDetails]() { ++ menu->addChild(createMenuItem("Deploy to " REMOTE_NAME, "F7", [remoteDetails]() { + remoteUtils::sendFullPatchToRemote(remoteDetails); + })); -+ menu->addChild(createCheckMenuItem("Auto deploy to MOD", "", ++ menu->addChild(createCheckMenuItem("Auto deploy to " REMOTE_NAME, "", + [remoteDetails]() {return remoteDetails->autoDeploy;}, + [remoteDetails]() { + remoteDetails->autoDeploy = !remoteDetails->autoDeploy; @@ -209,34 +223,29 @@ + } + )); + } else { -+ menu->addChild(createMenuItem("Connect to MOD", "", []() { ++ menu->addChild(createMenuItem("Connect to " REMOTE_NAME, "", []() { + DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); + })); + } +#endif + -+#if ! CARDINAL_VARIANT_MINI ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +#ifndef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); - // Load selection -- menu->addChild(createMenuItem("Import selection", "", [=]() { -- APP->scene->rack->loadSelectionDialog(); -+ menu->addChild(createMenuItem("Import selection...", "", [=]() { -+ patchUtils::loadSelectionDialog(); - }, false, true)); - -- menu->addChild(new ui::MenuSeparator); -- - menu->addChild(createMenuItem("Quit", RACK_MOD_CTRL_NAME "+Q", []() { - APP->window->close(); ++ // Load selection ++ menu->addChild(createMenuItem("Import selection...", "", [=]() { ++ patchUtils::loadSelectionDialog(); ++ }, false, true)); ++ + menu->addChild(createMenuItem("Export uncompressed json...", "", []() { + patchUtils::saveAsDialogUncompressed(); })); +#endif +#endif + -+#if ! CARDINAL_VARIANT_MINI + if (!demoPatches.empty()) + { + menu->addChild(new ui::MenuSeparator); @@ -262,7 +271,6 @@ + })); + })); + } -+#endif + +#ifndef DISTRHO_OS_WASM + if (isStandalone) { @@ -276,7 +284,7 @@ } }; -@@ -166,7 +293,7 @@ +@@ -166,7 +311,7 @@ menu->addChild(new ui::MenuSeparator); @@ -285,7 +293,7 @@ } }; -@@ -256,7 +383,7 @@ +@@ -256,7 +401,7 @@ return settings::cableTension; } float getDefaultValue() override { @@ -294,7 +302,7 @@ } float getDisplayValue() override { return getValue() * 100; -@@ -393,36 +520,37 @@ +@@ -393,49 +538,36 @@ }; @@ -327,17 +335,34 @@ - menu->addChild(createMenuItem("Fullscreen", fullscreenText, [=]() { - APP->window->setFullScreen(!fullscreen); - })); -+ menu->addChild(createMenuLabel("Appearance")); - -- double frameRate = APP->window->getMonitorRefreshRate() / settings::frameSwapInterval; -- menu->addChild(createSubmenuItem("Frame rate", string::f("%.0f Hz", frameRate), [=](ui::Menu* menu) { +- +- menu->addChild(createSubmenuItem("Frame rate", string::f("%.0f Hz", settings::frameRateLimit), [=](ui::Menu* menu) { - for (int i = 1; i <= 6; i++) { - double frameRate = APP->window->getMonitorRefreshRate() / i; - menu->addChild(createCheckMenuItem(string::f("%.0f Hz", frameRate), "", -- [=]() {return settings::frameSwapInterval == i;}, -- [=]() {settings::frameSwapInterval = i;} +- [=]() {return settings::frameRateLimit == frameRate;}, +- [=]() {settings::frameRateLimit = frameRate;} - )); - } +- })); +- +- menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("Appearance")); + +- static const std::vector uiThemes = {"dark", "light", "hcdark"}; +- static const std::vector uiThemeLabels = {"Dark", "Light", "High contrast dark"}; +- menu->addChild(createIndexSubmenuItem("Theme", uiThemeLabels, +- [=]() -> size_t { +- auto it = std::find(uiThemes.begin(), uiThemes.end(), settings::uiTheme); +- if (it == uiThemes.end()) +- return -1; +- return it - uiThemes.begin(); +- }, +- [=](size_t i) { +- settings::uiTheme = uiThemes[i]; +- ui::refreshTheme(); +- } +- )); + std::string darkModeText; + if (settings::darkMode) + darkModeText = CHECKMARK_STRING; @@ -345,15 +370,11 @@ + switchDarkMode(!settings::darkMode); + plugin::updateStaticPluginsDarkMode(); + setAllFramebufferWidgetsDirty(APP->scene); - })); ++ })); -- menu->addChild(new ui::MenuSeparator); -- menu->addChild(createMenuLabel("Appearance")); -- menu->addChild(createBoolPtrMenuItem("Show tooltips", "", &settings::tooltips)); - ZoomSlider* zoomSlider = new ZoomSlider; -@@ -446,9 +574,18 @@ +@@ -460,9 +592,18 @@ menu->addChild(haloBrightnessSlider); menu->addChild(new ui::MenuSeparator); @@ -372,13 +393,14 @@ static const std::vector knobModeLabels = { "Linear", -@@ -473,11 +610,34 @@ +@@ -487,11 +628,34 @@ menu->addChild(knobScrollSensitivitySlider); menu->addChild(new ui::MenuSeparator); -- menu->addChild(createMenuLabel("Module dragging")); +- menu->addChild(createMenuLabel("Module")); + menu->addChild(createMenuLabel("Window")); -+ + +- menu->addChild(createBoolPtrMenuItem("Lock positions", "", &settings::lockModules)); +#ifdef DISTRHO_OS_WASM + const bool fullscreen = APP->window->isFullScreen(); + std::string rightText = "F11"; @@ -388,8 +410,7 @@ + APP->window->setFullScreen(!fullscreen); + })); +#endif - -- menu->addChild(createBoolPtrMenuItem("Lock positions", "", &settings::lockModules)); ++ + menu->addChild(createBoolPtrMenuItem("Invert zoom", "", &settings::invertZoom)); - menu->addChild(createBoolPtrMenuItem("Auto-squeeze algorithm (experimental)", "", &settings::squeezeModules)); @@ -410,7 +431,7 @@ } }; -@@ -487,47 +647,6 @@ +@@ -501,47 +665,6 @@ //////////////////// @@ -458,7 +479,7 @@ struct EngineButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); -@@ -541,268 +660,46 @@ +@@ -555,268 +678,46 @@ settings::cpuMeter ^= true; })); @@ -614,10 +635,10 @@ + })); } - } - +- - MenuItem::step(); - } -- + - void onAction(const ActionEvent& e) override { - std::thread t([=] { - library::syncUpdate(slug); @@ -726,11 +747,11 @@ - }); - t.detach(); - } -- + - void step() override { - notification->box.pos = math::Vec(0, 0); - notification->visible = library::hasUpdates(); - +- - // Popup when updates finish downloading - if (library::restartRequested) { - library::restartRequested = false; @@ -760,7 +781,7 @@ } }; -@@ -813,65 +710,23 @@ +@@ -827,32 +728,17 @@ struct HelpButton : MenuButton { @@ -778,32 +799,29 @@ - menu->addChild(createMenuItem("Tips", "", [=]() { - APP->scene->addChild(tipWindowCreate()); -- })); -- ++ menu->addChild(createMenuItem("Rack User manual", "F1", [=]() { ++ patchUtils::openBrowser("https://vcvrack.com/manual"); + })); + - menu->addChild(createMenuItem("User manual", "F1", [=]() { - system::openBrowser("https://vcvrack.com/manual"); - })); - - menu->addChild(createMenuItem("Support", "", [=]() { - system::openBrowser("https://vcvrack.com/support"); -+ menu->addChild(createMenuItem("Rack User manual", "F1", [=]() { -+ patchUtils::openBrowser("https://vcvrack.com/manual"); - })); - +- })); +- - menu->addChild(createMenuItem("VCVRack.com", "", [=]() { - system::openBrowser("https://vcvrack.com/"); -+ menu->addChild(createMenuItem("Cardinal Project page", "", [=]() { ++ menu->addChild(createMenuItem("Cardinal project page", "", [=]() { + patchUtils::openBrowser("https://github.com/DISTRHO/Cardinal/"); })); menu->addChild(new ui::MenuSeparator); +@@ -861,29 +747,9 @@ + system::openDirectory(asset::user("")); + })); -- menu->addChild(createMenuLabel(APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION)); -- -- menu->addChild(createMenuItem("Open user folder", "", [=]() { -- system::openDirectory(asset::user("")); -- })); -- - menu->addChild(createMenuItem("Changelog", "", [=]() { - system::openBrowser("https://github.com/VCVRack/Rack/blob/v2/CHANGELOG.md"); - })); @@ -822,34 +840,42 @@ - }, false, true)); - } - } -- ++ menu->addChild(new ui::MenuSeparator); + - void step() override { - notification->box.pos = math::Vec(0, 0); - notification->visible = library::isAppUpdateAvailable(); - MenuButton::step(); -+ menu->addChild(createMenuLabel("Cardinal " + APP_EDITION + " " + CARDINAL_VERSION)); + menu->addChild(createMenuLabel("Rack " + APP_VERSION + " Compatible")); } }; -@@ -910,9 +765,14 @@ - // uiLastTime = time; - // } +@@ -926,15 +792,19 @@ -+#if CARDINAL_VARIANT_MINI -+ text = string::f("%.1f fps", 1.0 / frameDurationAvg); + text = ""; + +- if (box.size.x >= 460) { ++ if (box.size.x >= 400) { + double fps = std::isfinite(frameDurationAvg) ? 1.0 / frameDurationAvg : 0.0; ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + double meterAverage = APP->engine->getMeterAverage(); + double meterMax = APP->engine->getMeterMax(); +- text += string::f("%.1f fps %.1f%% avg %.1f%% max", fps, meterAverage * 100, meterMax * 100); ++ text = string::f("%.1f fps %.1f%% avg %.1f%% max", fps, meterAverage * 100, meterMax * 100); +#else - double meterAverage = APP->engine->getMeterAverage(); - double meterMax = APP->engine->getMeterMax(); - text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100); ++ text = string::f("%.1f fps", fps); +#endif -+ + text += " "; + } + +- text += APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION + " " + APP_OS_NAME + " " + APP_CPU_NAME; ++ text += "Cardinal " + APP_EDITION + " " + CARDINAL_VERSION; + Label::step(); } - }; -@@ -921,7 +781,9 @@ +@@ -944,7 +814,9 @@ struct MenuBar : widget::OpaqueWidget { - MeterLabel* meterLabel; + InfoLabel* infoLabel; - MenuBar() { + MenuBar(const bool isStandalone) @@ -858,7 +884,7 @@ const float margin = 5; box.size.y = BND_WIDGET_HEIGHT + 2 * margin; -@@ -930,7 +792,7 @@ +@@ -953,7 +825,7 @@ layout->spacing = math::Vec(0, 0); addChild(layout); @@ -867,11 +893,11 @@ fileButton->text = "File"; layout->addChild(fileButton); -@@ -942,13 +804,11 @@ +@@ -965,13 +837,11 @@ viewButton->text = "View"; layout->addChild(viewButton); -+#if ! CARDINAL_VARIANT_MINI ++#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS EngineButton* engineButton = new EngineButton; engineButton->text = "Engine"; layout->addChild(engineButton); @@ -883,7 +909,7 @@ HelpButton* helpButton = new HelpButton; helpButton->text = "Help"; -@@ -984,7 +844,7 @@ +@@ -1003,7 +873,7 @@ widget::Widget* createMenuBar() { diff --git a/src/override/diffs/Model.cpp.diff b/src/override/diffs/Model.cpp.diff index 1c251b2e..1807058a 100644 --- a/src/override/diffs/Model.cpp.diff +++ b/src/override/diffs/Model.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/plugin/Model.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ Model.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/plugin/Model.cpp 2023-05-20 17:03:33.007081806 +0200 ++++ Model.cpp 2023-05-20 18:29:51.484669742 +0200 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's plugin/Model.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -61,8 +61,8 @@ - // hidden json_t* hiddenJ = json_object_get(rootJ, "hidden"); - // Use `disabled` as an alias which was deprecated in Rack 2.0 -@@ -74,7 +97,7 @@ + // "disabled" was a deprecated alias in Rack <2 +@@ -77,7 +100,7 @@ std::string Model::getFullName() { @@ -71,7 +71,7 @@ return plugin->getBrand() + " " + name; } -@@ -99,7 +122,7 @@ +@@ -102,7 +125,7 @@ void Model::appendContextMenu(ui::Menu* menu, bool inBrowser) { // plugin menu->addChild(createMenuItem("Plugin: " + plugin->name, "", [=]() { @@ -80,7 +80,7 @@ }, plugin->pluginUrl == "")); // version -@@ -108,7 +131,7 @@ +@@ -111,7 +134,7 @@ // author if (plugin->author != "") { menu->addChild(createMenuItem("Author: " + plugin->author, "", [=]() { @@ -89,7 +89,7 @@ }, plugin->authorUrl.empty())); } -@@ -116,7 +139,7 @@ +@@ -119,7 +142,7 @@ std::string license = plugin->license; if (string::startsWith(license, "https://") || string::startsWith(license, "http://")) { menu->addChild(createMenuItem("License: Open in browser", "", [=]() { @@ -98,7 +98,7 @@ })); } else if (license != "") { -@@ -133,58 +156,32 @@ +@@ -136,44 +159,32 @@ menu->addChild(new ui::MenuSeparator); @@ -143,21 +143,21 @@ if (plugin->changelogUrl != "") { menu->addChild(createMenuItem("Changelog", "", [=]() { - system::openBrowser(plugin->changelogUrl); -- })); -- } -- -- // author email -- if (plugin->authorEmail != "") { -- menu->addChild(createMenuItem("Author email", "Copy to clipboard", [=]() { -- glfwSetClipboardString(APP->window->win, plugin->authorEmail.c_str()); -- })); -- } -- -- // plugin folder -- if (plugin->path != "") { -- menu->addChild(createMenuItem("Open plugin folder", "", [=]() { -- system::openDirectory(plugin->path); + patchUtils::openBrowser(plugin->changelogUrl); })); } +@@ -184,13 +195,6 @@ + })); + } + +- // plugin folder +- if (plugin->path != "") { +- menu->addChild(createMenuItem("Open plugin folder", "", [=]() { +- system::openDirectory(plugin->path); +- })); +- } +- + // Favorite + std::string favoriteRightText = inBrowser ? (RACK_MOD_CTRL_NAME "+click") : ""; + if (isFavorite()) diff --git a/src/override/diffs/ModuleWidget.cpp.diff b/src/override/diffs/ModuleWidget.cpp.diff index b1e635d8..beefa43c 100644 --- a/src/override/diffs/ModuleWidget.cpp.diff +++ b/src/override/diffs/ModuleWidget.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/app/ModuleWidget.cpp 2022-09-21 19:49:12.198540676 +0100 -+++ ModuleWidget.cpp 2022-12-02 19:11:45.780215974 +0000 -@@ -1,3 +1,32 @@ +--- ../Rack/src/app/ModuleWidget.cpp 2023-05-20 17:03:33.005081737 +0200 ++++ ModuleWidget.cpp 2023-05-20 18:40:08.948302802 +0200 +@@ -1,8 +1,35 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's ModuleWidget.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -33,7 +33,12 @@ #include #include -@@ -375,7 +404,7 @@ +-#include +- + #include + #include + #include +@@ -375,7 +402,7 @@ if (e.action == GLFW_PRESS) { // Open selection context menu on right-click ui::Menu* menu = createMenu(); @@ -42,7 +47,7 @@ } e.consume(this); } -@@ -627,6 +656,9 @@ +@@ -629,6 +656,9 @@ std::string presetDir = model->getUserPresetDirectory(); system::createDirectories(presetDir); @@ -52,7 +57,7 @@ // Delete directories if empty DEFER({ try { -@@ -638,10 +670,8 @@ +@@ -640,10 +670,8 @@ } }); @@ -65,7 +70,7 @@ if (!pathC) { // No path selected return; -@@ -649,11 +679,13 @@ +@@ -651,11 +679,13 @@ DEFER({std::free(pathC);}); try { @@ -81,7 +86,46 @@ } void ModuleWidget::save(std::string filename) { -@@ -715,6 +747,9 @@ +@@ -670,7 +700,7 @@ + FILE* file = std::fopen(filename.c_str(), "w"); + if (!file) { + std::string message = string::f("Could not save preset to file %s", filename.c_str()); +- osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, message.c_str()); ++ async_dialog_message(message.c_str()); + return; + } + DEFER({std::fclose(file);}); +@@ -688,10 +718,12 @@ + void ModuleWidget::saveTemplateDialog() { + if (hasTemplate()) { + std::string message = string::f("Overwrite default preset for %s?", model->getFullName().c_str()); +- if (!osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, message.c_str())) +- return; ++ WeakPtr weakThis = this; ++ async_dialog_message(message.c_str(), [=]{ ++ if (weakThis) ++ weakThis->saveTemplate(); ++ }); + } +- saveTemplate(); + } + + bool ModuleWidget::hasTemplate() { +@@ -708,15 +740,20 @@ + + void ModuleWidget::clearTemplateDialog() { + std::string message = string::f("Delete default preset for %s?", model->getFullName().c_str()); +- if (!osdialog_message(OSDIALOG_INFO, OSDIALOG_OK_CANCEL, message.c_str())) +- return; +- clearTemplate(); ++ WeakPtr weakThis = this; ++ async_dialog_message(message.c_str(), [=]{ ++ if (weakThis) ++ weakThis->clearTemplate(); ++ }); + } + + void ModuleWidget::saveDialog() { std::string presetDir = model->getUserPresetDirectory(); system::createDirectories(presetDir); @@ -91,7 +135,7 @@ // Delete directories if empty DEFER({ try { -@@ -726,10 +761,8 @@ +@@ -728,10 +765,8 @@ } }); @@ -104,7 +148,7 @@ if (!pathC) { // No path selected return; -@@ -741,7 +774,8 @@ +@@ -743,7 +778,8 @@ if (system::getExtension(path) != ".vcvm") path += ".vcvm"; @@ -114,28 +158,7 @@ } void ModuleWidget::disconnect() { -@@ -944,16 +978,12 @@ - std::regex r("^\\d+_"); - name = std::regex_replace(name, r, ""); - -- if (system::isDirectory(path)) { -- hasPresets = true; -- -- menu->addChild(createSubmenuItem(name, "", [=](ui::Menu* menu) { -- if (!moduleWidget) -- return; -- appendPresetItems(menu, moduleWidget, path); -- })); -+ if (false) { - } - else if (system::getExtension(path) == ".vcvm" && name != "template") { -+ if (!hasPresets) -+ menu->addChild(new ui::MenuSeparator); -+ - hasPresets = true; - - menu->addChild(createMenuItem(name, "", [=]() { -@@ -963,15 +993,12 @@ +@@ -965,7 +1001,7 @@ moduleWidget->loadAction(path); } catch (Exception& e) { @@ -144,37 +167,7 @@ } })); } - } - } -- if (!hasPresets) { -- menu->addChild(createMenuLabel("(None)")); -- } - }; - - -@@ -1010,6 +1037,7 @@ - weakThis->loadDialog(); - })); - -+ /* TODO requires setting up user dir - menu->addChild(createMenuItem("Save as", "", [=]() { - if (!weakThis) - return; -@@ -1032,10 +1060,13 @@ - menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("User presets")); - appendPresetItems(menu, weakThis, weakThis->model->getUserPresetDirectory()); -+ */ - - // Scan `/presets/` for presets. -+ /* TODO enable only after setting up user dir - menu->addChild(new ui::MenuSeparator); - menu->addChild(createMenuLabel("Factory presets")); -+ */ - appendPresetItems(menu, weakThis, weakThis->model->getFactoryPresetDirectory()); - })); - -@@ -1127,4 +1158,4 @@ +@@ -1129,4 +1165,4 @@ } // namespace app diff --git a/src/override/diffs/OpenGlWidget.cpp.diff b/src/override/diffs/OpenGlWidget.cpp.diff index 1fb7156e..202f8640 100644 --- a/src/override/diffs/OpenGlWidget.cpp.diff +++ b/src/override/diffs/OpenGlWidget.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 19:49:12.201540766 +0100 -+++ OpenGlWidget.cpp 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/src/widget/OpenGlWidget.cpp 2022-09-21 20:49:12.201540766 +0200 ++++ OpenGlWidget.cpp 2023-05-20 18:41:22.249200486 +0200 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's OpenGlWidget.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as diff --git a/src/override/diffs/Scene.cpp.diff b/src/override/diffs/Scene.cpp.diff index 55209401..f2210d0e 100644 --- a/src/override/diffs/Scene.cpp.diff +++ b/src/override/diffs/Scene.cpp.diff @@ -1,12 +1,12 @@ ---- ../Rack/src/app/Scene.cpp 2022-09-21 19:49:12.199540706 +0100 -+++ Scene.cpp 2022-12-30 14:50:06.801891005 +0000 +--- ../Rack/src/app/Scene.cpp 2022-09-21 20:49:12.199540706 +0200 ++++ Scene.cpp 2023-05-20 18:44:57.551491858 +0200 @@ -1,12 +1,36 @@ -#include - -#include +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -23,7 +23,7 @@ + +/** + * This file is an edited version of VCVRack's app/Scene.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -40,7 +40,7 @@ #include #include #include -@@ -14,6 +38,13 @@ +@@ -14,6 +38,14 @@ #include #include @@ -51,10 +51,11 @@ +#include "../CardinalCommon.hpp" +#include "../CardinalRemote.hpp" + ++#include namespace rack { namespace app { -@@ -23,32 +54,72 @@ +@@ -23,32 +55,72 @@ math::Vec size; void draw(const DrawArgs& args) override { @@ -101,17 +102,17 @@ + + void onHover(const HoverEvent& e) override { + e.consume(this); -+ } -+ + } + +- void onDragStart(const DragStartEvent& e) override { + void onEnter(const EnterEvent& e) override { + glfwSetCursor(APP->window->win, glfwCreateStandardCursor(GLFW_RESIZE_NWSE_CURSOR)); + } + + void onLeave(const LeaveEvent& e) override { + glfwSetCursor(APP->window->win, nullptr); - } - -- void onDragStart(const DragStartEvent& e) override { ++ } ++ + void onDragStart(const DragStartEvent&) override { size = APP->window->getSize(); } @@ -137,14 +138,14 @@ }; -@@ -67,13 +138,11 @@ +@@ -67,13 +139,11 @@ browser->hide(); addChild(browser); - if (settings::showTipsOnLaunch) { - addChild(tipWindowCreate()); - } -+ if (isStandalone()) ++ if (isStandalone() || isMini()) + return; internal->resizeHandle = new ResizeHandle; @@ -154,7 +155,7 @@ addChild(internal->resizeHandle); } -@@ -99,22 +168,13 @@ +@@ -99,22 +169,13 @@ rackScroll->box.pos.y = menuBar->box.size.y; } @@ -179,7 +180,7 @@ // Scroll RackScrollWidget with arrow keys math::Vec arrowDelta; if (internal->heldArrowKeys[0]) { -@@ -143,6 +203,29 @@ +@@ -143,6 +204,34 @@ rackScroll->offset += arrowDelta * arrowSpeed; } @@ -195,7 +196,12 @@ + internal->lastSceneChangeTime = time; + } else if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) { + const std::string& name(APP->history->actions[actionIndex - 1]->name); -+ if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") { ++ static const std::vector ignoredNames = { ++ "move knob", ++ "move modules", ++ "move switch", ++ }; ++ if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) { + printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str()); + remoteUtils::sendFullPatchToRemote(remoteDetails); + window::generateScreenshot(); @@ -209,16 +215,16 @@ Widget::step(); } -@@ -172,7 +255,7 @@ +@@ -172,7 +261,7 @@ if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { // DEBUG("key '%d '%c' scancode %d '%c' keyName '%s'", e.key, e.key, e.scancode, e.scancode, e.keyName.c_str()); if (e.keyName == "n" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { - APP->patch->loadTemplateDialog(); -+ patchUtils::loadTemplateDialog(); ++ patchUtils::loadTemplateDialog(false); e.consume(this); } if (e.keyName == "q" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -180,19 +263,22 @@ +@@ -180,19 +269,22 @@ e.consume(this); } if (e.keyName == "o" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { @@ -245,7 +251,7 @@ e.consume(this); } if (e.keyName == "z" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -220,24 +306,38 @@ +@@ -220,24 +312,42 @@ APP->scene->rackScroll->setZoom(std::pow(2.f, zoom)); e.consume(this); } @@ -269,8 +275,10 @@ } + if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) { + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) ++ { + remoteUtils::sendFullPatchToRemote(remoteDetails); -+ window::generateScreenshot(); ++ window::generateScreenshot(); ++ } + e.consume(this); + } + if (e.key == GLFW_KEY_F9 && (e.mods & RACK_MOD_MASK) == 0) { @@ -280,15 +288,15 @@ +#ifdef DISTRHO_OS_WASM if (e.key == GLFW_KEY_F11 && (e.mods & RACK_MOD_MASK) == 0) { APP->window->setFullScreen(!APP->window->isFullScreen()); -- // The MenuBar will be hidden when the mouse moves over the RackScrollWidget. -- // menuBar->hide(); + // The MenuBar will be hidden when the mouse moves over the RackScrollWidget. + // menuBar->hide(); e.consume(this); } +#endif // Module selections if (e.keyName == "a" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { -@@ -326,13 +426,6 @@ +@@ -326,13 +436,6 @@ // Key commands that can be overridden by children if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { @@ -302,7 +310,7 @@ if (e.keyName == "v" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { rack->pasteClipboardAction(); e.consume(this); -@@ -351,7 +444,7 @@ +@@ -351,7 +454,7 @@ std::string extension = system::getExtension(path); if (extension == ".vcv") { diff --git a/src/override/diffs/Window.cpp.diff b/src/override/diffs/Window.cpp.diff index e71c075b..dd2c7604 100644 --- a/src/override/diffs/Window.cpp.diff +++ b/src/override/diffs/Window.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/window/Window.cpp 2022-09-21 19:49:12.202540796 +0100 -+++ Window.cpp 2022-12-29 17:16:45.012337253 +0000 -@@ -1,33 +1,88 @@ +--- ../Rack/src/window/Window.cpp 2023-05-20 17:03:33.007081806 +0200 ++++ Window.cpp 2023-05-20 19:01:25.266135825 +0200 +@@ -1,33 +1,94 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's window/Window.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -57,16 +57,6 @@ +# undef DEBUG +#endif + -+// comment out if wanting to generate a local screenshot.png -+#define STBI_WRITE_NO_STDIO -+ -+// uncomment to generate screenshots without the rack rail background (ie, transparent) -+// #define CARDINAL_TRANSPARENT_SCREENSHOTS - -+// used in Window::screenshot -+#define STB_IMAGE_WRITE_IMPLEMENTATION -+#include "stb_image_write.h" -+ +#include "DistrhoUI.hpp" +#include "Application.hpp" +#include "extra/String.hpp" @@ -77,6 +67,22 @@ +#ifndef DGL_NO_SHARED_RESOURCES +# include "src/Resources.hpp" +#endif + ++#if !(defined(DGL_USE_GLES) || CARDINAL_VARIANT_MINI) ++ ++#define CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS ++ ++// comment out if wanting to generate a local screenshot.png ++#define STBI_WRITE_NO_STDIO ++ ++// uncomment to generate screenshots without the rack rail background (ie, transparent) ++// #define CARDINAL_TRANSPARENT_SCREENSHOTS ++ ++// used in Window::screenshot ++#define STB_IMAGE_WRITE_IMPLEMENTATION ++#include "stb_image_write.h" ++ ++#endif + +#ifdef DISTRHO_OS_WASM +# include @@ -86,7 +92,7 @@ namespace window { --static const math::Vec WINDOW_SIZE_MIN = math::Vec(480, 320); +-static const math::Vec WINDOW_SIZE_MIN = math::Vec(640, 480); +static const math::Vec WINDOW_SIZE_MIN = math::Vec(648, 538); + + @@ -102,7 +108,7 @@ Font::~Font() { -@@ -42,9 +97,8 @@ +@@ -42,9 +103,8 @@ // Transfer ownership of font data to font object uint8_t* data = system::readFile(filename, &size); // Don't use nvgCreateFont because it doesn't properly handle UTF-8 filenames on Windows. @@ -113,10 +119,11 @@ throw Exception("Failed to load font %s", filename.c_str()); } INFO("Loaded font %s", filename.c_str()); -@@ -79,375 +133,489 @@ +@@ -79,338 +139,475 @@ } ++#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS +enum ScreenshotStep { + kScreenshotStepNone, + kScreenshotStepStarted, @@ -124,6 +131,7 @@ + kScreenshotStepSecondPass, + kScreenshotStepSaving +}; ++#endif + + struct Window::Internal { @@ -153,15 +161,13 @@ int frame = 0; - bool ignoreNextMouseDelta = false; -- int frameSwapInterval = -1; - double monitorRefreshRate = 0.0; -+ int frameSwapInterval = 1; -+#ifndef DGL_USE_GLES ++#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS + int generateScreenshotStep = kScreenshotStepNone; +#endif + double monitorRefreshRate = 60.0; - double frameTime = 0.0; - double lastFrameDuration = 0.0; + double frameTime = NAN; + double lastFrameDuration = NAN; - math::Vec lastMousePos; - @@ -173,8 +179,8 @@ bool fbDirtyOnSubpixelChange = true; int fbCount = 0; -}; -- +- -static void windowPosCallback(GLFWwindow* win, int x, int y) { - if (glfwGetWindowAttrib(win, GLFW_MAXIMIZED)) - return; @@ -484,15 +490,11 @@ - APP->event->handleDrop(APP->window->internal->lastMousePos, pathsVec); -} - - +- -static void errorCallback(int error, const char* description) { - WARN("GLFW error %d: %s", error, description); -} -- -- --Window::Window() { -- internal = new Internal; -- int err; + + if (ui != nullptr) + { + const GLubyte* vendor = glGetString(GL_VENDOR); @@ -514,6 +516,10 @@ + window->internal->r_fbVg = nvgCreateSharedGL2(window->internal->r_vg, NVG_ANTIALIAS); +#endif +-Window::Window() { +- internal = new Internal; +- int err; +- - // Set window hints -#if defined NANOVG_GL2 - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); @@ -558,7 +564,7 @@ - glfwSetInputMode(win, GLFW_LOCK_KEY_MODS, 1); - - glfwMakeContextCurrent(win); -- glfwSwapInterval(1); +- glfwSwapInterval(0); - const GLFWvidmode* monitorMode = glfwGetVideoMode(glfwGetPrimaryMonitor()); - if (monitorMode->refreshRate > 0) { - internal->monitorRefreshRate = monitorMode->refreshRate; @@ -731,14 +737,14 @@ +#else + nvgDeleteGL2(internal->o_fbVg != nullptr ? internal->o_fbVg : fbVg); + nvgDeleteGL2(internal->o_vg != nullptr ? internal->o_vg : vg); -+#endif + #endif +#else +#if defined NANOVG_GLES2 + nvgDeleteGLES2(fbVg); +#else + nvgDeleteGL2(fbVg); +#endif - #endif ++#endif + } + } @@ -777,7 +783,7 @@ +} + + -+#ifndef DGL_USE_GLES ++#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS +static void Window__flipBitmap(uint8_t* pixels, const int width, const int height, const int depth) { + for (int y = 0; y < height / 2; y++) { + const int flipY = height - y - 1; @@ -785,10 +791,10 @@ + std::memcpy(tmp, &pixels[y * width * depth], width * depth); + std::memmove(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); + std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); - } - } - - ++ } ++} ++ ++ +#ifdef STBI_WRITE_NO_STDIO +static void Window__downscaleBitmap(uint8_t* pixels, int& width, int& height) { + int targetWidth = width; @@ -828,12 +834,12 @@ + ui->setState("screenshot", screenshot); + remoteUtils::sendScreenshotToRemote(ui->remoteDetails, screenshot); + std::free(screenshot); -+ } -+} + } + } +#endif +#endif -+ -+ + + void Window::step() { + DISTRHO_SAFE_ASSERT_RETURN(internal->tlw != nullptr,); + @@ -841,13 +847,9 @@ + return; + double frameTime = system::getTime(); - double lastFrameTime = internal->frameTime; - internal->frameTime = frameTime; - internal->lastFrameDuration = frameTime - lastFrameTime; - internal->fbCount = 0; - // DEBUG("%.2lf Hz", 1.0 / internal->lastFrameDuration); -- // double t1 = 0.0, t2 = 0.0, t3 = 0.0, t4 = 0.0, t5 = 0.0; - + if (std::isfinite(internal->frameTime)) { + internal->lastFrameDuration = frameTime - internal->frameTime; +@@ -422,57 +619,48 @@ // Make event handlers and step() have a clean NanoVG context nvgReset(vg); @@ -861,10 +863,6 @@ - - // In case glfwPollEvents() sets another OpenGL context - glfwMakeContextCurrent(win); -- if (settings::frameSwapInterval != internal->frameSwapInterval) { -- glfwSwapInterval(settings::frameSwapInterval); -- internal->frameSwapInterval = settings::frameSwapInterval; -- } - - // Call cursorPosCallback every frame, not just when the mouse moves - { @@ -878,17 +876,27 @@ // Set window title - std::string windowTitle = APP_NAME + " " + APP_EDITION_NAME + " " + APP_VERSION; -+ std::string windowTitle = "Cardinal"; - if (APP->patch->path != "") { - windowTitle += " - "; - if (!APP->history->isSaved()) -@@ -455,246 +623,189 @@ - windowTitle += system::getFilename(APP->patch->path); - } - if (windowTitle != internal->lastWindowTitle) { +- if (APP->patch->path != "") { +- windowTitle += " - "; +- if (!APP->history->isSaved()) +- windowTitle += "*"; +- windowTitle += system::getFilename(APP->patch->path); +- } +- if (windowTitle != internal->lastWindowTitle) { - glfwSetWindowTitle(win, windowTitle.c_str()); -+ internal->tlw->getWindow().setTitle(windowTitle.c_str()); - internal->lastWindowTitle = windowTitle; +- internal->lastWindowTitle = windowTitle; ++ if (isStandalone()) { ++ std::string windowTitle = "Cardinal"; ++ if (APP->patch->path != "") { ++ windowTitle += " - "; ++ if (!APP->history->isSaved()) ++ windowTitle += "*"; ++ windowTitle += system::getFilename(APP->patch->path); ++ } ++ if (windowTitle != internal->lastWindowTitle) { ++ internal->tlw->getWindow().setTitle(windowTitle.c_str()); ++ internal->lastWindowTitle = windowTitle; ++ } } // Get desired pixel ratio @@ -906,7 +914,7 @@ APP->event->handleDirty(); } -+#ifndef DGL_USE_GLES ++#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS + // Hide menu and background if generating screenshot + if (internal->generateScreenshotStep == kScreenshotStepStarted) { +#ifdef CARDINAL_TRANSPARENT_SCREENSHOTS @@ -925,20 +933,13 @@ - glfwGetWindowSize(win, &winWidth, &winHeight); + int winWidth = internal->tlw->getWidth(); + int winHeight = internal->tlw->getHeight(); -+ int fbWidth = winWidth;// * newPixelRatio; -+ int fbHeight = winHeight;// * newPixelRatio; ++ int fbWidth = winWidth; ++ int fbHeight = winHeight; windowRatio = (float)fbWidth / winWidth; -- // t1 = system::getTime(); + // t1 = system::getTime(); - if (APP->scene) { - // DEBUG("%f %f %d %d", pixelRatio, windowRatio, fbWidth, winWidth); - // Resize scene -- APP->scene->box.size = math::Vec(fbWidth, fbHeight).div(pixelRatio); -+ APP->scene->box.size = math::Vec(fbWidth, fbHeight).div(newPixelRatio); - - // Step scene - APP->scene->step(); -- // t2 = system::getTime(); +@@ -486,10 +674,8 @@ + // t2 = system::getTime(); // Render scene - bool visible = glfwGetWindowAttrib(win, GLFW_VISIBLE) && !glfwGetWindowAttrib(win, GLFW_ICONIFIED); @@ -946,15 +947,11 @@ + { // Update and render - nvgBeginFrame(vg, fbWidth, fbHeight, pixelRatio); -- nvgScale(vg, pixelRatio, pixelRatio); -+ nvgScale(vg, newPixelRatio, newPixelRatio); + nvgScale(vg, pixelRatio, pixelRatio); // Draw scene - widget::Widget::DrawArgs args; - args.vg = vg; - args.clipBox = APP->scene->box.zeroPos(); - APP->scene->draw(args); -- // t3 = system::getTime(); +@@ -500,23 +686,16 @@ + // t3 = system::getTime(); glViewport(0, 0, fbWidth, fbHeight); +#ifdef CARDINAL_TRANSPARENT_SCREENSHOTS @@ -964,19 +961,32 @@ +#endif glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - nvgEndFrame(vg); -- // t4 = system::getTime(); } + // t4 = system::getTime(); } - glfwSwapBuffers(win); +- +- // Limit frame rate +- if (settings::frameRateLimit > 0) { +- double remaining = getFrameDurationRemaining(); +- if (remaining > 0.0) { +- system::sleep(remaining); +- } +- } +- + // t5 = system::getTime(); + // DEBUG("pre-step %6.1f step %6.1f draw %6.1f nvgEndFrame %6.1f glfwSwapBuffers %6.1f total %6.1f", + // (t1 - frameTime) * 1e3f, +@@ -526,163 +705,124 @@ + // (t5 - t4) * 1e3f, + // (t5 - frameTime) * 1e3f + // ); +- internal->frame++; +-} + ++internal->frame; -- // On some platforms, glfwSwapBuffers() doesn't wait on monitor refresh, so we have to sleep as a fallback. -- double frameDurationRemaining = getFrameDurationRemaining(); -- if (frameDurationRemaining > 0.0) { -- std::this_thread::sleep_for(std::chrono::duration(frameDurationRemaining)); -- } -+#ifndef DGL_USE_GLES ++#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS + if (internal->generateScreenshotStep != kScreenshotStepNone) { + ++internal->generateScreenshotStep; + @@ -988,24 +998,20 @@ + constexpr const int depth = 3; +#endif -- // t5 = system::getTime(); +-static void flipBitmap(uint8_t* pixels, int width, int height, int depth) { +- for (int y = 0; y < height / 2; y++) { +- int flipY = height - y - 1; +- uint8_t tmp[width * depth]; +- std::memcpy(tmp, &pixels[y * width * depth], width * depth); +- std::memcpy(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); +- std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); + // Allocate pixel color buffer + uint8_t* const pixels = new uint8_t[winHeight * winWidth * 4]; - -- // DEBUG("pre-step %6.1f step %6.1f draw %6.1f nvgEndFrame %6.1f glfwSwapBuffers %6.1f total %6.1f", -- // (t1 - frameTime) * 1e3f, -- // (t2 - t1) * 1e3f, -- // (t3 - t2) * 1e3f, -- // (t4 - t2) * 1e3f, -- // (t5 - t4) * 1e3f, -- // (t5 - frameTime) * 1e3f -- // ); -- internal->frame++; --} ++ + // glReadPixels defaults to GL_BACK, but the back-buffer is unstable, so use the front buffer (what the user sees) + glReadBuffer(GL_FRONT); + glReadPixels(0, 0, winWidth, winHeight, depth == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, pixels); - ++ + if (internal->generateScreenshotStep == kScreenshotStepSaving) + { + // Write pixels to PNG @@ -1020,33 +1026,19 @@ +#else + stbi_write_png("screenshot.png", winWidth, winHeight, depth, pixelsWithOffset, stride); +#endif - --void Window::activateContext() { -- glfwMakeContextCurrent(win); ++ + internal->generateScreenshotStep = kScreenshotStepNone; + APP->scene->menuBar->show(); + APP->scene->rack->children.front()->show(); + } + + delete[] pixels; -+ } + } +#endif } --static void flipBitmap(uint8_t* pixels, int width, int height, int depth) { -- for (int y = 0; y < height / 2; y++) { -- int flipY = height - y - 1; -- uint8_t tmp[width * depth]; -- std::memcpy(tmp, &pixels[y * width * depth], width * depth); -- std::memcpy(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); -- std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); -- } -+void Window::activateContext() { - } - - --void Window::screenshot(const std::string& screenshotPath) { + void Window::screenshot(const std::string& screenshotPath) { - // Get window framebuffer size - int width, height; - glfwGetFramebufferSize(APP->window->win, &width, &height); @@ -1063,10 +1055,10 @@ - stbi_write_png(screenshotPath.c_str(), width, height, 4, pixels, width * 4); - - delete[] pixels; --} -- -- --void Window::screenshotModules(const std::string& screenshotsDir, float zoom) { + } + + + void Window::screenshotModules(const std::string& screenshotsDir, float zoom) { - // Iterate plugins and create directories - system::createDirectories(screenshotsDir); - for (plugin::Plugin* p : plugin::plugins) { @@ -1111,20 +1103,17 @@ - nvgImageSize(vg, fbw->getImageHandle(), &width, &height); - uint8_t* pixels = new uint8_t[height * width * 4]; - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); -+void Window::screenshot(const std::string&) { -+} - +- - // Write pixels to PNG - flipBitmap(pixels, width, height, 4); - stbi_write_png(filename.c_str(), width, height, 4, pixels, width * 4); - +- - // Cleanup - delete[] pixels; - nvgluBindFramebuffer(NULL); - delete fbw; - } - } -+void Window::screenshotModules(const std::string&, float) { } @@ -1189,7 +1178,7 @@ } --void Window::setFullScreen(bool fullScreen) { + void Window::setFullScreen(bool fullScreen) { - if (!fullScreen) { - glfwSetWindowMonitor(win, NULL, internal->lastWindowX, internal->lastWindowY, internal->lastWindowWidth, internal->lastWindowHeight, GLFW_DONT_CARE); - } @@ -1200,9 +1189,8 @@ - const GLFWvidmode* mode = glfwGetVideoMode(monitor); - glfwSetWindowMonitor(win, monitor, 0, 0, mode->width, mode->height, mode->refreshRate); - } -+void Window::setFullScreen(const bool fullscreen) { +#ifdef DISTRHO_OS_WASM -+ if (fullscreen) ++ if (fullScreen) + emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false); + else + emscripten_exit_fullscreen(); @@ -1218,18 +1206,24 @@ + if (emscripten_get_fullscreen_status(&status) == EMSCRIPTEN_RESULT_SUCCESS) + return status.isFullscreen; + return false; -+#elif defined(CARDINAL_TRANSPARENT_SCREENSHOTS) && !defined(DGL_USE_GLES) ++#elif defined(CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS) && defined(CARDINAL_TRANSPARENT_SCREENSHOTS) + return internal->generateScreenshotStep != kScreenshotStepNone; +#else + return false; +#endif } -- - double Window::getMonitorRefreshRate() { - return internal->monitorRefreshRate; + +@@ -702,7 +842,7 @@ + + + double Window::getFrameDurationRemaining() { +- double frameDuration = 1.f / settings::frameRateLimit; ++ double frameDuration = 1.f / internal->monitorRefreshRate; + return frameDuration - (system::getTime() - internal->frameTime); } -@@ -722,14 +833,15 @@ + +@@ -713,14 +853,15 @@ return pair->second; // Load font @@ -1248,7 +1242,7 @@ } internal->fontCache[filename] = font; return font; -@@ -742,14 +854,15 @@ +@@ -733,14 +874,15 @@ return pair->second; // Load image @@ -1267,7 +1261,7 @@ } internal->imageCache[filename] = image; return image; -@@ -766,28 +879,156 @@ +@@ -757,28 +899,156 @@ } @@ -1279,7 +1273,7 @@ - glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_TRUE); - glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE); +void generateScreenshot() { -+#ifndef DGL_USE_GLES ++#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS + APP->window->internal->generateScreenshotStep = kScreenshotStepStarted; #endif +} diff --git a/src/override/diffs/blendish.c.diff b/src/override/diffs/blendish.c.diff index 90a2481b..ee4b10ed 100644 --- a/src/override/diffs/blendish.c.diff +++ b/src/override/diffs/blendish.c.diff @@ -1,5 +1,5 @@ ---- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 19:49:29.973066921 +0100 -+++ blendish.c 2022-09-21 19:41:45.883648777 +0100 +--- ../Rack/dep/oui-blendish/blendish.c 2022-09-21 20:49:29.973066921 +0200 ++++ blendish.c 2022-09-21 20:41:45.883648777 +0200 @@ -61,7 +61,7 @@ } diff --git a/src/override/diffs/common.cpp.diff b/src/override/diffs/common.cpp.diff index 5675f5a7..1531d722 100644 --- a/src/override/diffs/common.cpp.diff +++ b/src/override/diffs/common.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/common.cpp 2022-09-21 19:49:12.199540706 +0100 -+++ common.cpp 2022-12-02 19:11:45.780215974 +0000 +--- ../Rack/src/common.cpp 2023-05-20 17:03:33.006081772 +0200 ++++ common.cpp 2023-05-20 17:51:04.675045244 +0200 @@ -1,12 +1,57 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's common.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -60,7 +60,7 @@ } #endif -@@ -14,20 +59,21 @@ +@@ -14,12 +59,11 @@ namespace rack { @@ -73,17 +73,24 @@ +const std::string APP_EDITION_NAME = "Audio Plugin"; const std::string APP_VERSION_MAJOR = "2"; -const std::string APP_VERSION = TOSTRING(_APP_VERSION); -+const std::string APP_VERSION = "2.1.2"; ++const std::string APP_VERSION = "2.3.0"; #if defined ARCH_WIN const std::string APP_OS = "win"; --#elif ARCH_MAC -+#elif defined ARCH_MAC - const std::string APP_OS = "mac"; + const std::string APP_OS_NAME = "Windows"; +@@ -29,15 +73,10 @@ #elif defined ARCH_LIN const std::string APP_OS = "lin"; + const std::string APP_OS_NAME = "Linux"; +#else + #error ARCH_LIN undefined #endif +-#if defined ARCH_X64 +- const std::string APP_CPU = "x64"; +- const std::string APP_CPU_NAME = "x64"; +-#elif defined ARCH_ARM64 +- const std::string APP_CPU = "arm64"; +- const std::string APP_CPU_NAME = "ARM64"; +-#endif -const std::string API_URL = "https://api.vcvrack.com"; +const std::string API_URL = ""; diff --git a/src/override/diffs/context.cpp.diff b/src/override/diffs/context.cpp.diff index 8b6fa4d4..6b2be580 100644 --- a/src/override/diffs/context.cpp.diff +++ b/src/override/diffs/context.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/context.cpp 2022-09-21 19:49:12.199540706 +0100 -+++ context.cpp 2022-09-21 19:41:45.883648777 +0100 -@@ -1,3 +1,30 @@ +--- ../Rack/src/context.cpp 2023-05-20 17:03:33.006081772 +0200 ++++ context.cpp 2023-05-20 18:08:56.497736615 +0200 +@@ -1,14 +1,44 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's context.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -31,9 +31,10 @@ #include #include #include -@@ -6,9 +33,13 @@ + #include + #include #include - #include +-#include +#ifdef NDEBUG +# undef DEBUG @@ -46,7 +47,17 @@ Context::~Context() { // Deleting NULL is safe in C++. -@@ -44,7 +75,7 @@ +@@ -38,17 +68,13 @@ + INFO("Deleting engine"); + delete engine; + engine = NULL; +- +- INFO("Deleting MIDI loopback"); +- delete midiLoopbackContext; +- midiLoopbackContext = NULL; + } + + static thread_local Context* threadContext = NULL; Context* contextGet() { diff --git a/src/override/diffs/minblep.cpp.diff b/src/override/diffs/minblep.cpp.diff index 5d549e80..def49969 100644 --- a/src/override/diffs/minblep.cpp.diff +++ b/src/override/diffs/minblep.cpp.diff @@ -1,9 +1,9 @@ ---- ../Rack/src/dsp/minblep.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ minblep.cpp 2022-09-21 19:41:45.884648820 +0100 +--- ../Rack/src/dsp/minblep.cpp 2022-09-21 20:49:12.200540736 +0200 ++++ minblep.cpp 2023-05-20 18:21:44.019059009 +0200 @@ -1,3 +1,30 @@ +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -20,7 +20,7 @@ + +/** + * This file is an edited version of VCVRack's dsp/minblep.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as diff --git a/src/override/diffs/plugin.cpp.diff b/src/override/diffs/plugin.cpp.diff index 2a68bf6a..dee7583f 100644 --- a/src/override/diffs/plugin.cpp.diff +++ b/src/override/diffs/plugin.cpp.diff @@ -1,6 +1,6 @@ ---- ../Rack/src/plugin.cpp 2022-09-21 19:49:12.200540736 +0100 -+++ plugin.cpp 2022-11-25 18:24:09.485450570 +0000 -@@ -1,342 +1,41 @@ +--- ../Rack/src/plugin.cpp 2023-05-20 17:03:33.006081772 +0200 ++++ plugin.cpp 2023-05-20 18:43:27.496323540 +0200 +@@ -1,356 +1,46 @@ -#include -#include -#include @@ -20,7 +20,7 @@ -#include +/* + * DISTRHO Cardinal Plugin -+ * Copyright (C) 2021-2022 Filipe Coelho ++ * Copyright (C) 2021-2023 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -37,7 +37,7 @@ + +/** + * This file is an edited version of VCVRack's plugin.cpp -+ * Copyright (C) 2016-2021 VCV. ++ * Copyright (C) 2016-2023 VCV. + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as @@ -133,7 +133,16 @@ -#elif ARCH_MAC - libraryExt = "dylib"; -#endif -- std::string libraryPath = system::join(plugin->path, "plugin." + libraryExt); +- +-#if defined ARCH_X64 +- // Use `plugin.EXT` on x64 for backward compatibility. +- // Change to `plugin-OS-CPU.EXT` in Rack 3. +- std::string libraryFilename = "plugin." + libraryExt; +-#else +- // Use `plugin-CPU.EXT` on other CPUs like ARM64 +- std::string libraryFilename = "plugin-" + APP_CPU + "." + libraryExt; +-#endif +- std::string libraryPath = system::join(plugin->path, libraryFilename); - - // Check file existence - if (!system::isFile(libraryPath)) @@ -227,7 +236,7 @@ - return NULL; - } - -- INFO("Loaded %s v%s", plugin->slug.c_str(), plugin->version.c_str()); +- INFO("Loaded %s %s", plugin->slug.c_str(), plugin->version.c_str()); - plugins.push_back(plugin); - return plugin; -} @@ -372,15 +381,13 @@ /** Given slug => fallback slug. -@@ -348,6 +47,7 @@ - {"VultModules", "VultModulesFree"}, - {"AudibleInstrumentsPreview", "AudibleInstruments"}, - {"SequelSequencers", "DanielDavies"}, -+ {"DelexanderVol1", "DelexandraVol1"}, - // {"", ""}, - }; - -@@ -389,8 +89,19 @@ + Supports bidirectional fallbacks. +-To request fallback slugs to be added to this list, contact VCV support. ++To request fallback slugs to be added to this list, open a GitHub issue. + */ + static const std::map pluginSlugFallbacks = { + {"VultModulesFree", "VultModules"}, +@@ -399,8 +89,19 @@ */ using PluginModuleSlug = std::tuple; static const std::map moduleSlugFallbacks = { @@ -401,7 +408,7 @@ // {{"", ""}, {"", ""}}, }; -@@ -478,7 +189,6 @@ +@@ -488,7 +189,6 @@ } diff --git a/src/override/minblep.cpp b/src/override/minblep.cpp index 6242b0df..fa5bbfe1 100644 --- a/src/override/minblep.cpp +++ b/src/override/minblep.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's dsp/minblep.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/src/override/plugin.cpp b/src/override/plugin.cpp index 058c4b4c..957fe9db 100644 --- a/src/override/plugin.cpp +++ b/src/override/plugin.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,7 @@ /** * This file is an edited version of VCVRack's plugin.cpp - * Copyright (C) 2016-2021 VCV. + * Copyright (C) 2016-2023 VCV. * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -39,7 +39,7 @@ void settingsMergeJson(json_t*) {} /** Given slug => fallback slug. -Correctly handles bidirectional fallbacks. +Supports bidirectional fallbacks. To request fallback slugs to be added to this list, open a GitHub issue. */ static const std::map pluginSlugFallbacks = { From aa90be8d600996c1e191c312af1ac40e1cb5a07d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 20 May 2023 19:48:52 +0200 Subject: [PATCH 352/451] Cleanup, fix initial light mode Signed-off-by: falkTX --- deps/Makefile | 3 --- plugins/Makefile | 2 +- src/custom/RemoteWindow.cpp | 4 ---- src/custom/dep.cpp | 4 ++++ src/override/MenuBar.cpp | 4 ---- src/override/common.cpp | 3 --- 6 files changed, 5 insertions(+), 15 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index c845a97e..68ba1e2f 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -274,9 +274,6 @@ SURGE_CXX_FLAGS += -msse -msse2 -mfpmath=sse endif endif -# same flags as applied to main build -SURGE_CXX_FLAGS += -I$(abspath ../src/Rack/dep/simde) - # possibly use fftw? # ifeq ($(shell $(PKG_CONFIG) --exists fftw3 fftw3f && echo true),true) # SURGE_CXX_FLAGS += -DJUCE_DSP_USE_STATIC_FFTW=1 diff --git a/plugins/Makefile b/plugins/Makefile index 76df0ad9..6d7cf819 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -643,7 +643,7 @@ CATROMODULO_CUSTOM = LowFrequencyOscillator NumDisplayWidget PLUGIN_FILES += $(filter-out cf/src/plugin.cpp,$(wildcard cf/src/*.cpp)) # modules/types which are present in other plugins -CF_CUSTOM = $(DRWAV) ledTrigger +CF_CUSTOM = $(DRWAV) # -------------------------------------------------------------- # dBiz diff --git a/src/custom/RemoteWindow.cpp b/src/custom/RemoteWindow.cpp index e0e9fab9..575f322e 100644 --- a/src/custom/RemoteWindow.cpp +++ b/src/custom/RemoteWindow.cpp @@ -108,10 +108,6 @@ void Window::step() { } -// void Window::activateContext() { -// } - - void Window::screenshot(const std::string&) { } diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index 6c5ba805..c0916d57 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -61,6 +61,9 @@ void updateForcingBlackSilverScrewMode(std::string slug) { } } #endif +namespace plugin { +void updateStaticPluginsDarkMode(); +} namespace settings { bool darkMode = true; int rateLimit = 0; @@ -1483,6 +1486,7 @@ void switchDarkMode(const bool darkMode) settings::darkMode = darkMode; settings::uiTheme = darkMode ? "dark" : "light"; ui::refreshTheme(); + plugin::updateStaticPluginsDarkMode(); for (ExtendedNSVGimage& ext : loadedDarkSVGs) { diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 62bfbacf..1ae8c997 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -67,9 +67,6 @@ std::string patchesPath(); namespace engine { void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); } -namespace plugin { -void updateStaticPluginsDarkMode(); -} namespace app { namespace menuBar { @@ -565,7 +562,6 @@ struct ViewButton : MenuButton { darkModeText = CHECKMARK_STRING; menu->addChild(createMenuItem("Dark Mode", darkModeText, []() { switchDarkMode(!settings::darkMode); - plugin::updateStaticPluginsDarkMode(); setAllFramebufferWidgetsDirty(APP->scene); })); diff --git a/src/override/common.cpp b/src/override/common.cpp index 32b9962b..336034b8 100644 --- a/src/override/common.cpp +++ b/src/override/common.cpp @@ -66,13 +66,10 @@ const std::string APP_VERSION_MAJOR = "2"; const std::string APP_VERSION = "2.3.0"; #if defined ARCH_WIN const std::string APP_OS = "win"; - const std::string APP_OS_NAME = "Windows"; #elif defined ARCH_MAC const std::string APP_OS = "mac"; - const std::string APP_OS_NAME = "macOS"; #elif defined ARCH_LIN const std::string APP_OS = "lin"; - const std::string APP_OS_NAME = "Linux"; #else #error ARCH_LIN undefined #endif From f74e57370d92841f2a10be084cb0e187fafda2f9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 20 May 2023 20:11:45 +0200 Subject: [PATCH 353/451] Force build Signed-off-by: falkTX --- .github/workflows/build.yml | 8 +++----- deps/Makefile | 9 +++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ecb1fe7..0cefb40f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,6 @@ jobs: src/Rack/dep/jansson-2.12 src/Rack/dep/libarchive-3.4.3 src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: linux-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess @@ -191,9 +190,11 @@ jobs: src/Rack/dep/jansson-2.12 src/Rack/dep/libarchive-3.4.3 src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }} + - name: Setup dependencies + run: | + brew install autoconf - name: Build extra dependencies run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" @@ -325,7 +326,6 @@ jobs: src/Rack/dep/jansson-2.12 src/Rack/dep/libarchive-3.4.3 src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: wasm-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Set up dependencies @@ -421,7 +421,6 @@ jobs: src/Rack/dep/jansson-2.12 src/Rack/dep/libarchive-3.4.3 src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Fix GitHub's mess @@ -606,7 +605,6 @@ jobs: src/Rack/dep/jansson-2.12 src/Rack/dep/libarchive-3.4.3 src/Rack/dep/libsamplerate-0.1.9 - src/Rack/dep/speexdsp-SpeexDSP-1.2rc3 src/Rack/dep/zstd-1.4.5 key: pluginval-v${{ env.CACHE_VERSION }} - name: Set up dependencies diff --git a/deps/Makefile b/deps/Makefile index 68ba1e2f..5bfb6a63 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -12,15 +12,16 @@ include $(ROOT)/Makefile.base.mk ifeq ($(CPU_ARM32),true) ARCH_NAME = arm -MACHINE = i686-the-rack +MACHINE = arm64 else ifeq ($(CPU_ARM64),true) ARCH_NAME = arm64 -MACHINE = x86_64-the-rack +MACHINE = arm64 else ifeq ($(CPU_RISCV64),true) ARCH_NAME = riscv64 -MACHINE = x86_64-the-rack +MACHINE = arm64 else ifeq ($(WASM),true) -MACHINE = i686-wasm +ARCH_NAME = wasm +MACHINE = x86_64 else MACHINE = $(TARGET_MACHINE) endif From 5b30b29194733f9ae1d02fd8bb24e2b238cfd66d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 20 May 2023 22:32:09 +0200 Subject: [PATCH 354/451] Update carla, add plugin scanning and presets to Ildaeil Signed-off-by: falkTX --- carla | 2 +- deps/Makefile | 3 + plugins/Cardinal/src/Ildaeil.cpp | 702 +++++++++++++++++++++++-------- 3 files changed, 537 insertions(+), 170 deletions(-) diff --git a/carla b/carla index e58f7a8c..e924e19f 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit e58f7a8c7a8797656747b11a2608fc8b6ec90b8e +Subproject commit e924e19f25367d5009e0e068b59d9f46794ac41b diff --git a/deps/Makefile b/deps/Makefile index 5bfb6a63..67880ad2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -16,6 +16,9 @@ MACHINE = arm64 else ifeq ($(CPU_ARM64),true) ARCH_NAME = arm64 MACHINE = arm64 +else ifeq ($(CPU_I386),true) +ARCH_NAME = i686 +MACHINE = x86_64 else ifeq ($(CPU_RISCV64),true) ARCH_NAME = riscv64 MACHINE = arm64 diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 50fc1beb..3ee4f9d8 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -34,6 +34,8 @@ # include "extra/Mutex.hpp" # include "extra/Runner.hpp" # include "extra/ScopedPointer.hpp" +# include "water/files/FileInputStream.h" +# include "water/files/FileOutputStream.h" # include "../../src/extra/SharedResourcePointer.hpp" #else # include "extra/Mutex.hpp" @@ -62,6 +64,7 @@ enum SpecialPath { kSpecialPathCommonProgramFiles, kSpecialPathProgramFiles, kSpecialPathAppData, + kSpecialPathMyDocuments, }; std::string getSpecialPath(const SpecialPath type); #endif @@ -106,12 +109,149 @@ static void host_ui_custom_data_changed(NativeHostHandle handle, const char* key static void host_ui_closed(NativeHostHandle handle); static const char* host_ui_open_file(NativeHostHandle handle, bool isDir, const char* title, const char* filter); static const char* host_ui_save_file(NativeHostHandle handle, bool isDir, const char* title, const char* filter); -static intptr_t host_dispatcher(NativeHostHandle handle, NativeHostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); +static intptr_t host_dispatcher(NativeHostHandle h, NativeHostDispatcherOpcode op, int32_t, intptr_t, void*, float); static void projectLoadedFromDSP(void* ui); // -------------------------------------------------------------------------------------------------------------------- -static Mutex sPluginInfoLoadMutex; +static const char* getPathForLADSPA() +{ + static std::string path; + + if (path.empty()) + { + #if defined(CARLA_OS_HAIKU) + path = homeDir() + "/.ladspa:/system/add-ons/media/ladspaplugins:/system/lib/ladspa"; + #elif defined(CARLA_OS_MAC) + path = homeDir() + "/Library/Audio/Plug-Ins/LADSPA:/Library/Audio/Plug-Ins/LADSPA"; + #elif defined(CARLA_OS_WASM) + path = "/ladspa"; + #elif defined(CARLA_OS_WIN) + path = getSpecialPath(kSpecialPathAppData) + "\\LADSPA;"; + path += getSpecialPath(kSpecialPathProgramFiles) + "\\LADSPA"; + #else + path = homeDir() + "/.ladspa:/usr/lib/ladspa:/usr/local/lib/ladspa"; + #endif + } + + return path.c_str(); +} + +static const char* getPathForDSSI() +{ + static std::string path; + + if (path.empty()) + { + #if defined(CARLA_OS_HAIKU) + path = homeDir() + "/.dssi:/system/add-ons/media/dssiplugins:/system/lib/dssi"; + #elif defined(CARLA_OS_MAC) + path = homeDir() + "/Library/Audio/Plug-Ins/DSSI:/Library/Audio/Plug-Ins/DSSI"; + #elif defined(CARLA_OS_WASM) + path = "/dssi"; + #elif defined(CARLA_OS_WIN) + path = getSpecialPath(kSpecialPathAppData) + "\\DSSI;"; + path += getSpecialPath(kSpecialPathProgramFiles) + "\\DSSI"; + #else + path = homeDir() + "/.dssi:/usr/lib/dssi:/usr/local/lib/dssi"; + #endif + } + + return path.c_str(); +} + +static const char* getPathForLV2() +{ + static std::string path; + + if (path.empty()) + { + #if defined(CARLA_OS_HAIKU) + path = homeDir() + "/.lv2:/system/add-ons/media/lv2plugins"; + #elif defined(CARLA_OS_MAC) + path = homeDir() + "/Library/Audio/Plug-Ins/LV2:/Library/Audio/Plug-Ins/LV2"; + #elif defined(CARLA_OS_WASM) + path = "/lv2"; + #elif defined(CARLA_OS_WIN) + path = getSpecialPath(kSpecialPathAppData) + "\\LV2;"; + path += getSpecialPath(kSpecialPathCommonProgramFiles) + "\\LV2"; + #else + path = homeDir() + "/.lv2:/usr/lib/lv2:/usr/local/lib/lv2"; + #endif + } + + return path.c_str(); +} + +static const char* getPathForVST2() +{ + static std::string path; + + if (path.empty()) + { + #if defined(CARLA_OS_HAIKU) + path = homeDir() + "/.vst:/system/add-ons/media/vstplugins"; + #elif defined(CARLA_OS_MAC) + path = homeDir() + "/Library/Audio/Plug-Ins/VST:/Library/Audio/Plug-Ins/VST"; + #elif defined(CARLA_OS_WASM) + path = "/vst"; + #elif defined(CARLA_OS_WIN) + path = getSpecialPath(kSpecialPathProgramFiles) + "\\VstPlugins;"; + path += getSpecialPath(kSpecialPathProgramFiles) + "\\Steinberg\\VstPlugins;"; + path += getSpecialPath(kSpecialPathCommonProgramFiles) + "\\VST2"; + #else + path = homeDir() + "/.vst:/usr/lib/vst:/usr/local/lib/vst"; + #endif + } + + return path.c_str(); +} + +static const char* getPathForVST3() +{ + static std::string path; + + if (path.empty()) + { + #if defined(CARLA_OS_HAIKU) + path = homeDir() + "/.vst3:/system/add-ons/media/dssiplugins"; + #elif defined(CARLA_OS_MAC) + path = homeDir() + "/Library/Audio/Plug-Ins/VST3:/Library/Audio/Plug-Ins/VST3"; + #elif defined(CARLA_OS_WASM) + path = "/vst3"; + #elif defined(CARLA_OS_WIN) + path = getSpecialPath(kSpecialPathAppData) + "\\VST3;"; + path += getSpecialPath(kSpecialPathCommonProgramFiles) + "\\VST3"; + #else + path = homeDir() + "/.vst3:/usr/lib/vst3:/usr/local/lib/vst3"; + #endif + } + + return path.c_str(); +} + +static const char* getPathForCLAP() +{ + static std::string path; + + if (path.empty()) + { + #if defined(CARLA_OS_HAIKU) + path = homeDir() + "/.clap:/system/add-ons/media/clapplugins"; + #elif defined(CARLA_OS_MAC) + path = homeDir() + "/Library/Audio/Plug-Ins/CLAP:/Library/Audio/Plug-Ins/CLAP"; + #elif defined(CARLA_OS_WASM) + path = "/clap"; + #elif defined(CARLA_OS_WIN) + path = getSpecialPath(kSpecialPathAppData) + "\\CLAP;"; + path += getSpecialPath(kSpecialPathCommonProgramFiles) + "\\CLAP"; + #else + path = homeDir() + "/.clap:/usr/lib/clap:/usr/local/lib/clap"; + #endif + } + + return path.c_str(); +} static const char* getPathForJSFX() { @@ -139,6 +279,45 @@ static const char* getPathForJSFX() return path.c_str(); } +static const char* getPluginPath(const PluginType ptype) +{ + switch (ptype) + { + case PLUGIN_LADSPA: + if (const char* const path = std::getenv("LADSPA_PATH")) + return path; + return getPathForLADSPA(); + case PLUGIN_DSSI: + if (const char* const path = std::getenv("DSSI_PATH")) + return path; + return getPathForDSSI(); + case PLUGIN_LV2: + if (const char* const path = std::getenv("LV2_PATH")) + return path; + return getPathForLV2(); + case PLUGIN_VST2: + if (const char* const path = std::getenv("VST_PATH")) + return path; + return getPathForVST2(); + case PLUGIN_VST3: + if (const char* const path = std::getenv("VST3_PATH")) + return path; + return getPathForVST3(); + case PLUGIN_CLAP: + if (const char* const path = std::getenv("CLAP_PATH")) + return path; + return getPathForCLAP(); + case PLUGIN_JSFX: + return getPathForJSFX(); + default: + return nullptr; + } +} + +// -------------------------------------------------------------------------------------------------------------------- + +static Mutex sPluginInfoLoadMutex; + /* #ifndef HEADLESS struct JuceInitializer { @@ -182,6 +361,8 @@ struct IldaeilModule : Module { NativeTimeInfo fCarlaTimeInfo; + CarlaString fDiscoveryTool; + void* fUI = nullptr; bool canUseBridges = true; @@ -250,6 +431,7 @@ struct IldaeilModule : Module { if (system::exists(winBinaryDir)) { const std::string winResourceDir = system::join(winBinaryDir, "resources"); + fDiscoveryTool = winBinaryDir.c_str(); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, winBinaryDir.c_str()); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, winResourceDir.c_str()); } @@ -257,11 +439,13 @@ struct IldaeilModule : Module { #if defined(CARLA_OS_MAC) if (system::exists("~/Applications/Carla.app")) { + fDiscoveryTool = "~/Applications/Carla.app/Contents/MacOS"; carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "~/Applications/Carla.app/Contents/MacOS"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "~/Applications/Carla.app/Contents/MacOS/resources"); } else if (system::exists("/Applications/Carla.app")) { + fDiscoveryTool = "/Applications/Carla.app/Contents/MacOS"; carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/Applications/Carla.app/Contents/MacOS"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/Applications/Carla.app/Contents/MacOS/resources"); } @@ -272,11 +456,13 @@ struct IldaeilModule : Module { #endif else if (system::exists("/usr/local/lib/carla")) { + fDiscoveryTool = "/usr/local/lib/carla"; carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/usr/local/lib/carla"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/local/share/carla/resources"); } else if (system::exists("/usr/lib/carla")) { + fDiscoveryTool = "/usr/lib/carla"; carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/usr/lib/carla"); carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/share/carla/resources"); } @@ -289,18 +475,31 @@ struct IldaeilModule : Module { if (! warningShown) { warningShown = true; - async_dialog_message("Carla is not installed on this system, bridged plugins will not work"); + async_dialog_message("Carla is not installed on this system, plugin discovery will not work"); } } - if (const char* const path = std::getenv("LV2_PATH")) - carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, path); + if (fDiscoveryTool.isNotEmpty()) + { + fDiscoveryTool += DISTRHO_OS_SEP_STR "carla-discovery-native"; + #ifdef CARLA_OS_WIN + fDiscoveryTool += ".exe"; + #endif + carla_stdout("Using discovery tool: %s", fDiscoveryTool.buffer()); + } - carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_JSFX, getPathForJSFX()); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LADSPA, getPluginPath(PLUGIN_LADSPA)); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, getPluginPath(PLUGIN_DSSI)); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, getPluginPath(PLUGIN_LV2)); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, getPluginPath(PLUGIN_VST2)); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, getPluginPath(PLUGIN_VST3)); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_CLAP, getPluginPath(PLUGIN_CLAP)); + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PLUGIN_PATH, PLUGIN_JSFX, getPluginPath(PLUGIN_JSFX)); -#ifdef CARLA_OS_MAC + #ifdef CARLA_OS_MAC + // cannot set transient window hints for UI bridges on macOS, so disable them carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PREFER_UI_BRIDGES, 0, nullptr); -#endif + #endif fCarlaPluginDescriptor->dispatcher(fCarlaPluginHandle, NATIVE_PLUGIN_OPCODE_HOST_USES_EMBED, 0, 0, nullptr, 0.0f); @@ -367,11 +566,11 @@ struct IldaeilModule : Module { engine->saveProjectInternal(projectState); const size_t dataSize = projectState.getDataSize(); -#ifndef CARDINAL_SYSDEPS + #ifndef CARDINAL_SYSDEPS return jsonp_stringn_nocheck_own(static_cast(projectState.getDataAndRelease()), dataSize); -#else + #else return json_stringn(static_cast(projectState.getData()), dataSize); -#endif + #endif } void dataFromJson(json_t* const rootJ) override @@ -464,9 +663,10 @@ struct IldaeilModule : Module { NativeMidiEvent* midiEvents; uint midiEventCount; - if (CardinalExpanderFromCVToCarlaMIDI* const midiInExpander = leftExpander.module != nullptr && leftExpander.module->model == modelExpanderInputMIDI - ? static_cast(leftExpander.module) - : nullptr) + if (CardinalExpanderFromCVToCarlaMIDI* const midiInExpander + = leftExpander.module != nullptr && leftExpander.module->model == modelExpanderInputMIDI + ? static_cast(leftExpander.module) + : nullptr) { midiEvents = midiInExpander->midiEvents; midiEventCount = midiInExpander->midiEventCount; @@ -595,18 +795,11 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { static constexpr const uint kButtonHeight = 20; struct PluginInfoCache { - char* name; - char* label; - - PluginInfoCache() - : name(nullptr), - label(nullptr) {} - - ~PluginInfoCache() - { - std::free(name); - std::free(label); - } + BinaryType btype; + uint64_t uniqueId; + std::string filename; + std::string name; + std::string label; }; struct PluginGenericUI { @@ -636,17 +829,35 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { }* parameters; float* values; + uint presetCount; + struct Preset { + uint32_t index; + char* name; + ~Preset() + { + std::free(name); + } + }* presets; + int currentPreset; + const char** presetStrings; + PluginGenericUI() : title(nullptr), parameterCount(0), parameters(nullptr), - values(nullptr) {} + values(nullptr), + presetCount(0), + presets(nullptr), + currentPreset(-1), + presetStrings(nullptr) {} ~PluginGenericUI() { std::free(title); delete[] parameters; delete[] values; + delete[] presets; + delete[] presetStrings; } }; @@ -675,14 +886,17 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { struct RunnerData { bool needsReinit = true; - uint pluginCount = 0; - uint pluginIndex = 0; + CarlaPluginDiscoveryHandle handle = nullptr; void init() { needsReinit = true; - pluginCount = 0; - pluginIndex = 0; + + if (handle != nullptr) + { + carla_plugin_discovery_stop(handle); + handle = nullptr; + } } } fRunnerData; @@ -694,13 +908,14 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { PluginType fNextPluginType = fPluginType; uint fPluginCount = 0; int fPluginSelected = -1; - bool fPluginScanningFinished = false; bool fPluginHasCustomUI = false; bool fPluginHasFileOpen = false; bool fPluginHasOutputParameters = false; bool fPluginRunning = false; bool fPluginWillRunInBridgeMode = false; - PluginInfoCache* fPlugins = nullptr; + Mutex fPluginsMutex; + PluginInfoCache fCurrentPluginInfo; + std::vector fPlugins; ScopedPointer fPluginGenericUI; bool fPluginSearchActive = false; @@ -758,8 +973,6 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { stopRunner(); fPluginGenericUI = nullptr; - - delete[] fPlugins; } bool checkIfPluginIsLoaded() @@ -872,10 +1085,10 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { fPluginHasOutputParameters = false; - const uint32_t pcount = ui->parameterCount = carla_get_parameter_count(handle, 0); + const uint32_t parameterCount = ui->parameterCount = carla_get_parameter_count(handle, 0); // make count of valid parameters - for (uint32_t i=0; i < pcount; ++i) + for (uint32_t i=0; i < parameterCount; ++i) { const ParameterData* const pdata = carla_get_parameter_data(handle, 0, i); @@ -893,7 +1106,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { ui->values = new float[ui->parameterCount]; // now safely fill in details - for (uint32_t i=0, j=0; i < pcount; ++i) + for (uint32_t i=0, j=0; i < parameterCount; ++i) { const ParameterData* const pdata = carla_get_parameter_data(handle, 0, i); @@ -932,6 +1145,41 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { ++j; } + // handle presets too + const uint32_t presetCount = ui->presetCount = carla_get_program_count(handle, 0); + + for (uint32_t i=0; i < presetCount; ++i) + { + const char* const pname = carla_get_program_name(handle, 0, i); + + if (pname[0] == '\0') + { + --ui->presetCount; + continue; + } + } + + ui->presets = new PluginGenericUI::Preset[ui->presetCount]; + ui->presetStrings = new const char*[ui->presetCount]; + + for (uint32_t i=0, j=0; i < presetCount; ++i) + { + const char* const pname = carla_get_program_name(handle, 0, i); + + if (pname[0] == '\0') + continue; + + PluginGenericUI::Preset& preset(ui->presets[j]); + preset.index = i; + preset.name = strdup(pname); + + ui->presetStrings[j] = preset.name; + + ++j; + } + + ui->currentPreset = -1; + fPluginGenericUI = ui; } @@ -949,7 +1197,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { } } - void loadPlugin(const CarlaHostHandle handle, const char* const label) + bool loadPlugin(const CarlaHostHandle handle, const PluginInfoCache& info) { if (fPluginRunning) { @@ -959,24 +1207,33 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { carla_set_engine_option(handle, ENGINE_OPTION_PREFER_PLUGIN_BRIDGES, fPluginWillRunInBridgeMode, nullptr); + setDirty(true); + const MutexLocker cml(sPluginInfoLoadMutex); - if (carla_add_plugin(handle, BINARY_NATIVE, fPluginType, nullptr, nullptr, - label, 0, 0x0, PLUGIN_OPTIONS_NULL)) + if (carla_add_plugin(handle, + info.btype, + fPluginType, + info.filename.c_str(), + info.name.c_str(), + info.label.c_str(), + info.uniqueId, + nullptr, + PLUGIN_OPTIONS_NULL)) { fPluginRunning = true; fPluginGenericUI = nullptr; fPluginFilename.clear(); createOrUpdatePluginGenericUI(handle); + return true; } else { fPopupError = carla_get_last_error(handle); d_stdout("got error: %s", fPopupError.buffer()); fDrawingState = kDrawingPluginError; + return false; } - - setDirty(true); } void loadFileAsPlugin(const CarlaHostHandle handle, const char* const filename) @@ -1123,7 +1380,7 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { if (fPluginFilename.isNotEmpty()) loadFileAsPlugin(handle, fPluginFilename.buffer()); else - loadPlugin(handle, carla_get_plugin_info(handle, 0)->label); + loadPlugin(handle, fCurrentPluginInfo); break; case kIdleOpenFileUI: @@ -1180,32 +1437,16 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { DISTRHO_SAFE_ASSERT_RETURN(fPluginSelected >= 0,); - const PluginInfoCache& info(fPlugins[fPluginSelected]); - - const char* label = nullptr; - - switch (fPluginType) + PluginInfoCache info; { - case PLUGIN_INTERNAL: - case PLUGIN_AU: - case PLUGIN_JSFX: - case PLUGIN_SFZ: - label = info.label; - break; - case PLUGIN_LV2: { - const char* const slash = std::strchr(info.label, DISTRHO_OS_SEP); - DISTRHO_SAFE_ASSERT_RETURN(slash != nullptr,); - label = slash+1; - break; - } - default: - break; + const MutexLocker cml(fPluginsMutex); + info = fPlugins[fPluginSelected]; } - DISTRHO_SAFE_ASSERT_RETURN(label != nullptr,); + d_stdout("Loading %s...", info.name.c_str()); - d_stdout("Loading %s...", info.name); - loadPlugin(handle, label); + if (loadPlugin(handle, info)) + fCurrentPluginInfo = info; } bool initAndStartRunner() @@ -1223,30 +1464,18 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { fRunnerData.needsReinit = false; - const char* path; - switch (fPluginType) { - case PLUGIN_LV2: - path = std::getenv("LV2_PATH"); - break; - case PLUGIN_JSFX: - path = getPathForJSFX(); - break; - default: - path = nullptr; - break; + const MutexLocker cml(fPluginsMutex); + fPlugins.clear(); } - fPluginCount = 0; - delete[] fPlugins; - - { - const MutexLocker cml(sPluginInfoLoadMutex); - - d_stdout("Will scan plugins now..."); - fRunnerData.pluginCount = carla_get_cached_plugin_count(fPluginType, path); - d_stdout("Scanning found %u plugins", fRunnerData.pluginCount); - } + d_stdout("Will scan plugins now..."); + fRunnerData.handle = carla_plugin_discovery_start(module->fDiscoveryTool, + fPluginType, + getPluginPath(fPluginType), + _binaryPluginSearchCallback, + _binaryPluginCheckCacheCallback, + this); if (fDrawingState == kDrawingLoading) { @@ -1254,70 +1483,188 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { fPluginSearchFirstShow = true; } - if (fRunnerData.pluginCount != 0) + if (fRunnerData.handle == nullptr) { - fPlugins = new PluginInfoCache[fRunnerData.pluginCount]; - fPluginScanningFinished = false; - return true; + d_stdout("Nothing found!"); + return false; + } + } + + DISTRHO_SAFE_ASSERT_RETURN(fRunnerData.handle != nullptr, false); + + if (carla_plugin_discovery_idle(fRunnerData.handle)) + return true; + + // stop here + d_stdout("Found %lu plugins!", (ulong)fPlugins.size()); + carla_plugin_discovery_stop(fRunnerData.handle); + fRunnerData.handle = nullptr; + + return false; + } + + void binaryPluginSearchCallback(const CarlaPluginDiscoveryInfo* const info, const char* const sha1sum) + { + // save plugin info into cache + if (sha1sum != nullptr) + { + const water::String configDir(asset::config("Ildaeil")); + const water::File cacheFile(configDir + CARLA_OS_SEP_STR "cache" CARLA_OS_SEP_STR + sha1sum); + + if (cacheFile.create().ok()) + { + water::FileOutputStream stream(cacheFile); + + if (stream.openedOk()) + { + if (info != nullptr) + { + stream.writeString(getBinaryTypeAsString(info->btype)); + stream.writeString(getPluginTypeAsString(info->ptype)); + stream.writeString(info->filename); + stream.writeString(info->label); + stream.writeInt64(info->uniqueId); + stream.writeString(info->metadata.name); + stream.writeString(info->metadata.maker); + stream.writeString(getPluginCategoryAsString(info->metadata.category)); + stream.writeInt(info->metadata.hints); + stream.writeCompressedInt(info->io.audioIns); + stream.writeCompressedInt(info->io.audioOuts); + stream.writeCompressedInt(info->io.cvIns); + stream.writeCompressedInt(info->io.cvOuts); + stream.writeCompressedInt(info->io.midiIns); + stream.writeCompressedInt(info->io.midiOuts); + stream.writeCompressedInt(info->io.parameterIns); + stream.writeCompressedInt(info->io.parameterOuts); + } + } + else + { + d_stderr("Failed to write cache file for %s", sha1sum); + } } else { - fPlugins = nullptr; - fPluginScanningFinished = true; - return false; + d_stderr("Failed to write cache file directories for %s", sha1sum); } } - const uint index = fRunnerData.pluginIndex++; - DISTRHO_SAFE_ASSERT_UINT2_RETURN(index < fRunnerData.pluginCount, - index, fRunnerData.pluginCount, false); + if (info == nullptr) + return; - do { - const MutexLocker cml(sPluginInfoLoadMutex); + if (info->io.cvIns != 0 || info->io.cvOuts != 0) + return; + if (info->io.midiIns != 0 && info->io.midiIns != 1) + return; + if (info->io.midiOuts != 0 && info->io.midiOuts != 1) + return; - const CarlaCachedPluginInfo* const info = carla_get_cached_plugin_info(fPluginType, index); - DISTRHO_SAFE_ASSERT_CONTINUE(info != nullptr); + if (fPluginType == PLUGIN_INTERNAL) + { + if (std::strcmp(info->label, "audiogain") == 0) + return; + if (std::strcmp(info->label, "cv2audio") == 0) + return; + if (std::strcmp(info->label, "lfo") == 0) + return; + if (std::strcmp(info->label, "midi2cv") == 0) + return; + if (std::strcmp(info->label, "midithrough") == 0) + return; + if (std::strcmp(info->label, "3bandsplitter") == 0) + return; + } - if (! info->valid) - break; - if (info->audioIns > 2) - break; - if (info->midiIns != 0 && info->midiIns != 1) - break; - if (info->midiOuts != 0 && info->midiOuts != 1) - break; + const PluginInfoCache pinfo = { + info->btype, + info->uniqueId, + info->filename, + info->metadata.name, + info->label, + }; - if (fPluginType == PLUGIN_INTERNAL) + const MutexLocker cml(fPluginsMutex); + fPlugins.push_back(pinfo); + } + + static void _binaryPluginSearchCallback(void* const ptr, + const CarlaPluginDiscoveryInfo* const info, + const char* const sha1sum) + { + static_cast(ptr)->binaryPluginSearchCallback(info, sha1sum); + } + + bool binaryPluginCheckCacheCallback(const char* const filename, const char* const sha1sum) + { + if (sha1sum == nullptr) + return false; + + const water::String configDir(asset::config("Ildaeil")); + const water::File cacheFile(configDir + CARLA_OS_SEP_STR "cache" CARLA_OS_SEP_STR + sha1sum); + + if (cacheFile.existsAsFile()) + { + water::FileInputStream stream(cacheFile); + + if (stream.openedOk()) { - if (std::strcmp(info->label, "audiogain_s") == 0) - break; - if (std::strcmp(info->label, "cv2audio") == 0) - break; - if (std::strcmp(info->label, "lfo") == 0) - break; - if (std::strcmp(info->label, "midi2cv") == 0) - break; - if (std::strcmp(info->label, "midithrough") == 0) - break; - if (std::strcmp(info->label, "3bandsplitter") == 0) - break; - } + while (! stream.isExhausted()) + { + CarlaPluginDiscoveryInfo info = {}; + + // read back everything the same way and order as we wrote it + info.btype = getBinaryTypeFromString(stream.readString().toRawUTF8()); + info.ptype = getPluginTypeFromString(stream.readString().toRawUTF8()); + const water::String pfilename(stream.readString()); + const water::String label(stream.readString()); + info.uniqueId = stream.readInt64(); + const water::String name(stream.readString()); + const water::String maker(stream.readString()); + info.metadata.category = getPluginCategoryFromString(stream.readString().toRawUTF8()); + info.metadata.hints = stream.readInt(); + info.io.audioIns = stream.readCompressedInt(); + info.io.audioOuts = stream.readCompressedInt(); + info.io.cvIns = stream.readCompressedInt(); + info.io.cvOuts = stream.readCompressedInt(); + info.io.midiIns = stream.readCompressedInt(); + info.io.midiOuts = stream.readCompressedInt(); + info.io.parameterIns = stream.readCompressedInt(); + info.io.parameterOuts = stream.readCompressedInt(); + + // string stuff + info.filename = pfilename.toRawUTF8(); + info.label = label.toRawUTF8(); + info.metadata.name = name.toRawUTF8(); + info.metadata.maker = maker.toRawUTF8(); + + // check sha1 collisions + if (pfilename != filename) + { + d_stderr("Cache hash collision for %s: \"%s\" vs \"%s\"", + sha1sum, pfilename.toRawUTF8(), filename); + return false; + } - const uint pindex = fPluginCount; - fPlugins[pindex].name = strdup(info->name); - fPlugins[pindex].label = strdup(info->label); - ++fPluginCount; - } while (false); + // purposefully not passing sha1sum, to not override cache file + binaryPluginSearchCallback(&info, nullptr); + } - // run again - if (fRunnerData.pluginIndex != fRunnerData.pluginCount) - return true; + return true; + } + else + { + d_stderr("Failed to read cache file for %s", sha1sum); + } + } - // stop here - fPluginScanningFinished = true; return false; } + static bool _binaryPluginCheckCacheCallback(void* const ptr, const char* const filename, const char* const sha1) + { + return static_cast(ptr)->binaryPluginCheckCacheCallback(filename, sha1); + } + void drawImGui() override { switch (fDrawingState) @@ -1470,6 +1817,19 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { const CarlaHostHandle handle = module->fCarlaHostHandle; + if (ui->presetCount != 0) + { + ImGui::Text("Preset:"); + ImGui::SameLine(); + + if (ImGui::Combo("##presets", &ui->currentPreset, ui->presetStrings, ui->presetCount)) + { + PluginGenericUI::Preset& preset(ui->presets[ui->currentPreset]); + + carla_set_program(handle, 0, preset.index); + } + } + for (uint32_t i=0; i < ui->parameterCount; ++i) { PluginGenericUI::Parameter& param(ui->parameters[i]); @@ -1541,7 +1901,12 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { static const char* pluginTypes[] = { getPluginTypeAsString(PLUGIN_INTERNAL), + getPluginTypeAsString(PLUGIN_LADSPA), + getPluginTypeAsString(PLUGIN_DSSI), getPluginTypeAsString(PLUGIN_LV2), + getPluginTypeAsString(PLUGIN_VST2), + getPluginTypeAsString(PLUGIN_VST3), + getPluginTypeAsString(PLUGIN_CLAP), getPluginTypeAsString(PLUGIN_JSFX), "Load from file..." }; @@ -1589,15 +1954,14 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { int current; switch (fPluginType) { - case PLUGIN_JSFX: - current = 2; - break; - case PLUGIN_LV2: - current = 1; - break; - default: - current = 0; - break; + case PLUGIN_JSFX: current = 7; break; + case PLUGIN_CLAP: current = 6; break; + case PLUGIN_VST3: current = 5; break; + case PLUGIN_VST2: current = 4; break; + case PLUGIN_LV2: current = 3; break; + case PLUGIN_DSSI: current = 2; break; + case PLUGIN_LADSPA: current = 1; break; + default: current = 0; break; } if (ImGui::Combo("##plugintypes", ¤t, pluginTypes, ARRAY_SIZE(pluginTypes))) @@ -1605,22 +1969,19 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { fIdleState = kIdleChangePluginType; switch (current) { - case 0: - fNextPluginType = PLUGIN_INTERNAL; - break; - case 1: - fNextPluginType = PLUGIN_LV2; - break; - case 2: - fNextPluginType = PLUGIN_JSFX; - break; - case 3: - fNextPluginType = PLUGIN_TYPE_COUNT; - break; + case 0: fNextPluginType = PLUGIN_INTERNAL; break; + case 1: fNextPluginType = PLUGIN_LADSPA; break; + case 2: fNextPluginType = PLUGIN_DSSI; break; + case 3: fNextPluginType = PLUGIN_LV2; break; + case 4: fNextPluginType = PLUGIN_VST2; break; + case 5: fNextPluginType = PLUGIN_VST3; break; + case 6: fNextPluginType = PLUGIN_CLAP; break; + case 7: fNextPluginType = PLUGIN_JSFX; break; + case 8: fNextPluginType = PLUGIN_TYPE_COUNT; break; } } - ImGui::BeginDisabled(!fPluginScanningFinished || fPluginSelected < 0); + ImGui::BeginDisabled(fPluginSelected < 0); if (ImGui::Button("Load Plugin")) fIdleState = kIdleLoadSelectedPlugin; @@ -1653,8 +2014,6 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { case PLUGIN_INTERNAL: case PLUGIN_AU: - case PLUGIN_SFZ: - case PLUGIN_JSFX: ImGui::TableSetupColumn("Name"); ImGui::TableSetupColumn("Label"); ImGui::TableHeadersRow(); @@ -1665,14 +2024,19 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { ImGui::TableHeadersRow(); break; default: + ImGui::TableSetupColumn("Name"); + ImGui::TableSetupColumn("Filename"); + ImGui::TableHeadersRow(); break; } - for (uint i=0; i= 0 && static_cast(fPluginSelected) == i; @@ -1681,25 +2045,25 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Runner { { case PLUGIN_INTERNAL: case PLUGIN_AU: - case PLUGIN_JSFX: - case PLUGIN_SFZ: ImGui::TableNextRow(); ImGui::TableSetColumnIndex(0); - ImGui::Selectable(info.name, &selected); + ImGui::Selectable(info.name.c_str(), &selected); ImGui::TableSetColumnIndex(1); - ImGui::Selectable(info.label, &selected); + ImGui::Selectable(info.label.c_str(), &selected); break; - case PLUGIN_LV2: { - const char* const slash = std::strchr(info.label, DISTRHO_OS_SEP); - DISTRHO_SAFE_ASSERT_CONTINUE(slash != nullptr); + case PLUGIN_LV2: ImGui::TableNextRow(); ImGui::TableSetColumnIndex(0); - ImGui::Selectable(info.name, &selected); + ImGui::Selectable(info.name.c_str(), &selected); ImGui::TableSetColumnIndex(1); - ImGui::Selectable(slash+1, &selected); + ImGui::Selectable(info.label.c_str(), &selected); break; - } default: + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::Selectable(info.name.c_str(), &selected); + ImGui::TableSetColumnIndex(1); + ImGui::Selectable(info.filename.c_str(), &selected); break; } From 9c1cf3b44136938a57192ba6a033751dacc666ae Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 01:47:58 +0200 Subject: [PATCH 355/451] CI: add automake for macOS build Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0cefb40f..84a45213 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -194,7 +194,7 @@ jobs: key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Setup dependencies run: | - brew install autoconf + brew install autoconf automake - name: Build extra dependencies run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" From 42de7277a30e46d451723659c56748ca0b53aa93 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 02:06:34 +0200 Subject: [PATCH 356/451] Fix wasm-nosimd build Signed-off-by: falkTX --- Makefile.base.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.base.mk b/Makefile.base.mk index 24852bd5..23d58023 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -157,8 +157,10 @@ endif # needed for enabling SSE in pffft ifeq ($(CPU_I386),true) +ifneq ($(NOSIMD),true) BASE_FLAGS += -Di386 endif +endif # SIMD must always be enabled, even in debug builds ifneq ($(NOSIMD),true) From 9542ea98ac3b82250908d7baa489b709fd3407be Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 02:08:04 +0200 Subject: [PATCH 357/451] Remove ildaeil from wasm builds Signed-off-by: falkTX --- plugins/Makefile | 2 +- plugins/plugins.cpp | 4 ++-- src/Makefile.cardinal.mk | 10 ---------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 6d7cf819..6faad683 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -259,8 +259,8 @@ ifneq ($(STATIC_BUILD),true) PLUGIN_FILES += Cardinal/src/AudioFile.cpp ifneq ($(WASM),true) PLUGIN_FILES += Cardinal/src/Carla.cpp -endif PLUGIN_FILES += Cardinal/src/Ildaeil.cpp +endif ifneq ($(HEADLESS),true) ifeq ($(HAVE_X11),true) PLUGIN_FILES += Cardinal/src/EmbedWidget.cpp diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 78e800cf..a8e50aad 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -994,15 +994,15 @@ static void initStatic__Cardinal() #endif #ifndef STATIC_BUILD p->addModel(modelAudioFile); - p->addModel(modelIldaeil); #else spl.removeModule("AudioFile"); - spl.removeModule("Ildaeil"); #endif #if !(defined(DISTRHO_OS_WASM) || defined(STATIC_BUILD)) p->addModel(modelCarla); + p->addModel(modelIldaeil); #else spl.removeModule("Carla"); + spl.removeModule("Ildaeil"); #endif #ifndef HEADLESS p->addModel(modelSassyScope); diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index cff6cfba..c7140ee3 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -231,10 +231,6 @@ endif ifeq ($(WASM),true) WASM_RESOURCES = $(TARGET_DIR)/$(NAME).html $(LV2_RESOURCES) -ifneq ($(CARDINAL_VARIANT),mini) -WASM_RESOURCES += $(CURDIR)/lv2/fomp.lv2/manifest.ttl -endif - EXTRA_DSP_DEPENDENCIES += $(WASM_RESOURCES) endif @@ -292,8 +288,6 @@ ifeq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources else LINK_FLAGS += --preload-file=../../bin/CardinalNative.lv2/resources@/resources -LINK_FLAGS += --preload-file=./jsfx -LINK_FLAGS += --preload-file=./lv2 LINK_FLAGS += --use-preload-cache LINK_FLAGS += --use-preload-plugins endif @@ -441,10 +435,6 @@ ifeq ($(WASM),true) $(TARGET_DIR)/$(NAME).html: ../emscripten/$(NAME).html -@mkdir -p $(shell dirname $@) cp $< $@ - -$(CURDIR)/lv2/fomp.lv2/manifest.ttl: $(TARGET_DIR)/$(NAME).lv2/resources/PluginManifests/Cardinal.json - wget -O - https://falktx.com/data/wasm-things-2022-08-15.tar.gz | tar xz -C $(CURDIR) - touch $@ endif # -------------------------------------------------------------- From 9aba0e034a9b30094e6f521a9576a1887d61dada Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 02:51:04 +0200 Subject: [PATCH 358/451] Update MindMeldModular and SurgeXT, for Rack 2.3 compat Signed-off-by: falkTX --- plugins/MindMeldModular | 2 +- plugins/surgext | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/MindMeldModular b/plugins/MindMeldModular index 891aafe7..18f4fa89 160000 --- a/plugins/MindMeldModular +++ b/plugins/MindMeldModular @@ -1 +1 @@ -Subproject commit 891aafe7be25ffaf398a00670b9fbb99d1dfa51f +Subproject commit 18f4fa89ca08e9943e38548440d3e02e1ee2e170 diff --git a/plugins/surgext b/plugins/surgext index 8ae3236e..f4420b19 160000 --- a/plugins/surgext +++ b/plugins/surgext @@ -1 +1 @@ -Subproject commit 8ae3236e5c638a5f4eaa7edf9d87c7ed3c5d0543 +Subproject commit f4420b19c7137d85c0390ef494bb880cc2726e74 From e6a799cd4ce971755dcad8c206a7eb84bfded192 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 04:39:27 +0200 Subject: [PATCH 359/451] Tweak wasm build, add persistent storage Signed-off-by: falkTX --- dpf | 2 +- plugins/Cardinal/src/AIDA-X.cpp | 6 +-- plugins/Cardinal/src/AudioFile.cpp | 4 +- src/CardinalCommon.cpp | 75 ++++++++++++++++++++++++++---- src/CardinalCommon.hpp | 1 + src/CardinalPlugin.cpp | 14 ++++++ src/CardinalUI.cpp | 11 ++++- src/Makefile.cardinal.mk | 1 + src/override/MenuBar.cpp | 72 +++++++++++++++++++--------- src/override/Scene.cpp | 2 - 10 files changed, 149 insertions(+), 39 deletions(-) diff --git a/dpf b/dpf index b4460beb..802e4460 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit b4460beb094502c868dda5991e356623b13ce658 +Subproject commit 802e4460844b75b4c2a96c5a9f9baa791209f74e diff --git a/plugins/Cardinal/src/AIDA-X.cpp b/plugins/Cardinal/src/AIDA-X.cpp index eecb162e..0e294a91 100644 --- a/plugins/Cardinal/src/AIDA-X.cpp +++ b/plugins/Cardinal/src/AIDA-X.cpp @@ -892,8 +892,8 @@ struct AidaWidget : ModuleWidgetWithSideScrews<23> { heightPedal, cornerRadius, cornerRadius, - nvgRGBA(0,0,0,1.f), - nvgRGBA(0,0,0,0.f))); + nvgRGBAf(0,0,0,1.f), + nvgRGBAf(0,0,0,0.f))); nvgFill(args.vg); // .rt-neural .grid @@ -916,7 +916,7 @@ struct AidaWidget : ModuleWidgetWithSideScrews<23> { nvgFill(args.vg); // extra - nvgStrokeColor(args.vg, nvgRGBA(150, 150, 150, 0.25f)); + nvgStrokeColor(args.vg, nvgRGBA(150, 150, 150, 60)); nvgStroke(args.vg); drawOutputJacksArea(args.vg); diff --git a/plugins/Cardinal/src/AudioFile.cpp b/plugins/Cardinal/src/AudioFile.cpp index c52b4db2..908ba91c 100644 --- a/plugins/Cardinal/src/AudioFile.cpp +++ b/plugins/Cardinal/src/AudioFile.cpp @@ -471,10 +471,10 @@ struct AudioFileListWidget : ImGuiWidget { selectedFile = (size_t)-1; static constexpr const char* const supportedExtensions[] = { - #ifdef HAVE_SNDFILE + #ifdef HAVE_SNDFILE ".aif",".aifc",".aiff",".au",".bwf",".flac",".htk",".iff",".mat4",".mat5",".oga",".ogg",".opus", ".paf",".pvf",".pvf5",".sd2",".sf",".snd",".svx",".vcc",".w64",".wav",".xi", - #endif + #endif ".mp3" }; diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 16c04d1d..24eb93f5 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -89,9 +89,9 @@ #ifdef DISTRHO_OS_WASM # if CARDINAL_VARIANT_MINI -# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm-mini.vcv" +# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm-mini" # else -# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm.vcv" +# define CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME "welcome-wasm" # endif #endif @@ -374,6 +374,17 @@ static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, } #endif +// ----------------------------------------------------------------------------------------------------------- + +#ifdef DISTRHO_OS_WASM +static void WebBrowserDataLoaded(void* const data) +{ + static_cast(data)->loadSettings(true); +} +#endif + +// ----------------------------------------------------------------------------------------------------------- + Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalBaseUI* const ui) { using namespace rack; @@ -490,7 +501,17 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB #endif if (isRealInstance) + { + #ifdef DISTRHO_OS_WASM + EM_ASM({ + Module.FS.mkdir('/userfiles'); + Module.FS.mount(Module.IDBFS, {}, '/userfiles'); + Module.FS.syncfs(true, function(err) { if (!err) { dynCall('vi', $0, [$1]) } }); + }, WebBrowserDataLoaded, this); + #else system::createDirectory(asset::userDir); + #endif + } } #ifndef CARDINAL_COMMON_DSP_ONLY @@ -513,13 +534,11 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (settings::settingsPath.empty()) settings::settingsPath = asset::config(CARDINAL_VARIANT_NAME ".json"); - const std::string patchesPath = asset::patchesPath(); + templatePath = asset::user("templates/" CARDINAL_VARIANT_NAME ".vcv"); #ifdef DISTRHO_OS_WASM - templatePath = system::join(patchesPath, CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME ".vcv"); - factoryTemplatePath = system::join(patchesPath, "templates/" CARDINAL_VARIANT_NAME ".vcv"); + factoryTemplatePath = system::join(asset::patchesPath(), CARDINAL_WASM_WELCOME_TEMPLATE_FILENAME ".vcv"); #else - templatePath = asset::user("templates/" CARDINAL_VARIANT_NAME ".vcv"); - factoryTemplatePath = system::join(patchesPath, "templates/" CARDINAL_VARIANT_NAME ".vcv"); + factoryTemplatePath = system::join(asset::patchesPath(), "templates/" CARDINAL_VARIANT_NAME ".vcv"); #endif // Log environment @@ -672,7 +691,8 @@ bool isMini() bool isStandalone() { - return std::strstr(getPluginFormatName(), "Standalone") != nullptr; + static const bool standalone = std::strstr(getPluginFormatName(), "Standalone") != nullptr; + return standalone; } #ifdef ARCH_WIN @@ -712,6 +732,15 @@ std::string getSpecialPath(const SpecialPath type) char* patchFromURL = nullptr; char* patchRemoteURL = nullptr; char* patchStorageSlug = nullptr; + +void syncfs() +{ + settings::save(); + + EM_ASM({ + Module.FS.syncfs(false, function(){} ); + }); +} #endif std::string homeDir() @@ -783,6 +812,10 @@ void loadPathDialog(const std::string& path, const bool asTemplate) APP->history->setSaved(); } + #ifdef DISTRHO_OS_WASM + syncfs(); + #endif + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) if (remoteDetails->autoDeploy) remoteUtils::sendFullPatchToRemote(remoteDetails); @@ -812,6 +845,10 @@ void loadSelectionDialog() std::free(pathC); + #ifdef DISTRHO_OS_WASM + syncfs(); + #endif + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) if (remoteDetails->autoDeploy) remoteUtils::sendFullPatchToRemote(remoteDetails); @@ -839,6 +876,10 @@ void loadTemplate(const bool factory) APP->patch->path.clear(); APP->history->setSaved(); + #ifdef DISTRHO_OS_WASM + syncfs(); + #endif + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) if (remoteDetails->autoDeploy) remoteUtils::sendFullPatchToRemote(remoteDetails); @@ -862,6 +903,10 @@ void revertDialog() promptClear("Revert patch to the last saved state?", []{ APP->patch->loadAction(APP->patch->path); + #ifdef DISTRHO_OS_WASM + syncfs(); + #endif + if (remoteUtils::RemoteDetails* const remoteDetails = remoteUtils::getRemote()) if (remoteDetails->autoDeploy) remoteUtils::sendFullPatchToRemote(remoteDetails); @@ -886,6 +931,14 @@ void saveDialog(const std::string& path) asyncDialog::create(string::f("Could not save patch: %s", e.what()).c_str()); return; } + + APP->patch->pushRecentPath(path); + + #ifdef DISTRHO_OS_WASM + syncfs(); + #else + rack::settings::save(); + #endif #endif } @@ -944,7 +997,11 @@ void saveTemplateDialog() catch (Exception& e) { asyncDialog::create(string::f("Could not save template patch: %s", e.what()).c_str()); return; - } + } + + #ifdef DISTRHO_OS_WASM + syncfs(); + #endif }); } diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 6fa736ff..a1693a4b 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -53,6 +53,7 @@ std::string getSpecialPath(SpecialPath type); extern char* patchFromURL; extern char* patchRemoteURL; extern char* patchStorageSlug; +void syncfs(); #endif std::string homeDir(); diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index db5ab1a6..7155f9ae 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -66,6 +66,11 @@ namespace app { rack::widget::Widget* createMenuBar() { return new rack::widget::Widget; } } #endif +#ifdef DISTRHO_OS_WASM +namespace asset { +std::string patchesPath(); +} +#endif namespace engine { void Engine_setAboutToClose(Engine*); } @@ -312,6 +317,15 @@ class CardinalPlugin : public CardinalBasePlugin context->scene->rackScroll->reset(); } + #ifdef DISTRHO_OS_WASM + // switch factory template to regular one after first load + #if CARDINAL_VARIANT_MINI + context->patch->factoryTemplatePath = rack::system::join(rack::asset::patchesPath(), "templates/mini.vcv"); + #else + context->patch->factoryTemplatePath = rack::system::join(rack::asset::patchesPath(), "templates/main.vcv"); + #endif + #endif + #ifdef CARDINAL_INIT_OSC_THREAD fInitializer->remotePluginInstance = this; #endif diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index b28f216b..f5131f4a 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -62,6 +62,11 @@ #endif namespace rack { +#ifdef DISTRHO_OS_WASM +namespace asset { +std::string patchesPath(); +} +#endif namespace engine { void Engine_setAboutToClose(Engine*); void Engine_setRemoteDetails(Engine*, remoteUtils::RemoteDetails*); @@ -246,7 +251,7 @@ static void downloadRemotePatchFailed(const char* const filename) } using namespace rack; - context->patch->templatePath = system::join(asset::systemDir, "init/wasm.vcv"); // FIXME + context->patch->templatePath = rack::system::join(asset::patchesPath(), "templates/main.vcv"); context->patch->loadTemplate(); context->scene->rackScroll->reset(); } @@ -1228,7 +1233,11 @@ class CardinalUI : public CardinalBaseUI, context->patch->pushRecentPath(sfilename); context->history->setSaved(); + #ifdef DISTRHO_OS_WASM + rack::syncfs(); + #else rack::settings::save(); + #endif } #if 0 diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index c7140ee3..4003dddc 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -283,6 +283,7 @@ LINK_FLAGS += -O3 LINK_FLAGS += -sALLOW_MEMORY_GROWTH LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 +LINK_FLAGS += -lidbfs.js ifeq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 1ae8c997..d273997a 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -56,6 +56,11 @@ #include "DistrhoPlugin.hpp" #include "DistrhoStandaloneUtils.hpp" +#ifdef DISTRHO_OS_WASM +# include +# undef HAVE_LIBLO +#endif + #ifdef HAVE_LIBLO # include #endif @@ -98,6 +103,28 @@ struct FileButton : MenuButton { const bool isStandalone; std::vector demoPatches; +#ifdef DISTRHO_OS_WASM + static void WebBrowserDataSaved(const int err) + { + err ? async_dialog_message("Error, could not save web browser data!") + : async_dialog_message("Web browser data saved!"); + } + + static void wasmSaveAs() + { + async_dialog_text_input("Filename", nullptr, [](char* const filename) { + if (filename == nullptr) + return; + APP->patch->path = "/userfiles/"; + APP->patch->path += filename; + if (rack::system::getExtension(filename) != ".vcv") + APP->patch->path += ".vcv"; + patchUtils::saveDialog(APP->patch->path); + std::free(filename); + }); + } +#endif + FileButton(const bool standalone) : MenuButton(), isStandalone(standalone) { @@ -131,7 +158,6 @@ struct FileButton : MenuButton { })); #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -#ifndef DISTRHO_OS_WASM menu->addChild(createMenuItem("New (factory template)", "", []() { patchUtils::loadTemplateDialog(true); })); @@ -149,6 +175,11 @@ struct FileButton : MenuButton { } }, settings::recentPatchPaths.empty())); + menu->addChild(createMenuItem("Import selection...", "", [=]() { + patchUtils::loadSelectionDialog(); + }, false, true)); + +#ifndef DISTRHO_OS_WASM menu->addChild(createMenuItem("Save", RACK_MOD_CTRL_NAME "+S", []() { // NOTE: will do nothing if path is empty, intentionally patchUtils::saveDialog(APP->patch->path); @@ -158,13 +189,16 @@ struct FileButton : MenuButton { patchUtils::saveAsDialog(); })); #else - menu->addChild(createMenuItem("Import patch...", RACK_MOD_CTRL_NAME "+O", []() { - patchUtils::loadDialog(); + menu->addChild(createMenuItem("Save", "", []() { + if (APP->patch->path.empty()) + wasmSaveAs(); + else + patchUtils::saveDialog(APP->patch->path); })); - menu->addChild(createMenuItem("Import selection...", "", [=]() { - patchUtils::loadSelectionDialog(); - }, false, true)); + menu->addChild(createMenuItem("Save as", "", []() { + wasmSaveAs(); + })); menu->addChild(createMenuItem("Save and download compressed", RACK_MOD_CTRL_NAME "+Shift+S", []() { patchUtils::saveAsDialog(); @@ -184,6 +218,17 @@ struct FileButton : MenuButton { patchUtils::saveTemplateDialog(); })); +#ifdef DISTRHO_OS_WASM + menu->addChild(new ui::MenuSeparator); + + menu->addChild(createMenuItem("Save persistent browser data", "", []() { + settings::save(); + EM_ASM({ + Module.FS.syncfs(false, function(err){ dynCall('vi', $0, [!!err]) }); + }, WebBrowserDataSaved); + })); +#endif + #if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifdef __MOD_DEVICES__ #define REMOTE_NAME "MOD" @@ -213,21 +258,6 @@ struct FileButton : MenuButton { } #endif -#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS -#ifndef DISTRHO_OS_WASM - menu->addChild(new ui::MenuSeparator); - - // Load selection - menu->addChild(createMenuItem("Import selection...", "", [=]() { - patchUtils::loadSelectionDialog(); - }, false, true)); - - menu->addChild(createMenuItem("Export uncompressed json...", "", []() { - patchUtils::saveAsDialogUncompressed(); - })); -#endif -#endif - if (!demoPatches.empty()) { menu->addChild(new ui::MenuSeparator); diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index fcb23178..5ddf14df 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -276,13 +276,11 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { patchUtils::revertDialog(); e.consume(this); } -#ifndef DISTRHO_OS_WASM if (e.keyName == "s" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { // NOTE: will do nothing if path is empty, intentionally patchUtils::saveDialog(APP->patch->path); e.consume(this); } -#endif if (e.keyName == "s" && (e.mods & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT)) { patchUtils::saveAsDialog(); e.consume(this); From 95ceb4546d297309e324b602392d3d946847feab Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 14:51:06 +0200 Subject: [PATCH 360/451] Fix symbol conflict in MindMeldModular update Signed-off-by: falkTX --- plugins/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Makefile b/plugins/Makefile index 6faad683..f2604f19 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -843,7 +843,7 @@ PLUGIN_FILES += $(wildcard MindMeldModular/src/ShapeMaster/*.cpp) PLUGIN_FILES += $(wildcard MindMeldModular/src/Utilities/*.cpp) # modules/types which are present in other plugins -MINDMELD_CUSTOM = printNote +MINDMELD_CUSTOM = Trigger printNote # -------------------------------------------------------------- # ML_modules From 466c8d4235a8d3f8e35138813ecb06f2e7c59207 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 15:49:06 +0200 Subject: [PATCH 361/451] Tweak macOS packaging Signed-off-by: falkTX --- .github/workflows/build.yml | 2 -- dpf | 2 +- utils/create-macos-installer.sh | 3 ++- utils/macOS/Build_JACK.plist | 18 ++++++++++++++++++ utils/macOS/Build_Native.plist | 18 ++++++++++++++++++ utils/macOS/package.xml.in | 18 +++++++++--------- 6 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 utils/macOS/Build_JACK.plist create mode 100644 utils/macOS/Build_Native.plist diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84a45213..9bb31dc5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -221,8 +221,6 @@ jobs: mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/ - name: Build macOS (packaging) if: steps.cache.outputs.cache-hit == 'true' - env: - MACOS_ARCHS: 'arm64,x86_64' run: | source deps/PawPaw/local.env macos-${{ matrix.target }} ./utils/create-macos-installer.sh diff --git a/dpf b/dpf index 802e4460..eba58491 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 802e4460844b75b4c2a96c5a9f9baa791209f74e +Subproject commit eba584917cb566cbbdf626cc8736c3d13b65a2e9 diff --git a/utils/create-macos-installer.sh b/utils/create-macos-installer.sh index a757dd5c..c88d2d13 100755 --- a/utils/create-macos-installer.sh +++ b/utils/create-macos-installer.sh @@ -34,12 +34,14 @@ pkgbuild \ pkgbuild \ --identifier "studio.kx.distrho.plugins.cardinal.jack" \ + --component-plist "../utils/macOS/Build_JACK.plist" \ --install-location "/Applications/" \ --root "${PWD}/jack/" \ ../dpf-cardinal-jack.pkg pkgbuild \ --identifier "studio.kx.distrho.plugins.cardinal.native" \ + --component-plist "../utils/macOS/Build_Native.plist" \ --install-location "/Applications/" \ --root "${PWD}/native/" \ ../dpf-cardinal-native.pkg @@ -77,7 +79,6 @@ pkgbuild \ cd .. sed -e "s|@builddir@|${PWD}/build|" \ - -e "s|@buildarchs@|${MACOS_ARCHS}|" \ utils/macOS/package.xml.in > build/package.xml productbuild \ diff --git a/utils/macOS/Build_JACK.plist b/utils/macOS/Build_JACK.plist new file mode 100644 index 00000000..d5516955 --- /dev/null +++ b/utils/macOS/Build_JACK.plist @@ -0,0 +1,18 @@ + + + + + + BundleHasStrictIdentifier + + BundleIsRelocatable + + BundleIsVersionChecked + + BundleOverwriteAction + upgrade + RootRelativeBundlePath + Cardinal.app + + + diff --git a/utils/macOS/Build_Native.plist b/utils/macOS/Build_Native.plist new file mode 100644 index 00000000..a206413b --- /dev/null +++ b/utils/macOS/Build_Native.plist @@ -0,0 +1,18 @@ + + + + + + BundleHasStrictIdentifier + + BundleIsRelocatable + + BundleIsVersionChecked + + BundleOverwriteAction + upgrade + RootRelativeBundlePath + CardinalNative.app + + + diff --git a/utils/macOS/package.xml.in b/utils/macOS/package.xml.in index ca2f4dad..eae843ac 100644 --- a/utils/macOS/package.xml.in +++ b/utils/macOS/package.xml.in @@ -3,31 +3,31 @@ Cardinal - + - + dpf-cardinal-resources.pkg - + dpf-cardinal-jack.pkg - + dpf-cardinal-native.pkg - + dpf-cardinal-components.pkg - + dpf-cardinal-lv2bundles.pkg - + dpf-cardinal-vst2bundles.pkg - + dpf-cardinal-vst3bundles.pkg - + dpf-cardinal-clapbundles.pkg From 09921e2c28b08930eec97c6e6e51ff8ec659831c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 May 2023 20:48:06 +0200 Subject: [PATCH 362/451] Fix last commit Signed-off-by: falkTX --- utils/macOS/Build_JACK.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/macOS/Build_JACK.plist b/utils/macOS/Build_JACK.plist index d5516955..6495e197 100644 --- a/utils/macOS/Build_JACK.plist +++ b/utils/macOS/Build_JACK.plist @@ -12,7 +12,7 @@ BundleOverwriteAction upgrade RootRelativeBundlePath - Cardinal.app + CardinalJACK.app From cf45ff62fca5c1876fa308492ceacf40a2f6ab95 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 22 May 2023 17:31:51 +0200 Subject: [PATCH 363/451] Reorder file menu, use input text for remote url Signed-off-by: falkTX --- src/CardinalRemote.cpp | 32 +++++++------ src/CardinalRemote.hpp | 8 ++-- src/CardinalUI.cpp | 2 +- src/override/MenuBar.cpp | 100 ++++++++++++++++++++++++++------------- src/override/Scene.cpp | 9 +++- 5 files changed, 97 insertions(+), 54 deletions(-) diff --git a/src/CardinalRemote.cpp b/src/CardinalRemote.cpp index d27f16b2..c7951379 100644 --- a/src/CardinalRemote.cpp +++ b/src/CardinalRemote.cpp @@ -38,8 +38,6 @@ #ifdef HAVE_LIBLO # include -// # define REMOTE_HOST "localhost" -# define REMOTE_HOST "192.168.51.1" #endif // ----------------------------------------------------------------------------------------------------------- @@ -77,7 +75,7 @@ RemoteDetails* getRemote() #endif } -bool connectToRemote() +bool connectToRemote(const char* const url) { #ifdef CARDINAL_REMOTE_ENABLED CardinalPluginContext* const context = static_cast(APP); @@ -93,10 +91,14 @@ bool connectToRemote() { ui->remoteDetails = remoteDetails = new RemoteDetails; remoteDetails->handle = ui; + remoteDetails->url = strdup(url); remoteDetails->connected = true; remoteDetails->autoDeploy = true; } #elif defined(HAVE_LIBLO) + const lo_address addr = lo_address_new_from_url(url); + DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr, false); + if (remoteDetails == nullptr) { const lo_server oscServer = lo_server_new_with_proto(nullptr, LO_UDP, nullptr); @@ -104,20 +106,21 @@ bool connectToRemote() ui->remoteDetails = remoteDetails = new RemoteDetails; remoteDetails->handle = oscServer; + remoteDetails->url = strdup(url); remoteDetails->connected = false; remoteDetails->autoDeploy = false; lo_server_add_method(oscServer, "/resp", nullptr, osc_handler, remoteDetails); } - - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); - DISTRHO_SAFE_ASSERT(addr != nullptr); - - if (addr != nullptr) + else if (std::strcmp(remoteDetails->url, url) != 0) { - lo_send(addr, "/hello", ""); - lo_address_free(addr); + ui->remoteDetails = nullptr; + disconnectFromRemote(remoteDetails); + return connectToRemote(url); } + + lo_send(addr, "/hello", ""); + lo_address_free(addr); #endif return remoteDetails != nullptr; @@ -133,6 +136,7 @@ void disconnectFromRemote(RemoteDetails* const remote) #ifdef HAVE_LIBLO lo_server_free(static_cast(remote->handle)); #endif + std::free(const_cast(remote->url)); delete remote; } } @@ -156,7 +160,7 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int } static_cast(remote->handle)->setState("param", paramBuf); #elif defined(HAVE_LIBLO) - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); + const lo_address addr = lo_address_new_from_url(remote->url); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); lo_send(addr, "/param", "hif", moduleId, paramId, value); @@ -205,7 +209,7 @@ void sendFullPatchToRemote(RemoteDetails* const remote) DISTRHO_SAFE_ASSERT_RETURN(data.size() >= 4,); - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); + const lo_address addr = lo_address_new_from_url(remote->url); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); if (const lo_blob blob = lo_blob_new(data.size(), data.data())) @@ -219,10 +223,10 @@ void sendFullPatchToRemote(RemoteDetails* const remote) #endif } -void sendScreenshotToRemote(RemoteDetails*, const char* const screenshot) +void sendScreenshotToRemote(RemoteDetails* const remote, const char* const screenshot) { #if defined(HAVE_LIBLO) && DISTRHO_PLUGIN_WANT_DIRECT_ACCESS - const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT); + const lo_address addr = lo_address_new_from_url(remote->url); DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,); std::vector data(d_getChunkFromBase64String(screenshot)); diff --git a/src/CardinalRemote.hpp b/src/CardinalRemote.hpp index e45c569f..a6391208 100644 --- a/src/CardinalRemote.hpp +++ b/src/CardinalRemote.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,7 +17,8 @@ #pragma once -#define CARDINAL_DEFAULT_REMOTE_HOST_PORT "2228" +// #define CARDINAL_DEFAULT_REMOTE_URL "osc.udp://localhost:2228" +#define CARDINAL_DEFAULT_REMOTE_URL "osc.udp://192.168.51.1:2228" // ----------------------------------------------------------------------------------------------------------- @@ -25,12 +26,13 @@ namespace remoteUtils { struct RemoteDetails { void* handle; + const char* url; bool connected; bool autoDeploy; }; RemoteDetails* getRemote(); -bool connectToRemote(); +bool connectToRemote(const char* url); void disconnectFromRemote(RemoteDetails* remote); void idleRemote(RemoteDetails* remote); void sendParamChangeToRemote(RemoteDetails* remote, int64_t moduleId, int paramId, float value); diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index f5131f4a..af715308 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -406,7 +406,7 @@ class CardinalUI : public CardinalBaseUI, context->patch->loadTemplate(); context->scene->rackScroll->reset(); - DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); + DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote(CARDINAL_DEFAULT_REMOTE_URL)); Engine_setRemoteDetails(context->engine, remoteDetails); #endif diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index d273997a..caabe5b7 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -115,10 +115,15 @@ struct FileButton : MenuButton { async_dialog_text_input("Filename", nullptr, [](char* const filename) { if (filename == nullptr) return; - APP->patch->path = "/userfiles/"; + + APP->patch->path = asset::user("patches"); + system::createDirectories(APP->patch->path); + + APP->patch->path += DISTRHO_OS_SEP_STR; APP->patch->path += filename; if (rack::system::getExtension(filename) != ".vcv") APP->patch->path += ".vcv"; + patchUtils::saveDialog(APP->patch->path); std::free(filename); }); @@ -161,11 +166,28 @@ struct FileButton : MenuButton { menu->addChild(createMenuItem("New (factory template)", "", []() { patchUtils::loadTemplateDialog(true); })); +#endif - menu->addChild(createMenuItem("Open / Import...", RACK_MOD_CTRL_NAME "+O", []() { +#ifndef DISTRHO_OS_WASM + constexpr const char* const OpenName = "Open..."; +#else + constexpr const char* const OpenName = "Import patch..."; +#endif + menu->addChild(createMenuItem(OpenName, RACK_MOD_CTRL_NAME "+O", []() { patchUtils::loadDialog(); })); + const std::string patchesDir = asset::user("patches"); + const std::vector patches = system::isDirectory(patchesDir) ? system::getEntries(patchesDir) : std::vector(); + menu->addChild(createSubmenuItem("Open local patch", "", [patches](ui::Menu* menu) { + for (const std::string& path : patches) { + std::string name = system::getStem(path); + menu->addChild(createMenuItem(name, "", [=]() { + patchUtils::loadPathDialog(path, false); + })); + } + }, patches.empty())); + menu->addChild(createSubmenuItem("Open recent", "", [](ui::Menu* menu) { for (const std::string& path : settings::recentPatchPaths) { std::string name = system::getStem(path); @@ -175,15 +197,42 @@ struct FileButton : MenuButton { } }, settings::recentPatchPaths.empty())); + if (!demoPatches.empty()) + { + menu->addChild(createSubmenuItem("Open demo / example project", "", [=](ui::Menu* const menu) { + for (std::string path : demoPatches) { + std::string label = system::getStem(path); + + for (size_t i=0, len=label.size(); iaddChild(createMenuItem(label, "", [path]() { + patchUtils::loadPathDialog(path, true); + })); + } + + menu->addChild(new ui::MenuSeparator); + + menu->addChild(createMenuItem("Open patchstorage.com for more patches", "", []() { + patchUtils::openBrowser("https://patchstorage.com/platform/cardinal/"); + })); + })); + } + menu->addChild(createMenuItem("Import selection...", "", [=]() { patchUtils::loadSelectionDialog(); }, false, true)); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS + menu->addChild(new ui::MenuSeparator); + #ifndef DISTRHO_OS_WASM menu->addChild(createMenuItem("Save", RACK_MOD_CTRL_NAME "+S", []() { - // NOTE: will do nothing if path is empty, intentionally + // NOTE: for plugin versions it will do nothing if path is empty, intentionally patchUtils::saveDialog(APP->patch->path); - }, APP->patch->path.empty())); + }, APP->patch->path.empty() && !isStandalone)); menu->addChild(createMenuItem("Save as / Export...", RACK_MOD_CTRL_NAME "+Shift+S", []() { patchUtils::saveAsDialog(); @@ -196,11 +245,11 @@ struct FileButton : MenuButton { patchUtils::saveDialog(APP->patch->path); })); - menu->addChild(createMenuItem("Save as", "", []() { + menu->addChild(createMenuItem("Save as...", "", []() { wasmSaveAs(); })); - menu->addChild(createMenuItem("Save and download compressed", RACK_MOD_CTRL_NAME "+Shift+S", []() { + menu->addChild(createMenuItem("Save and download compressed", "", []() { patchUtils::saveAsDialog(); })); @@ -251,38 +300,21 @@ struct FileButton : MenuButton { Engine_setRemoteDetails(APP->engine, remoteDetails->autoDeploy ? remoteDetails : nullptr); } )); +#ifndef __MOD_DEVICES__ } else { - menu->addChild(createMenuItem("Connect to " REMOTE_NAME, "", []() { - DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote()); + menu->addChild(createMenuItem("Connect to " REMOTE_NAME "...", "", [remoteDetails]() { + const std::string url = remoteDetails != nullptr ? remoteDetails->url : CARDINAL_DEFAULT_REMOTE_URL; + async_dialog_text_input("Remote:", url.c_str(), [](char* const url) { + if (url == nullptr) + return; + + DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote(url)); + std::free(url); + }); })); - } #endif - - if (!demoPatches.empty()) - { - menu->addChild(new ui::MenuSeparator); - - menu->addChild(createSubmenuItem("Open Demo / Example project", "", [=](ui::Menu* const menu) { - for (std::string path : demoPatches) { - std::string label = system::getStem(path); - - for (size_t i=0, len=label.size(); iaddChild(createMenuItem(label, "", [path]() { - patchUtils::loadPathDialog(path, true); - })); - } - - menu->addChild(new ui::MenuSeparator); - - menu->addChild(createMenuItem("Open PatchStorage.com for more patches", "", []() { - patchUtils::openBrowser("https://patchstorage.com/platform/cardinal/"); - })); - })); } +#endif #ifndef DISTRHO_OS_WASM if (isStandalone) { diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 5ddf14df..07976df8 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -277,8 +277,13 @@ void Scene::onHoverKey(const HoverKeyEvent& e) { e.consume(this); } if (e.keyName == "s" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { - // NOTE: will do nothing if path is empty, intentionally - patchUtils::saveDialog(APP->patch->path); + // NOTE: for plugin versions it will do nothing if path is empty, intentionally + if (APP->patch->path.empty()) { + if (isStandalone()) + patchUtils::saveAsDialog(); + } else { + patchUtils::saveDialog(APP->patch->path); + } e.consume(this); } if (e.keyName == "s" && (e.mods & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT)) { From 4edf85ab928f0c7ee0ce6cb31751807cf83d9cd9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 23 May 2023 16:00:56 +0200 Subject: [PATCH 364/451] Fix debug and headless builds Signed-off-by: falkTX --- dpf | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalRemote.hpp | 2 +- src/override/MenuBar.cpp | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dpf b/dpf index eba58491..e288f163 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit eba584917cb566cbbdf626cc8736c3d13b65a2e9 +Subproject commit e288f163bbf3af6ae24e9df6cdd23e755ff1aaf5 diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 24eb93f5..cda32b54 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -583,7 +583,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (const char* const portEnv = std::getenv("CARDINAL_REMOTE_HOST_PORT")) port = portEnv; else - port = CARDINAL_DEFAULT_REMOTE_HOST_PORT; + port = CARDINAL_DEFAULT_REMOTE_PORT; oscServerThread = lo_server_thread_new_with_proto(port, LO_UDP, osc_error_handler); DISTRHO_SAFE_ASSERT_RETURN(oscServerThread != nullptr,); diff --git a/src/CardinalRemote.hpp b/src/CardinalRemote.hpp index a6391208..991c9950 100644 --- a/src/CardinalRemote.hpp +++ b/src/CardinalRemote.hpp @@ -17,7 +17,7 @@ #pragma once -// #define CARDINAL_DEFAULT_REMOTE_URL "osc.udp://localhost:2228" +#define CARDINAL_DEFAULT_REMOTE_PORT "2228" #define CARDINAL_DEFAULT_REMOTE_URL "osc.udp://192.168.51.1:2228" // ----------------------------------------------------------------------------------------------------------- diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index caabe5b7..cd7da3cb 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -263,9 +263,11 @@ struct FileButton : MenuButton { patchUtils::revertDialog(); }, APP->patch->path.empty())); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS menu->addChild(createMenuItem("Overwrite template", "", []() { patchUtils::saveTemplateDialog(); })); +#endif #ifdef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); From 7c7d84963400ef35595f0144006e0f748b49fb05 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 11 Jun 2023 21:22:53 +0200 Subject: [PATCH 365/451] Fix build under Linux arm64 Signed-off-by: falkTX --- deps/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/Makefile b/deps/Makefile index 67880ad2..7ef158c2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -139,6 +139,7 @@ CONFIGURE += --disable-alsa # NOTE speex fails to build when neon is enabled, so we disable that CONFIGURE += --disable-neon # NOTE libsamplerate fails with invalid host, so we force ac_cv_host +CONFIGURE += ac_cv_build=$(TARGET_MACHINE) CONFIGURE += ac_cv_host=$(TARGET_MACHINE) # -------------------------------------------------------------- From 12878dbef35da9a301c5155030135e88b503deea Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 Jun 2023 14:57:09 +0200 Subject: [PATCH 366/451] workaround surgext build issue with gcc13 Signed-off-by: falkTX --- plugins/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Makefile b/plugins/Makefile index f2604f19..6d5ce490 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1040,6 +1040,7 @@ SURGEXT_FLAGS += \ -Isurgext/surge/libs/tuning-library/include \ -I../deps/surge-build/libs/sst/sst-plugininfra/libs/filesystem/include \ -include limits \ + -include cstdint \ -DSURGE_COMPILE_BLOCK_SIZE=8 \ -DSURGE_SKIP_ODDSOUND_MTS \ -DHAS_LUA=0 \ From c2510299d49fee373f876181d962bb00922fef11 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 Jun 2023 15:18:31 +0200 Subject: [PATCH 367/451] Rebuild CI cache Signed-off-by: falkTX --- .github/workflows/build.yml | 4 +--- deps/PawPaw | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bb31dc5..3dd869bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,10 @@ name: build on: [push, pull_request] env: - CACHE_VERSION: 3 + CACHE_VERSION: 4 CARDINAL_UNDER_WINE: 1 CIBUILD: true EMSCRIPTEN_VERSION: 3.1.27 - DEBIAN_FRONTEND: noninteractive - HOMEBREW_NO_AUTO_UPDATE: 1 LIBGL_ALWAYS_SOFTWARE: true PAWPAW_SKIP_LTO: 1 diff --git a/deps/PawPaw b/deps/PawPaw index eb215863..70160711 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit eb215863a49b9356b64aa6ea229b99b307ab818b +Subproject commit 70160711d2efec286d417b63a073a8f2012346f6 From ffba8c553ef2684c518d4206f60787f36d7c1b35 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 Jun 2023 15:57:38 +0200 Subject: [PATCH 368/451] Another gcc13 compat fix, update carla Signed-off-by: falkTX --- carla | 2 +- deps/Makefile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/carla b/carla index e924e19f..051c1568 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit e924e19f25367d5009e0e068b59d9f46794ac41b +Subproject commit 051c15680936c4b72a7d41e1edbee2b47741553c diff --git a/deps/Makefile b/deps/Makefile index 7ef158c2..4d32cd28 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -258,6 +258,9 @@ SURGE_NAMES = HysteresisProcessing Patch SolverType Tunings Wavetable clouds ghc SURGE_CXX_FLAGS = $(filter-out -fsingle-precision-constant,$(filter-out -std=gnu++11,$(BUILD_CXX_FLAGS))) SURGE_CXX_FLAGS += $(foreach n,$(SURGE_NAMES),-D$(n)=surgext$(n)) +# fix build with gcc13 +SURGE_CXX_FLAGS += -include cstdint + # fix JUCE build https://github.com/juce-framework/JUCE/issues/374 ifeq ($(CPU_I386),true) SURGE_CXX_FLAGS += -D__sigemptyset=sigemptyset From 20ed43b9d23469a65d64d159903ec88c1b548bb3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 Jun 2023 18:07:32 +0200 Subject: [PATCH 369/451] Tweak CI setup for PawPaw update Signed-off-by: falkTX --- .github/workflows/build.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dd869bd..757e5abc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,10 @@ env: EMSCRIPTEN_VERSION: 3.1.27 LIBGL_ALWAYS_SOFTWARE: true PAWPAW_SKIP_LTO: 1 + PAWPAW_SKIP_FFTW: 1 + PAWPAW_SKIP_GLIB: 1 + PAWPAW_SKIP_LV2: 1 + PAWPAW_SKIP_SAMPLERATE: 1 jobs: linux: @@ -52,7 +56,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 gperf qemu-user-static + sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 gperf meson qemu-user-static sudo apt-get clean - name: Setup dependencies (armhf) if: ${{ matrix.target == 'armhf' }} @@ -64,7 +68,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq - sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf qemu-user-static + sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf meson qemu-user-static sudo apt-get clean - name: Setup dependencies (i386) if: ${{ matrix.target == 'i386' }} @@ -72,7 +76,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 gperf + sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 gperf meson sudo apt-get clean - name: Setup dependencies (riscv64) if: ${{ matrix.target == 'riscv64' }} @@ -84,14 +88,14 @@ jobs: echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 gperf qemu-user-static + sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 gperf meson qemu-user-static sudo apt-get clean - name: Setup dependencies (x86_64) if: ${{ matrix.target == 'x86_64' }} shell: bash run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf meson sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -143,7 +147,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf meson sudo apt-get clean - name: Build linux x86_64 (debug) env: @@ -192,7 +196,7 @@ jobs: key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }} - name: Setup dependencies run: | - brew install autoconf automake + brew install autoconf automake meson - name: Build extra dependencies run: | export PATH="/usr/local/opt/ccache/libexec:${PATH}" @@ -327,7 +331,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq brotli gperf + sudo apt-get install -yqq brotli gperf meson sudo apt-get clean [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }} @@ -429,12 +433,12 @@ jobs: - name: Set up dependencies if: ${{ matrix.target == 'win32' }} run: | - sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 gperf qttools5-dev qttools5-dev-tools xvfb + sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 gperf meson qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - name: Set up dependencies if: ${{ matrix.target == 'win64' }} run: | - sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable gperf qttools5-dev qttools5-dev-tools xvfb + sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable gperf meson qttools5-dev qttools5-dev-tools xvfb sudo apt-get clean - name: Set up ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -520,7 +524,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf + sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev sudo apt-get clean - name: Build linux (LTO) run: | From 46951f73d8e02bf9e31faf71545c6f78d95adcfc Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Jun 2023 20:30:13 +0200 Subject: [PATCH 370/451] Add mini build shortcut Signed-off-by: falkTX --- Makefile | 3 +++ src/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 345df3fd..01e0859a 100644 --- a/Makefile +++ b/Makefile @@ -209,6 +209,9 @@ 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 + $(MAKE) mini -C src $(CARLA_EXTRA_ARGS) + # -------------------------------------------------------------- # Packaging standalone for CI diff --git a/src/Makefile b/src/Makefile index 3c45e8f5..805cdfec 100644 --- a/src/Makefile +++ b/src/Makefile @@ -139,6 +139,9 @@ jack: $(TARGETS) native: $(TARGETS) $(MAKE) jack -C CardinalNative +mini: $(TARGETS) + $(MAKE) jack -C CardinalMini + lv2: $(TARGETS) $(MAKE) lv2 -C Cardinal $(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS) From aac3edc1e22636803ceceddceda1122e9958846c Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Jun 2023 20:30:31 +0200 Subject: [PATCH 371/451] force focus to text input dialogs Signed-off-by: falkTX --- src/AsyncDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AsyncDialog.cpp b/src/AsyncDialog.cpp index 1009eace..49af49fd 100644 --- a/src/AsyncDialog.cpp +++ b/src/AsyncDialog.cpp @@ -220,6 +220,10 @@ struct AsyncTextInput : OpaqueWidget } TextField::onSelectKey(e); } + void step() override { + APP->event->setSelectedWidget(this); + TextField::step(); + } }; AsyncTextField* const textField = new AsyncTextField; textField->box.size.x = contentLayout->box.size.x - (label != nullptr ? label->box.size.x + margin : 0); From 03512bc8f1818a02b0771f0acc40bc9436f1dd11 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 27 Jun 2023 20:31:05 +0200 Subject: [PATCH 372/451] Fix regressions with wasm, use old 5Mb stack size Signed-off-by: falkTX --- src/CardinalCommon.cpp | 4 +--- src/Makefile.cardinal.mk | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index cda32b54..223ac688 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -502,14 +502,12 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (isRealInstance) { + system::createDirectory(asset::userDir); #ifdef DISTRHO_OS_WASM EM_ASM({ - Module.FS.mkdir('/userfiles'); Module.FS.mount(Module.IDBFS, {}, '/userfiles'); Module.FS.syncfs(true, function(err) { if (!err) { dynCall('vi', $0, [$1]) } }); }, WebBrowserDataLoaded, this); - #else - system::createDirectory(asset::userDir); #endif } } diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 4003dddc..f05c936d 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -283,8 +283,11 @@ LINK_FLAGS += -O3 LINK_FLAGS += -sALLOW_MEMORY_GROWTH LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 +LINK_FLAGS += -sSTACK_SIZE=5MB LINK_FLAGS += -lidbfs.js +JACK_LIBS += -sEXPORTED_RUNTIME_METHODS=IDBFS,FS,cwrap + ifeq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources else @@ -344,7 +347,8 @@ ifeq ($(MACOS),true) LINK_FLAGS += -framework IOKit else ifeq ($(WINDOWS),true) # needed by VCVRack -EXTRA_DSP_LIBS += -ldbghelp -lshlwapi -Wl,--stack,0x100000 +LINK_FLAGS += -Wl,--stack,0x100000 +EXTRA_DSP_LIBS += -ldbghelp -lshlwapi # needed by JW-Modules EXTRA_DSP_LIBS += -lws2_32 -lwinmm endif From 76a2edce3a39aa7e0872cc58e12bc38492ddb452 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 28 Jun 2023 07:50:18 +0200 Subject: [PATCH 373/451] CI: fftw is needed for audio2cvpitch module Signed-off-by: falkTX --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 757e5abc..5d7f2aa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ env: EMSCRIPTEN_VERSION: 3.1.27 LIBGL_ALWAYS_SOFTWARE: true PAWPAW_SKIP_LTO: 1 - PAWPAW_SKIP_FFTW: 1 PAWPAW_SKIP_GLIB: 1 PAWPAW_SKIP_LV2: 1 PAWPAW_SKIP_SAMPLERATE: 1 From f486a43b886f0eca9f8f6cbd284dd6b6dee15a70 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 29 Jun 2023 11:05:02 +0200 Subject: [PATCH 374/451] Add bogaudio AD to mini Signed-off-by: falkTX --- carla | 2 +- plugins/Makefile | 2 ++ plugins/plugins-mini.cpp | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 051c1568..c62b26ee 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 051c15680936c4b72a7d41e1edbee2b47741553c +Subproject commit c62b26eecb4dceeb608a5860b3c7047391066d7b diff --git a/plugins/Makefile b/plugins/Makefile index 6d5ce490..fa1e33cc 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -581,6 +581,7 @@ PLUGIN_FILES += $(filter-out BogaudioModules/src/bogaudio.cpp,$(wildcard Bogaudi PLUGIN_FILES += $(wildcard BogaudioModules/src/dsp/*.cpp) PLUGIN_FILES += $(wildcard BogaudioModules/src/dsp/filters/*.cpp) +MINIPLUGIN_FILES += BogaudioModules/src/AD.cpp MINIPLUGIN_FILES += BogaudioModules/src/LFO.cpp MINIPLUGIN_FILES += BogaudioModules/src/Noise.cpp MINIPLUGIN_FILES += BogaudioModules/src/Offset.cpp @@ -605,6 +606,7 @@ MINIPLUGIN_FILES += BogaudioModules/src/utils.cpp MINIPLUGIN_FILES += BogaudioModules/src/vco_base.cpp MINIPLUGIN_FILES += BogaudioModules/src/widgets.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/analyzer.cpp +MINIPLUGIN_FILES += BogaudioModules/src/dsp/envelope.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/math.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/noise.cpp MINIPLUGIN_FILES += BogaudioModules/src/dsp/oscillator.cpp diff --git a/plugins/plugins-mini.cpp b/plugins/plugins-mini.cpp index 2e06557e..38fdb17e 100644 --- a/plugins/plugins-mini.cpp +++ b/plugins/plugins-mini.cpp @@ -44,6 +44,7 @@ extern Model* modelSwerge; #undef private // BogaudioModules +extern Model* modelAD; extern Model* modelBogaudioLFO; extern Model* modelBogaudioNoise; extern Model* modelBogaudioVCA; @@ -354,6 +355,7 @@ static void initStatic__BogaudioModules() Skins& skins(Skins::skins()); skins._default = settings::darkMode ? "dark" : "light"; + p->addModel(modelAD); p->addModel(modelBogaudioLFO); p->addModel(modelBogaudioNoise); p->addModel(modelBogaudioVCA); @@ -366,7 +368,6 @@ static void initStatic__BogaudioModules() p->addModel(modelUnison); // cat plugins/BogaudioModules/plugin.json | jq -r .modules[].slug - | sort - spl.removeModule("Bogaudio-AD"); spl.removeModule("Bogaudio-Additator"); spl.removeModule("Bogaudio-AddrSeq"); spl.removeModule("Bogaudio-AddrSeqX"); From 8a3779d2a8b02ffc344d60d42421cae1a900b5c5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 2 Jul 2023 12:14:06 +0200 Subject: [PATCH 375/451] Add bogaudio AD resources to mini Signed-off-by: falkTX --- plugins/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Makefile b/plugins/Makefile index fa1e33cc..1836635f 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1427,7 +1427,7 @@ MINIRESOURCE_FILES += AriaModules/res/signature/signature.svg MINIRESOURCE_FILES += AudibleInstruments/res/Plaits.svg # MINIRESOURCE_FILES += AudibleInstruments/res/hdad-segment14-1.002/Segment14.ttf -# MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg +MINIRESOURCE_FILES += BogaudioModules/res/AD-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/Additator-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeq-dark.svg # MINIRESOURCE_FILES += BogaudioModules/res/AddrSeqX-dark.svg From 1f11708d82d30f9b7eff8541963a659933c850c3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 2 Jul 2023 14:58:05 +0200 Subject: [PATCH 376/451] CI: readd modgui to wasm artifacts Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d7f2aa8..3251e2c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -382,7 +382,7 @@ jobs: - name: Pack binaries if: steps.cache.outputs.cache-hit == 'true' run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm CardinalMini.lv2/modgui) - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} From ea4c7dc24dfb8262d59b79b3525dcd4c4596ef9f Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 3 Jul 2023 09:29:05 +0200 Subject: [PATCH 377/451] menubar: dont show "open user dir" in wasm Signed-off-by: falkTX --- src/override/MenuBar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index cd7da3cb..9ec3acb6 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -119,7 +119,6 @@ struct FileButton : MenuButton { APP->patch->path = asset::user("patches"); system::createDirectories(APP->patch->path); - APP->patch->path += DISTRHO_OS_SEP_STR; APP->patch->path += filename; if (rack::system::getExtension(filename) != ".vcv") APP->patch->path += ".vcv"; @@ -803,11 +802,13 @@ struct HelpButton : MenuButton { menu->addChild(new ui::MenuSeparator); +#ifndef DISTRHO_OS_WASM menu->addChild(createMenuItem("Open user folder", "", [=]() { system::openDirectory(asset::user("")); })); menu->addChild(new ui::MenuSeparator); +#endif menu->addChild(createMenuLabel("Rack " + APP_VERSION + " Compatible")); } From 9378115f35a80e0f501326d5b8acc6aff7409136 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 3 Jul 2023 09:35:06 +0200 Subject: [PATCH 378/451] Try to fix wasm modgui artifact again Signed-off-by: falkTX --- .github/workflows/build.yml | 6 +++--- carla | 2 +- deps/PawPaw | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3251e2c9..6c846901 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -350,12 +350,12 @@ jobs: make features make HAVE_LIBLO=false NOOPT=true NOSIMD=${{ matrix.target == 'nosimd' }} -j $(nproc) - name: Build modgui - if: ${{ steps.cache.outputs.cache-hit == 'true' && matrix.target == 'nosimd' }} + if: steps.cache.outputs.cache-hit == 'true' run: | ${{ matrix.target == 'nosimd' }} && export PAWPAW_NOSIMD=1 source ~/PawPawBuilds/emsdk/emsdk_env.sh source deps/PawPaw/local.env wasm - make HAVE_LIBLO=false NOOPT=true NOSIMD=true -j $(nproc) -C src/CardinalMiniSep modgui + make HAVE_LIBLO=false NOOPT=true NOSIMD=${{ matrix.target == 'nosimd' }} -j $(nproc) -C src/CardinalMiniSep modgui - name: Make wasm versioned and compress if: steps.cache.outputs.cache-hit == 'true' run: | @@ -382,7 +382,7 @@ jobs: - name: Pack binaries if: steps.cache.outputs.cache-hit == 'true' run: | - cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm CardinalMini.lv2/modgui) + cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm) CardinalMini.lv2/modgui - uses: actions/upload-artifact@v3 with: name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} diff --git a/carla b/carla index c62b26ee..92daff38 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit c62b26eecb4dceeb608a5860b3c7047391066d7b +Subproject commit 92daff388aa0c7f0486b920bf39fe1e488bd7345 diff --git a/deps/PawPaw b/deps/PawPaw index 70160711..6a3c6a65 160000 --- a/deps/PawPaw +++ b/deps/PawPaw @@ -1 +1 @@ -Subproject commit 70160711d2efec286d417b63a073a8f2012346f6 +Subproject commit 6a3c6a65a89abe221858c3f7635140074506bfc3 From 4958759740d892a990a4666d7dc0a1904c98250e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 7 Jul 2023 18:10:47 +0200 Subject: [PATCH 379/451] Silence an annoying unreachable out of bounds warning Signed-off-by: falkTX --- include/engine/Port.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index 748e71fc..c28549b3 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -198,6 +198,8 @@ struct Port { } // Set higher channel voltages to 0 for (int c = channels; c < this->channels; c++) { + if (c >= PORT_MAX_CHANNELS) + __builtin_unreachable(); voltages[c] = 0.f; } // Don't allow caller to set port as disconnected From d44eed4e8824b98d72252fbf8c7c41a39e7d802b Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 7 Jul 2023 18:49:24 +0200 Subject: [PATCH 380/451] Add decorators to Port functions Signed-off-by: falkTX --- include/engine/Port.hpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index c28549b3..9993a4ae 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -78,40 +78,40 @@ struct Port { }; /** Sets the voltage of the given channel. */ - void setVoltage(float voltage, int channel = 0) { + void setVoltage(float voltage, int channel = 0) noexcept { voltages[channel] = voltage; } /** Returns the voltage of the given channel. Because of proper bookkeeping, all channels higher than the input port's number of channels should be 0V. */ - float getVoltage(int channel = 0) { + float getVoltage(int channel = 0) const noexcept { return voltages[channel]; } /** Returns the given channel's voltage if the port is polyphonic, otherwise returns the first voltage (channel 0). */ - float getPolyVoltage(int channel) { + float getPolyVoltage(int channel) const noexcept { return isMonophonic() ? getVoltage(0) : getVoltage(channel); } /** Returns the voltage if a cable is connected, otherwise returns the given normal voltage. */ - float getNormalVoltage(float normalVoltage, int channel = 0) { + float getNormalVoltage(float normalVoltage, int channel = 0) const noexcept { return isConnected() ? getVoltage(channel) : normalVoltage; } - float getNormalPolyVoltage(float normalVoltage, int channel) { + float getNormalPolyVoltage(float normalVoltage, int channel) const noexcept { return isConnected() ? getPolyVoltage(channel) : normalVoltage; } /** Returns a pointer to the array of voltages beginning with firstChannel. The pointer can be used for reading and writing. */ - float* getVoltages(int firstChannel = 0) { + float* getVoltages(int firstChannel = 0) noexcept { return &voltages[firstChannel]; } /** Copies the port's voltages to an array of size at least `channels`. */ - void readVoltages(float* v) { + void readVoltages(float* v) const noexcept { for (int c = 0; c < channels; c++) { v[c] = voltages[c]; } @@ -127,14 +127,14 @@ struct Port { } /** Sets all voltages to 0. */ - void clearVoltages() { + void clearVoltages() noexcept { for (int c = 0; c < channels; c++) { voltages[c] = 0.f; } } /** Returns the sum of all voltages. */ - float getVoltageSum() { + float getVoltageSum() const noexcept { float sum = 0.f; for (int c = 0; c < channels; c++) { sum += voltages[c]; @@ -145,7 +145,7 @@ struct Port { /** Returns the root-mean-square of all voltages. Uses sqrt() which is slow, so use a custom approximation if calling frequently. */ - float getVoltageRMS() { + float getVoltageRMS() const { if (channels == 0) { return 0.f; } @@ -162,22 +162,22 @@ struct Port { } template - T getVoltageSimd(int firstChannel) { + T getVoltageSimd(int firstChannel) const noexcept { return T::load(&voltages[firstChannel]); } template - T getPolyVoltageSimd(int firstChannel) { + T getPolyVoltageSimd(int firstChannel) const noexcept { return isMonophonic() ? getVoltage(0) : getVoltageSimd(firstChannel); } template - T getNormalVoltageSimd(T normalVoltage, int firstChannel) { + T getNormalVoltageSimd(T normalVoltage, int firstChannel) const noexcept { return isConnected() ? getVoltageSimd(firstChannel) : normalVoltage; } template - T getNormalPolyVoltageSimd(T normalVoltage, int firstChannel) { + T getNormalPolyVoltageSimd(T normalVoltage, int firstChannel) const noexcept { return isConnected() ? getPolyVoltageSimd(firstChannel) : normalVoltage; } @@ -191,7 +191,7 @@ struct Port { If disconnected, this does nothing (`channels` remains 0). If 0 is given, `channels` is set to 1 but all voltages are cleared. */ - void setChannels(int channels) { + void setChannels(int channels) noexcept { // If disconnected, keep the number of channels at 0. if (this->channels == 0) { return; @@ -212,29 +212,29 @@ struct Port { /** Returns the number of channels. If the port is disconnected, it has 0 channels. */ - int getChannels() { + int getChannels() const noexcept { return channels; } /** Returns whether a cable is connected to the Port. You can use this for skipping code that generates output voltages. */ - bool isConnected() { + bool isConnected() const noexcept { return channels > 0; } /** Returns whether the cable exists and has 1 channel. */ - bool isMonophonic() { + bool isMonophonic() const noexcept { return channels == 1; } /** Returns whether the cable exists and has more than 1 channel. */ - bool isPolyphonic() { + bool isPolyphonic() const noexcept { return channels > 1; } /** Use getNormalVoltage() instead. */ - DEPRECATED float normalize(float normalVoltage) { + DEPRECATED float normalize(float normalVoltage) const noexcept { return getNormalVoltage(normalVoltage); } }; From 9b329eeb15d1870b4c9f8c2065d631db9bec1273 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Jul 2023 13:42:06 +0200 Subject: [PATCH 381/451] Update some docs Signed-off-by: falkTX --- docs/DIFFERENCES.md | 5 +++-- docs/FAQ.md | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/DIFFERENCES.md b/docs/DIFFERENCES.md index c5c52db0..024b81d8 100644 --- a/docs/DIFFERENCES.md +++ b/docs/DIFFERENCES.md @@ -35,13 +35,13 @@ Bellow follows a list of features comparing the official plugin to Cardinal. | Synth plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | FX plugin variant | 16 ins, 16 outs | 2 ins, 2 outs | | | Raw-CV plugin variant | Unsupported | 8 audio IO + 10 CV IO | Available in JACK, LV2 and VST3 formats, not possible in AU and VST2 | -| Arbitrary parameter automation | Yes | No | | +| Arbitrary parameter automation | Yes | No (*) | Static 24 automatable params, use Host Params/Map modules to map them to module parameters | | Integrated plugin host | No, Host payed separately | Yes, using Carla or Ildaeil | | | Host sync/timing | Using MIDI signals | Using dedicated module | | | Linux/X11 event handling | Runs on 2nd thread | Runs on main/GUI thread | | | v1 module compatibility | No | No, but with less restrictions | Module widgets can load resources at any point | | Online phone-home | Yes | No | Online access is strictly forbidden in Cardinal | -| Proper dark theme | No, only room brightness | Yes | All dark panel variants have explicit permission when required | +| Proper dark theme | WIP | Yes | All dark panel variants have explicit permission when required | | Proper Linux headless mode | No, always requires X11 | Yes | | Additionally, Cardinal contains the following built-in modules not present in the official plugin or standalone: @@ -50,6 +50,7 @@ Additionally, Cardinal contains the following built-in modules not present in th * Mog (never updated to v2) * mscHack (never updated to v2) * rackwindows + * AIDA-X * Audio File * Audio to CV Pitch converter * Carla Plugin Host diff --git a/docs/FAQ.md b/docs/FAQ.md index abdceff8..17d19dae 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -43,10 +43,16 @@ where we discuss possible modules to include. ## Changes are lost on restart -This is intentional. -Cardinal is meant to be a self-contained plugin, and as such it does not save any files whatsoever. -This includes user preferences (like list of favourites) or last used project. -As a plugin, the state will be saved together with the host/DAW project. +This is intentional. Unlike VCV Rack, Cardinal does not automatically save. + +Also, different variants (main vs FX vs Synth) use different files for saving their settings, so there might be some confusion arising from that. +But on the other hand this allows you to have a different template and other defaults per variant, which is quite handy. + +## Scaling/High-DPI not working properly, how to fix it? + +Cardinal, using [DPF](https://github.com/DISTRHO/DPF), will try to automatically detect the system scaling and adjust to that. +On cases where that does not work you can set `DPF_SCALE_FACTOR` environment variable to a value of your choosing in order to force a custom scale factor. +Note that this applies to all DPF-based plugins and not just Cardinal. ## On BSD/Linux/X11 the menu item "Save As/Export..." does nothing From 7c67f50d4de4355518105548a3b096ba4f1206a2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Jul 2023 13:47:01 +0200 Subject: [PATCH 382/451] Mention vst3 hosting being experimental Signed-off-by: falkTX --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8215a392..acd92d56 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Cardinal should be considered stable, if you spot any bugs please report them. Currently the following should be noted: - CLAP support is a work-in-progress [DPF#383](https://github.com/DISTRHO/DPF/issues/383) +- VST3 plugin hosting (inside Carla or Ildaeil modules) mostly works but is considered experimental - Windows 32bit builds still have a few problematic modules [#80](https://github.com/DISTRHO/Cardinal/issues/80) ### Stable release From 302200870694eeb3040dff8f04cb4b00118cf332 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Jul 2023 16:29:55 +0200 Subject: [PATCH 383/451] Fix modgui after latest changes, correct full screen behaviour Signed-off-by: falkTX --- dpf | 2 +- src/CardinalCommon.cpp | 6 ++++-- src/Makefile.cardinal.mk | 11 ++++++++--- src/override/MenuBar.cpp | 10 +++++++--- src/override/Window.cpp | 8 +++++++- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/dpf b/dpf index e288f163..ed6a093a 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit e288f163bbf3af6ae24e9df6cdd23e755ff1aaf5 +Subproject commit ed6a093adea616cc856ef0ccb7a508410f017620 diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 223ac688..7301a334 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -376,7 +376,7 @@ static int osc_screenshot_handler(const char*, const char* types, lo_arg** argv, // ----------------------------------------------------------------------------------------------------------- -#ifdef DISTRHO_OS_WASM +#if defined(DISTRHO_OS_WASM) && !defined(CARDINAL_COMMON_UI_ONLY) static void WebBrowserDataLoaded(void* const data) { static_cast(data)->loadSettings(true); @@ -503,7 +503,7 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (isRealInstance) { system::createDirectory(asset::userDir); - #ifdef DISTRHO_OS_WASM + #if defined(DISTRHO_OS_WASM) && !defined(CARDINAL_COMMON_UI_ONLY) EM_ASM({ Module.FS.mount(Module.IDBFS, {}, '/userfiles'); Module.FS.syncfs(true, function(err) { if (!err) { dynCall('vi', $0, [$1]) } }); @@ -735,9 +735,11 @@ void syncfs() { settings::save(); + #ifndef CARDINAL_COMMON_UI_ONLY EM_ASM({ Module.FS.syncfs(false, function(){} ); }); + #endif } #endif diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index f05c936d..258d5a05 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -267,6 +267,9 @@ include ../../dpf/Makefile.plugins.mk BASE_FLAGS += -DPRIVATE= +# -------------------------------------------------------------- +# Extra flags for MOD and Mini stuff + ifeq ($(MOD_BUILD),true) BASE_FLAGS += -DDISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE=0xffff BASE_FLAGS += -DDISTRHO_PLUGIN_USES_MODGUI=1 @@ -284,9 +287,6 @@ LINK_FLAGS += -sALLOW_MEMORY_GROWTH LINK_FLAGS += -sINITIAL_MEMORY=64Mb LINK_FLAGS += -sLZ4=1 LINK_FLAGS += -sSTACK_SIZE=5MB -LINK_FLAGS += -lidbfs.js - -JACK_LIBS += -sEXPORTED_RUNTIME_METHODS=IDBFS,FS,cwrap ifeq ($(CARDINAL_VARIANT),mini) LINK_FLAGS += --preload-file=../../bin/CardinalMini.lv2/resources@/resources @@ -296,6 +296,11 @@ LINK_FLAGS += --use-preload-cache LINK_FLAGS += --use-preload-plugins endif +ifneq ($(DSP_UI_SPLIT),true) +LINK_FLAGS += -lidbfs.js +JACK_LIBS += -sEXPORTED_RUNTIME_METHODS=IDBFS,FS,cwrap +endif + # find . -type l | grep -v svg | grep -v ttf | grep -v art | grep -v json | grep -v png | grep -v otf | sort SYMLINKED_DIRS_RESOURCES = Fundamental/presets ifneq ($(CARDINAL_VARIANT),mini) diff --git a/src/override/MenuBar.cpp b/src/override/MenuBar.cpp index 9ec3acb6..9928ac07 100644 --- a/src/override/MenuBar.cpp +++ b/src/override/MenuBar.cpp @@ -165,7 +165,6 @@ struct FileButton : MenuButton { menu->addChild(createMenuItem("New (factory template)", "", []() { patchUtils::loadTemplateDialog(true); })); -#endif #ifndef DISTRHO_OS_WASM constexpr const char* const OpenName = "Open..."; @@ -195,6 +194,7 @@ struct FileButton : MenuButton { })); } }, settings::recentPatchPaths.empty())); +#endif if (!demoPatches.empty()) { @@ -220,11 +220,11 @@ struct FileButton : MenuButton { })); } +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS menu->addChild(createMenuItem("Import selection...", "", [=]() { patchUtils::loadSelectionDialog(); }, false, true)); -#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS menu->addChild(new ui::MenuSeparator); #ifndef DISTRHO_OS_WASM @@ -266,7 +266,6 @@ struct FileButton : MenuButton { menu->addChild(createMenuItem("Overwrite template", "", []() { patchUtils::saveTemplateDialog(); })); -#endif #ifdef DISTRHO_OS_WASM menu->addChild(new ui::MenuSeparator); @@ -278,6 +277,7 @@ struct FileButton : MenuButton { }, WebBrowserDataSaved); })); #endif +#endif #if defined(HAVE_LIBLO) || ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS #ifdef __MOD_DEVICES__ @@ -598,6 +598,7 @@ struct KnobScrollSensitivitySlider : ui::Slider { }; +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS static void setAllFramebufferWidgetsDirty(widget::Widget* const widget) { for (widget::Widget* child : widget->children) @@ -610,6 +611,7 @@ static void setAllFramebufferWidgetsDirty(widget::Widget* const widget) setAllFramebufferWidgetsDirty(child); } } +#endif struct ViewButton : MenuButton { @@ -620,6 +622,7 @@ struct ViewButton : MenuButton { menu->addChild(createMenuLabel("Appearance")); +#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS std::string darkModeText; if (settings::darkMode) darkModeText = CHECKMARK_STRING; @@ -627,6 +630,7 @@ struct ViewButton : MenuButton { switchDarkMode(!settings::darkMode); setAllFramebufferWidgetsDirty(APP->scene); })); +#endif menu->addChild(createBoolPtrMenuItem("Show tooltips", "", &settings::tooltips)); diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 66b62d34..776c9e14 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -805,9 +805,15 @@ int Window::getMods() { void Window::setFullScreen(bool fullScreen) { #ifdef DISTRHO_OS_WASM if (fullScreen) - emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false); + { + try { + emscripten_request_fullscreen(internal->tlw->getWindow().getApp().getClassName(), false); + } DISTRHO_SAFE_EXCEPTION("fullscreen"); + } else + { emscripten_exit_fullscreen(); + } #endif } From 0f5477d99c04c6fc4ef91301f0939937892c3b9b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Jul 2023 16:31:12 +0200 Subject: [PATCH 384/451] Bump version to 23.07 Signed-off-by: falkTX --- Makefile | 2 +- jucewrapper/CMakeLists.txt | 2 +- src/CardinalCommon.cpp | 2 +- src/CardinalPlugin.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 01e0859a..6d16f4c2 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ include $(ROOT)/Makefile.base.mk # jucewrapper/CMakeLists.txt `project` # src/CardinalCommon.cpp `CARDINAL_VERSION` # src/CardinalPlugin.cpp `getVersion` -VERSION = 23.05 +VERSION = 23.07 # -------------------------------------------------------------- # Build targets diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 2b47a161..6d30d3f9 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 23.05) +project(Cardinal VERSION 23.07) include(FetchContent) FetchContent_Declare(JUCE diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index 7301a334..4546779d 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -106,7 +106,7 @@ void destroyStaticPlugins(); } } -const std::string CARDINAL_VERSION = "23.05"; +const std::string CARDINAL_VERSION = "23.07"; START_NAMESPACE_DISTRHO diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 7155f9ae..c79fd295 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -396,7 +396,7 @@ class CardinalPlugin : public CardinalBasePlugin uint32_t getVersion() const override { - return d_version(0, 23, 5); + return d_version(0, 23, 7); } int64_t getUniqueId() const override From 391d44f7d31c819e9a0739e19d3b9115b0a374e9 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Jul 2023 21:59:44 +0200 Subject: [PATCH 385/451] Implement AIDA-X panel Signed-off-by: falkTX --- plugins/Cardinal/orig/AIDA-X.svg | 137 ---------- plugins/Cardinal/res/AIDA-X.svg | 160 ++++-------- plugins/Cardinal/res/aida-x-background-p2.png | Bin 0 -> 39291 bytes plugins/Cardinal/res/aida-x-header.png | Bin 0 -> 130611 bytes plugins/Cardinal/res/aida-x-knob.svg | 48 +++- plugins/Cardinal/res/aida-x-logo.png | Bin 0 -> 18539 bytes plugins/Cardinal/src/AIDA-X.cpp | 238 +++++++++++++++--- plugins/Cardinal/src/ImGuiWidget.cpp | 3 + 8 files changed, 305 insertions(+), 281 deletions(-) delete mode 100644 plugins/Cardinal/orig/AIDA-X.svg create mode 100644 plugins/Cardinal/res/aida-x-background-p2.png create mode 100644 plugins/Cardinal/res/aida-x-header.png create mode 100644 plugins/Cardinal/res/aida-x-logo.png diff --git a/plugins/Cardinal/orig/AIDA-X.svg b/plugins/Cardinal/orig/AIDA-X.svg deleted file mode 100644 index 58d5190f..00000000 --- a/plugins/Cardinal/orig/AIDA-X.svg +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - Aida DSP : AIDA-X - - diff --git a/plugins/Cardinal/res/AIDA-X.svg b/plugins/Cardinal/res/AIDA-X.svg index 1cc3277e..ea37b2fa 100644 --- a/plugins/Cardinal/res/AIDA-X.svg +++ b/plugins/Cardinal/res/AIDA-X.svg @@ -7,12 +7,34 @@ viewBox="0 0 116.84 128.5" version="1.1" id="svg4620" - xmlns:xlink="http://www.w3.org/1999/xlink" + sodipodi:docname="AIDA-X.svg" + inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> +