Browse Source

Merge branch 'main' into imgui

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
d1916efe99
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
27 changed files with 277 additions and 62 deletions
  1. +31
    -52
      .github/workflows/build.yml
  2. +1
    -1
      dpf
  3. +1
    -1
      plugins/DrumKit
  4. +1
    -0
      plugins/res/AS
  5. +1
    -0
      plugins/res/AmalgamatedHarmonics
  6. +1
    -0
      plugins/res/AnimatedCircuits
  7. +1
    -0
      plugins/res/AudibleInstruments
  8. +1
    -0
      plugins/res/Befaco
  9. +1
    -0
      plugins/res/Bidoo
  10. +1
    -0
      plugins/res/BogaudioModules
  11. +1
    -0
      plugins/res/Cardinal
  12. +1
    -0
      plugins/res/DrumKit
  13. +1
    -0
      plugins/res/ESeries
  14. +1
    -0
      plugins/res/Fundamental
  15. +1
    -0
      plugins/res/GrandeModular
  16. +1
    -0
      plugins/res/ImpromptuModular
  17. +1
    -0
      plugins/res/JW-Modules
  18. +1
    -0
      plugins/res/MindMeldModular
  19. +1
    -0
      plugins/res/ValleyAudio
  20. +1
    -0
      plugins/res/ZetaCarinaeModules
  21. +1
    -0
      plugins/res/cf
  22. +1
    -0
      plugins/res/rackwindows
  23. +3
    -1
      src/CardinalPlugin.cpp
  24. +3
    -0
      src/Makefile
  25. +1
    -1
      src/Makefile.cardinal.mk
  26. +2
    -6
      src/override/asset.cpp
  27. +216
    -0
      src/override/dep.cpp

+ 31
- 52
.github/workflows/build.yml View File

@@ -10,6 +10,7 @@ on:
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_AUTO_UPDATE: 1
LIBGL_ALWAYS_SOFTWARE: "true"


jobs: jobs:
linux-arm64: linux-arm64:
@@ -26,7 +27,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-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 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 update -qq
sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static xvfb
sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static
# extra for vcv deps # extra for vcv deps
sudo apt-get install -yqq libxi-dev:arm64 libxinerama-dev:arm64 sudo apt-get install -yqq libxi-dev:arm64 libxinerama-dev:arm64
- name: Build linux arm64 cross-compiled - name: Build linux arm64 cross-compiled
@@ -35,10 +36,9 @@ jobs:
CXX: aarch64-linux-gnu-g++ CXX: aarch64-linux-gnu-g++
LDFLAGS: -static-libgcc -static-libstdc++ LDFLAGS: -static-libgcc -static-libstdc++
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
make features make features
xvfb-run -a -- make WITH_LTO=true -j $(nproc)
make WITH_LTO=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -65,7 +65,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-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 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 update -qq
sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static xvfb
sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static
# extra for vcv deps # extra for vcv deps
sudo apt-get install -yqq libxi-dev:armhf libxinerama-dev:armhf sudo apt-get install -yqq libxi-dev:armhf libxinerama-dev:armhf
- name: Build linux armhf cross-compiled - name: Build linux armhf cross-compiled
@@ -74,10 +74,9 @@ jobs:
CXX: arm-linux-gnueabihf-g++ CXX: arm-linux-gnueabihf-g++
LDFLAGS: -static-libgcc -static-libstdc++ LDFLAGS: -static-libgcc -static-libstdc++
PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
make features make features
xvfb-run -a -- make WITH_LTO=true -j $(nproc)
make WITH_LTO=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -100,7 +99,7 @@ jobs:
run: | run: |
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libcairo2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 xvfb
sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libcairo2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386
# extra for vcv deps # extra for vcv deps
sudo apt-get install -yqq libxi-dev:i386 libxinerama-dev:i386 sudo apt-get install -yqq libxi-dev:i386 libxinerama-dev:i386
- name: Build linux x86 - name: Build linux x86
@@ -111,10 +110,9 @@ jobs:
CXXFLAGS: -m32 CXXFLAGS: -m32
LDFLAGS: -m32 -static-libgcc -static-libstdc++ LDFLAGS: -m32 -static-libgcc -static-libstdc++
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
make features make features
xvfb-run -a -- make WITH_LTO=true -j $(nproc)
make WITH_LTO=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -136,16 +134,15 @@ jobs:
- name: Set up dependencies - name: Set up dependencies
run: | run: |
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb
sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
# extra for vcv deps # extra for vcv deps
sudo apt-get install -yqq libxi-dev libxinerama-dev sudo apt-get install -yqq libxi-dev libxinerama-dev
- name: Build linux x86_64 - name: Build linux x86_64
env: env:
LDFLAGS: -static-libgcc -static-libstdc++ LDFLAGS: -static-libgcc -static-libstdc++
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
make features make features
xvfb-run -a -- make WITH_LTO=true -j $(nproc)
make WITH_LTO=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -167,16 +164,15 @@ jobs:
- name: Set up dependencies - name: Set up dependencies
run: | run: |
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb
sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
# extra for vcv deps # extra for vcv deps
sudo apt-get install -yqq libxi-dev libxinerama-dev sudo apt-get install -yqq libxi-dev libxinerama-dev
- name: Build linux x86_64 (debug) - name: Build linux x86_64 (debug)
env: env:
LDFLAGS: -static-libgcc -static-libstdc++ LDFLAGS: -static-libgcc -static-libstdc++
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
make features make features
xvfb-run -a -- make DEBUG=true -j $(nproc)
make DEBUG=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -227,23 +223,19 @@ jobs:
run: | run: |
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 xvfb
sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
- name: Build win32 cross-compiled - name: Build win32 cross-compiled
env: env:
CC: i686-w64-mingw32-gcc CC: i686-w64-mingw32-gcc
CXX: i686-w64-mingw32-g++ CXX: i686-w64-mingw32-g++
EXE_WRAPPER: wine EXE_WRAPPER: wine
PKG_CONFIG: "false" PKG_CONFIG: "false"
LIBGL_ALWAYS_SOFTWARE: "true"
WINEARCH: "win32" WINEARCH: "win32"
WINEDEBUG: "-all" WINEDEBUG: "-all"
WINEDLLOVERRIDES: "mscoree,mshtml=" WINEDLLOVERRIDES: "mscoree,mshtml="
run: | run: |
make features make features
xvfb-run wineboot -u
echo -e '[HKEY_CURRENT_USER\Software\Wine\WineDbg]\n"ShowCrashDialog"=dword:00000000\n' > nodiag.reg
xvfb-run regedit nodiag.reg
xvfb-run -a -- make WITH_LTO=true -j $(nproc)
make WITH_LTO=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -265,23 +257,19 @@ jobs:
- name: Set up dependencies - name: Set up dependencies
run: | run: |
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable xvfb
sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
- name: Build win64 cross-compiled - name: Build win64 cross-compiled
env: env:
CC: x86_64-w64-mingw32-gcc CC: x86_64-w64-mingw32-gcc
CXX: x86_64-w64-mingw32-g++ CXX: x86_64-w64-mingw32-g++
EXE_WRAPPER: wine EXE_WRAPPER: wine
PKG_CONFIG: "false" PKG_CONFIG: "false"
LIBGL_ALWAYS_SOFTWARE: "true"
WINEARCH: "win64" WINEARCH: "win64"
WINEDEBUG: "-all" WINEDEBUG: "-all"
WINEDLLOVERRIDES: "mscoree,mshtml=" WINEDLLOVERRIDES: "mscoree,mshtml="
run: | run: |
make features make features
xvfb-run wineboot -u
echo -e '[HKEY_CURRENT_USER\Software\Wine\WineDbg]\n"ShowCrashDialog"=dword:00000000\n' > nodiag.reg
xvfb-run regedit nodiag.reg
xvfb-run -a -- make WITH_LTO=true -j $(nproc)
make WITH_LTO=true -j $(nproc)
- name: Set sha8 - name: Set sha8
id: slug id: slug
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
@@ -307,7 +295,7 @@ jobs:
sudo dpkg -i kxstudio-repos_10.0.3_all.deb sudo dpkg -i kxstudio-repos_10.0.3_all.deb
sudo apt-get update -qq sudo apt-get update -qq
# build-deps # build-deps
sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb
sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
# extra for vcv deps # extra for vcv deps
sudo apt-get install -yqq libxi-dev libxinerama-dev sudo apt-get install -yqq libxi-dev libxinerama-dev
# runtime testing # runtime testing
@@ -317,10 +305,9 @@ jobs:
CFLAGS: -g CFLAGS: -g
CXXFLAGS: -g -DDPF_ABORT_ON_ERROR CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
LDFLAGS: -static-libgcc -static-libstdc++ LDFLAGS: -static-libgcc -static-libstdc++
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
make features make features
xvfb-run -a -- make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
- name: Validate LV2 ttl syntax - name: Validate LV2 ttl syntax
run: | run: |
lv2_validate \ lv2_validate \
@@ -330,23 +317,19 @@ jobs:
/usr/lib/lv2/kx-programs.lv2/*.ttl \ /usr/lib/lv2/kx-programs.lv2/*.ttl \
./bin/*.lv2/*.ttl ./bin/*.lv2/*.ttl
#- name: Validate LV2 metadata and binaries #- name: Validate LV2 metadata and binaries
#env:
#LIBGL_ALWAYS_SOFTWARE: "true"
#run: | #run: |
#export LV2_PATH=/tmp/lv2-path #export LV2_PATH=/tmp/lv2-path
#mkdir ${LV2_PATH} #mkdir ${LV2_PATH}
#cp -r bin/*.lv2 \ #cp -r bin/*.lv2 \
#/usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ #/usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \
#${LV2_PATH} #${LV2_PATH}
#xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
#lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
- name: Test LV2 plugin - name: Test LV2 plugin
env:
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
export LV2_PATH=/tmp/lv2-path export LV2_PATH=/tmp/lv2-path
for p in $(lv2ls); do \ for p in $(lv2ls); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
xvfb-run valgrind \
valgrind \
--error-exitcode=255 \ --error-exitcode=255 \
--leak-check=no \ --leak-check=no \
--track-origins=yes \ --track-origins=yes \
@@ -354,28 +337,24 @@ jobs:
/usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \ /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
done done
- name: Test VST2 plugin - name: Test VST2 plugin
env:
LIBGL_ALWAYS_SOFTWARE: "true"
run: | run: |
for p in $(ls bin/ | grep vst.so); do \ for p in $(ls bin/ | grep vst.so); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
xvfb-run valgrind \
valgrind \
--error-exitcode=255 \ --error-exitcode=255 \
--leak-check=no \ --leak-check=no \
--track-origins=yes \ --track-origins=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \ --suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native vst2 ./bin/${p} "" 1>/dev/null; \ /usr/lib/carla/carla-bridge-native vst2 ./bin/${p} "" 1>/dev/null; \
done done
- name: Test VST3 plugin
env:
LIBGL_ALWAYS_SOFTWARE: "true"
run: |
for p in $(ls bin/ | grep vst3); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
xvfb-run valgrind \
--error-exitcode=255 \
--leak-check=no \
--track-origins=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
done
# - name: Test VST3 plugin
# run: |
# for p in $(ls bin/ | grep vst3); do \
# env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
# valgrind \
# --error-exitcode=255 \
# --leak-check=no \
# --track-origins=yes \
# --suppressions=./dpf/utils/valgrind-dpf.supp \
# /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
# done

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 0f31c24917043d6841fcc16efcb0e4e85bc51a89
Subproject commit ad055720fc348478717037017edb003072278d6d

+ 1
- 1
plugins/DrumKit

@@ -1 +1 @@
Subproject commit 58755a32837522a64b6b886b764dbefc9a2b8fd3
Subproject commit 53205f4f58d84ed02ebdc23d80ef86d90ce2d61b

+ 1
- 0
plugins/res/AS View File

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

+ 1
- 0
plugins/res/AmalgamatedHarmonics View File

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

+ 1
- 0
plugins/res/AnimatedCircuits View File

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

+ 1
- 0
plugins/res/AudibleInstruments View File

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

+ 1
- 0
plugins/res/Befaco View File

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

+ 1
- 0
plugins/res/Bidoo View File

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

+ 1
- 0
plugins/res/BogaudioModules View File

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

+ 1
- 0
plugins/res/Cardinal View File

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

+ 1
- 0
plugins/res/DrumKit View File

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

+ 1
- 0
plugins/res/ESeries View File

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

+ 1
- 0
plugins/res/Fundamental View File

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

+ 1
- 0
plugins/res/GrandeModular View File

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

+ 1
- 0
plugins/res/ImpromptuModular View File

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

+ 1
- 0
plugins/res/JW-Modules View File

@@ -0,0 +1 @@
../JW-Modules/res

+ 1
- 0
plugins/res/MindMeldModular View File

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

+ 1
- 0
plugins/res/ValleyAudio View File

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

+ 1
- 0
plugins/res/ZetaCarinaeModules View File

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

+ 1
- 0
plugins/res/cf View File

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

+ 1
- 0
plugins/res/rackwindows View File

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

+ 3
- 1
src/CardinalPlugin.cpp View File

@@ -379,7 +379,9 @@ public:
context->event = new rack::widget::EventState; context->event = new rack::widget::EventState;
context->scene = new rack::app::Scene; context->scene = new rack::app::Scene;
context->event->rootWidget = context->scene; context->event->rootWidget = context->scene;
context->window = new rack::window::Window;
if (! isDummyInstance())
context->window = new rack::window::Window;
context->patch->loadTemplate(); context->patch->loadTemplate();
context->scene->rackScroll->reset(); context->scene->rackScroll->reset();


+ 3
- 0
src/Makefile View File

@@ -68,6 +68,9 @@ BUILD_C_FLAGS += -std=gnu11
BUILD_C_FLAGS += -fno-finite-math-only BUILD_C_FLAGS += -fno-finite-math-only
BUILD_CXX_FLAGS += -fno-finite-math-only BUILD_CXX_FLAGS += -fno-finite-math-only


# use our custom function to filter out VCV trademarks
BUILD_CXX_FLAGS += -DnsvgParseFromFile=nsvgParseFromFileCardinal

# -------------------------------------------------------------- # --------------------------------------------------------------
# Rack files to build # Rack files to build




+ 1
- 1
src/Makefile.cardinal.mk View File

@@ -170,7 +170,7 @@ all: jack lv2 vst2 vst3 resources


ifeq ($(NAME),Cardinal) ifeq ($(NAME),Cardinal)


CORE_RESOURCES = $(subst ../Rack/res/,,$(wildcard ../Rack/res/*)) template.vcv
CORE_RESOURCES = $(filter-out icon.png,$(subst ../Rack/res/,,$(wildcard ../Rack/res/*))) template.vcv


PLUGIN_RESOURCES += $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.lv2/resources/%) PLUGIN_RESOURCES += $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.lv2/resources/%)
ifeq ($(MACOS),true) ifeq ($(MACOS),true)


+ 2
- 6
src/override/asset.cpp View File

@@ -37,12 +37,8 @@ std::string bundlePath; // points to plugin manifests dir (or empty)
// get rid of "res/" prefix // get rid of "res/" prefix
static inline std::string& trim(std::string& s) static inline std::string& trim(std::string& s)
{ {
if (std::strncmp(s.c_str(), "res" DISTRHO_OS_SEP_STR, 4) == 0)
s = s.substr(4, s.size()-4);
#if DISTRHO_OS_SEP != '/'
if (std::strncmp(s.c_str(), "res/", 4) == 0) if (std::strncmp(s.c_str(), "res/", 4) == 0)
s = s.substr(4, s.size()-4); s = s.substr(4, s.size()-4);
#endif
return s; return s;
} }


@@ -59,7 +55,7 @@ std::string system(std::string filename) {
// get plugin resource, also trims "res/" as needed // get plugin resource, also trims "res/" as needed
std::string plugin(plugin::Plugin* plugin, std::string filename) { std::string plugin(plugin::Plugin* plugin, std::string filename) {
DISTRHO_SAFE_ASSERT_RETURN(plugin != nullptr, {}); DISTRHO_SAFE_ASSERT_RETURN(plugin != nullptr, {});
return system::join(plugin->path, bundlePath.empty() ? filename : trim(filename));
return system::join(plugin->path, trim(filename));
} }


// path to plugin manifest // path to plugin manifest
@@ -79,7 +75,7 @@ std::string pluginPath(const std::string& dirname) {
{ {
if (dirname == "Core") if (dirname == "Core")
return systemDir; return systemDir;
return system::join(systemDir, "..", "..", "plugins", dirname);
return system::join(systemDir, "..", "..", "plugins", "res", dirname);
} }
return system::join(systemDir, dirname); return system::join(systemDir, dirname);
} }


+ 216
- 0
src/override/dep.cpp View File

@@ -16,6 +16,7 @@
*/ */


#include <cstdio> #include <cstdio>
#include <cstring>


// fix blendish build, missing symbol in debug mode // fix blendish build, missing symbol in debug mode
#ifdef DEBUG #ifdef DEBUG
@@ -39,4 +40,219 @@ float FollowerBase::efGainMaxDecibelsDebug = 12.0f;
// Compile those nice implementation-in-header little libraries // Compile those nice implementation-in-header little libraries
#define NANOSVG_IMPLEMENTATION #define NANOSVG_IMPLEMENTATION
#define NANOSVG_ALL_COLOR_KEYWORDS #define NANOSVG_ALL_COLOR_KEYWORDS
#undef nsvgParseFromFile
#include <nanosvg.h> #include <nanosvg.h>

// Custom Cardinal filtering
static const struct {
const char* filename;
const char* shapes[4];
} pathsToFilterOut[] = {
{
"Core/AudioInterface.svg",
{"path39377","path39381","path39383","path39379"}
},
{
"Core/AudioInterface2.svg",
{"path18733","path18737","path18731","path18735"}
},
{
"Core/AudioInterface16.svg",
{"path40283","path40287","path40289","path40285"}
},
{
"Core/CV-CC.svg",
{"path12881","path12885","path12887","path12883"}
},
{
"Core/CV-Gate.svg",
{"path13127","path13131","path13133","path13129"}
},
{
"Core/CV-MIDI.svg",
{"path12747","path12751","path12753","path12749"}
},
{
"Core/MIDI-CC.svg",
{"path9740","path9744","path9746","path9742"}
},
{
"Core/MIDI-CV.svg",
{"path11803","path11807","path11809","path11805"}
},
{
"Core/MIDI-Gate.svg",
{"path11634","path11638","path11640","path11636"}
},
{
"Core/MIDI-Map.svg",
{"path21209","path21213","path21215","path21211"}
},
{
"Core/Notes.svg",
{"path6935","path6939","path6941","path6937"}
},
{
"Fundamental/8vert.svg",
{"path69642","path69646","path69640","path69644"}
},
{
"Fundamental/ADSR.svg",
{"path33693","path33697","path33699","path33695"}
},
{
"Fundamental/Delay.svg",
{"path25369","path25373","path25375","path25371"}
},
{
"Fundamental/LFO-1.svg",
{"path35889","path35893","path35895","path35891"}
},
{
"Fundamental/LFO-2.svg",
{"path36131","path36135","path36137","path36133"}
},
{
"Fundamental/Merge.svg",
{"path29991","path29995","path29989","path29993"}
},
{
"Fundamental/MidSide.svg",
{"path44181","path44185","path44179","path44183"}
},
{
"Fundamental/Mutes.svg",
{"path21613","path21617","path21611","path21615"}
},
{
"Fundamental/Noise.svg",
{"path105594","path105598","path105592","path105596"}
},
{
"Fundamental/Octave.svg",
{"path38471","path38475","path38469","path38473"}
},
{
"Fundamental/Pulses.svg",
{"path46241","path46245","path46239","path46243"}
},
{
"Fundamental/Quantizer.svg",
{"path38549","path38553","path38547","path38551"}
},
{
"Fundamental/Random.svg",
{"path89732","path89736","path89730","path89734"}
},
{
"Fundamental/SEQ3.svg",
{"path35687","path35691","path35693","path35689"}
},
{
"Fundamental/Scope.svg",
{"path33887","path33891","path33893","path33889"}
},
/* These 2 do not have logos on them?
{
"Fundamental/SequentialSwitch1.svg",
{"_______","_______","_______","_______"}
},
{
"Fundamental/SequentialSwitch2.svg",
{"_______","_______","_______","_______"}
},
*/
{
"Fundamental/Split.svg",
{"path29999","path30003","path29997","path30001"}
},
{
"Fundamental/Sum.svg",
{"path10913","path10917","path10911","path10915"}
},
{
"Fundamental/Unity.svg",
{"path21219","path21223","path21217","path21221"}
},
/* These 2 do not have logos on them?
{
"Fundamental/VCA-1.svg",
{"_______","_______","_______","_______"}
},
{
"Fundamental/VCA.svg",
{"_______","_______","_______","_______"}
},
*/
{
"Fundamental/VCF.svg",
{"path25239","path25243","path25245","path25241"}
},
{
"Fundamental/VCMixer.svg",
{"path125839","path125843","path125845","path125841"}
},
{
"Fundamental/VCO-1.svg",
{"path33533","path33537","path33539","path33535"}
},
{
"Fundamental/VCO-2.svg",
{"path37557","path37561","path37563","path37559"}
},
{
"Fundamental/Viz.svg",
{"path41769","path41773","path41767","path41771"}
},
};

static void removeShape(NSVGimage* const handle, const char* const id)
{
for (NSVGshape *shape = handle->shapes, *old = nullptr; shape; old = shape, shape = shape->next)
{
if (strcmp(shape->id, id) != 0)
continue;

if (old != nullptr)
old->next = shape->next;
else
handle->shapes = shape->next;

nsvg__deletePaths(shape->paths);
free(shape);
break;
}
}

extern "C" {
NSVGimage* nsvgParseFromFileCardinal(const char* filename, const char* units, float dpi);
}

NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* const units, const float dpi)
{
if (NSVGimage* const handle = nsvgParseFromFile(filename, units, dpi))
{
for (size_t i = 0; i < sizeof(pathsToFilterOut)/sizeof(pathsToFilterOut[0]); ++i)
{
const char* const pathToFilterOut = pathsToFilterOut[i].filename;
const size_t filenamelen = std::strlen(filename);
const size_t filterlen = std::strlen(pathToFilterOut);

if (filenamelen < filterlen)
continue;

if (std::strncmp(filename + (filenamelen-filterlen), pathToFilterOut, filterlen) == 0)
{
puts("Removing CC-ND deadlock from file...");
removeShape(handle, pathsToFilterOut[i].shapes[0]);
removeShape(handle, pathsToFilterOut[i].shapes[1]);
removeShape(handle, pathsToFilterOut[i].shapes[2]);
removeShape(handle, pathsToFilterOut[i].shapes[3]);
}
}

return handle;
}

return nullptr;
}

Loading…
Cancel
Save