diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e479b9e5..9a9145d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,12 +31,12 @@ jobs: curl -sLO https://launchpad.net/~kxstudio-debian/+archive/ubuntu/toolchain/+files/git-man_2.34.1-1ubuntu1~bpo20.04.1~ppa1_all.deb dpkg -i *.deb rm *.deb - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up build cache id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/PawPawBuilds @@ -108,7 +108,7 @@ jobs: - name: Pack binaries run: | 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 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-linux-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | @@ -126,7 +126,7 @@ jobs: linux-x86_64-debug: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up dependencies @@ -148,12 +148,12 @@ jobs: 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 || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs - - uses: actions/upload-artifact@v3 + tar -c -h --hard-dereference -J -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }}.tar.xz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }} path: | - *.tar.gz + *.tar.xz macos: strategy: @@ -161,12 +161,12 @@ jobs: target: [universal-10.15] runs-on: macos-11 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/PawPawBuilds @@ -199,15 +199,6 @@ jobs: 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' - shell: bash - run: | - export PATH="/usr/local/opt/ccache/libexec:${PATH}" - source deps/PawPaw/local.env macos-${{ matrix.target }} - 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 (packaging) if: steps.cache.outputs.cache-hit == 'true' shell: bash @@ -224,7 +215,7 @@ jobs: if: steps.cache.outputs.cache-hit == 'true' run: | 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 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | @@ -252,11 +243,11 @@ jobs: target: moddwarf runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: mpb-cache with: path: | @@ -286,7 +277,7 @@ jobs: if: steps.mpb-cache.outputs.cache-hit == 'true' run: | 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 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-${{ matrix.name }}-${{ github.event.pull_request.number || env.SHA8 }} path: | @@ -298,12 +289,12 @@ jobs: target: [simd, nosimd] runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/PawPawBuilds @@ -370,7 +361,7 @@ jobs: 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 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | @@ -396,12 +387,12 @@ jobs: - name: Install git run: | apt-get update -qq && apt-get install -yqq --no-install-recommends ca-certificates git openssl - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/PawPawBuilds @@ -464,7 +455,7 @@ jobs: 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 }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || env.SHA8 }} path: | @@ -484,7 +475,7 @@ jobs: headless: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up dependencies @@ -501,7 +492,7 @@ jobs: lto: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up dependencies @@ -517,7 +508,7 @@ jobs: sysdeps: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up dependencies @@ -533,7 +524,7 @@ jobs: source-tarball: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up dependencies @@ -551,7 +542,7 @@ jobs: - name: Set sha8 (release) if: startsWith(github.ref, 'refs/tags/') run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || env.SHA8 }} path: | @@ -573,12 +564,12 @@ jobs: plugin-validation: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up cache id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | src/Rack/dep/bin diff --git a/.gitmodules b/.gitmodules index 56ea39af..e9d727a4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -233,6 +233,9 @@ [submodule "plugins/DHE-Modules"] path = plugins/DHE-Modules url = https://github.com/dhemery/DHE-Modules.git +[submodule "plugins/CVfunk"] + path = plugins/CVfunk + url = https://github.com/codygeary/CVfunk-Modules.git [submodule "plugins/StarlingVia"] path = plugins/StarlingVia url = https://github.com/starlingcode/Via-for-Rack.git diff --git a/Makefile.base.mk b/Makefile.base.mk index 9c5097fa..e7e468f0 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -57,6 +57,7 @@ endif # ----------------------------------------------------------------------------- # Custom build flags +BASE_FLAGS += -DUSING_CARDINAL_NOT_RACK BASE_FLAGS += -I$(abspath $(ROOT)/include) BASE_FLAGS += -I$(abspath $(ROOT)/include/simd-compat) BASE_FLAGS += -I$(RACK_DEP_PATH)/include diff --git a/README.md b/README.md index 7e9238a0..8db37a58 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,7 @@ At the moment the following 3rd-party modules are provided: - [Catro/Modulo](https://github.com/catronomix/catro-modulo) - [cf](https://github.com/cfoulc/cf) - [ChowDSP](https://github.com/jatinchowdhury18/ChowDSP-VCV) +- [CVfunk](https://github.com/codygeary/CVfunk-Modules) - [dBiz](https://github.com/dBiz/dBiz) - [DHE Modules](https://github.com/dhemery/DHE-Modules) - [DrumKit](https://svmodular.com/plugin/vcv/drumkit.html) diff --git a/carla b/carla index c2031edc..fe8631bc 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit c2031edc1c82c3e760394b6363627caf25a7c256 +Subproject commit fe8631bc13a507507ccc6b5c408d5a4a880b1936 diff --git a/docs/LICENSES.md b/docs/LICENSES.md index a5eb2425..32b7d7e4 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 | | +| CVfunk | MIT | | | dBiz | GPL-3.0-or-later | | | DHE-Modules | MIT | | | DrumKit | CC0-1.0 | | @@ -158,6 +159,7 @@ 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 | | +| CVfunk/* | MIT | Same license as source code | | dBiz/* | CC-BY-NC-ND-4.0 | | | dBiz/DejaVuSansMono.ttf | Bitstream-Vera | | | dBiz/ShareTechMono-Regular.ttf | OFL-1.1 | | diff --git a/dpf b/dpf index 1d5a31c1..fb0e7bff 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 1d5a31c1e2fec45b23e05543c646ae6092693914 +Subproject commit fb0e7bff261b3a28dd1ce3f3604e30afb7c1dcb8 diff --git a/include/common.hpp b/include/common.hpp index f5ccbfc5..e63a1c40 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -67,7 +67,6 @@ namespace std { // Cardinal specific API #include -#define USING_CARDINAL_NOT_RACK // OS separator macros #ifdef ARCH_WIN diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt deleted file mode 100644 index d3848e21..00000000 --- a/jucewrapper/CMakeLists.txt +++ /dev/null @@ -1,547 +0,0 @@ -cmake_minimum_required(VERSION 3.15) -project(Cardinal VERSION 24.01) - -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 - -set(CMAKE_C_VISIBILITY_PRESET hidden) -set(CMAKE_CXX_VISIBILITY_PRESET hidden) - -# Define static libs - -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(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") - -add_library(sCardinalFX STATIC IMPORTED) -set_property(TARGET sCardinalFX PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/CardinalFX.a") - -add_library(sCardinalSynth STATIC IMPORTED) -set_property(TARGET sCardinalSynth PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../bin/CardinalSynth.a") - -add_library(sPlugins STATIC IMPORTED) -set_property(TARGET sPlugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../plugins/plugins.a") - -add_library(sRack STATIC IMPORTED) -set_property(TARGET sRack PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/rack.a") - -add_library(libaubio STATIC IMPORTED) -set_property(TARGET libaubio PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../deps/aubio/libaubio.a") - -add_library(libarchive STATIC IMPORTED) -if (WIN32) -set_property(TARGET libarchive PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libarchive_static.a") -else (WIN32) -set_property(TARGET libarchive PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libarchive.a") -endif (WIN32) - -add_library(libjansson STATIC IMPORTED) -set_property(TARGET libjansson PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libjansson.a") - -add_library(libquickjs STATIC IMPORTED) -set_property(TARGET libquickjs PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libquickjs.a") - -add_library(libsamplerate STATIC IMPORTED) -set_property(TARGET libsamplerate PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libsamplerate.a") - -add_library(libspeexdsp STATIC IMPORTED) -set_property(TARGET libspeexdsp PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../src/Rack/dep/lib/libspeexdsp.a") - -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) -pkg_check_modules(FFTW3F REQUIRED fftw3f) -pkg_check_modules(LIBLO REQUIRED liblo) -pkg_check_modules(SNDFILE REQUIRED sndfile) - -if (APPLE) -set(EXTRA_LIBS "-lz") -set(GL_LIBRARIES "-framework OpenGL") -set(PLUGIN_FORMATS AU) -else (APPLE) -pkg_check_modules(DBUS REQUIRED dbus-1) -pkg_check_modules(GL REQUIRED gl) -pkg_check_modules(X11 REQUIRED x11) -pkg_check_modules(XCURSOR REQUIRED xcursor) -pkg_check_modules(XEXT REQUIRED xext) -pkg_check_modules(XRANDR REQUIRED xrandr) -set(EXTRA_LIBS "-lrt") -set(STATIC_LIBS_START "-Wl,--whole-archive") -set(STATIC_LIBS_END "-Wl,--no-whole-archive") -set(PLUGIN_FORMATS Standalone VST3) -endif (APPLE) - -# Main variant - -#[[ -juce_add_plugin(Cardinal - AU_MAIN_TYPE kAudioUnitType_MusicEffect - 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 FALSE - IS_SYNTH FALSE - NEEDS_MIDI_INPUT TRUE - NEEDS_MIDI_OUTPUT TRUE - PLUGIN_CODE DcnM - PLUGIN_MANUFACTURER_CODE Dstr - PRODUCT_NAME "Cardinal") - -target_sources(Cardinal - PRIVATE - CardinalWrapper.cpp) - -target_include_directories(Cardinal - PRIVATE - ../dpf/distrho - ../dpf/dgl/src/pugl-upstream/include - ../src/Cardinal) - -target_compile_definitions(Cardinal - PUBLIC - DISTRHO_NAMESPACE=CardinalDISTRHO - DGL_NAMESPACE=CardinalDGL - JucePlugin_PreferredChannelConfigurations=8,8 - 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(Cardinal - PRIVATE - juce::juce_audio_utils - ${STATIC_LIBS_START} - sPlugins - sCardinal - sRack - carla_host_plugin - carla_engine_plugin - carla_plugin - native_plugins - audio_decoder - jackbridge - lilv - rtmempool - 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_warning_flags) -#]] - -# FX variant - -juce_add_plugin(CardinalFX - AU_MAIN_TYPE kAudioUnitType_MusicEffect - 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 FALSE - IS_SYNTH FALSE - NEEDS_MIDI_INPUT TRUE - NEEDS_MIDI_OUTPUT TRUE - PLUGIN_CODE DcnF - PLUGIN_MANUFACTURER_CODE Dstr - PRODUCT_NAME "CardinalFX") - -target_sources(CardinalFX - PRIVATE - CardinalWrapper.cpp) - -target_include_directories(CardinalFX - PRIVATE - ../dpf/distrho - ../dpf/dgl/src/pugl-upstream/include - ../src/CardinalFX) - -target_compile_definitions(CardinalFX - 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(CardinalFX - 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 - 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_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 - ../dpf/dgl/src/pugl-upstream/include - ../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 - 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_warning_flags) - -# Synth variant - -juce_add_plugin(CardinalSynth - AU_MAIN_TYPE kAudioUnitType_MusicDevice - 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 FALSE - IS_SYNTH TRUE - NEEDS_MIDI_INPUT TRUE - NEEDS_MIDI_OUTPUT TRUE - PLUGIN_CODE DcnS - PLUGIN_MANUFACTURER_CODE Dstr - PRODUCT_NAME "CardinalSynth") - -target_sources(CardinalSynth - PRIVATE - CardinalWrapper.cpp) - -target_include_directories(CardinalSynth - PRIVATE - ../dpf/distrho - ../dpf/dgl/src/pugl-upstream/include - ../src/CardinalSynth) - -target_compile_definitions(CardinalSynth - PUBLIC - DISTRHO_NAMESPACE=CardinalDISTRHO - DGL_NAMESPACE=CardinalDGL - JucePlugin_PreferredChannelConfigurations=0,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(CardinalSynth - PRIVATE - juce::juce_audio_utils - ${STATIC_LIBS_START} - sPlugins - sCardinalSynth - sRack - carla_host_plugin - carla_engine_plugin - carla_plugin - native_plugins - audio_decoder - jackbridge - lilv - rtmempool - 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_warning_flags) diff --git a/jucewrapper/CardinalWrapper.cpp b/jucewrapper/CardinalWrapper.cpp deleted file mode 100644 index 562c6f34..00000000 --- a/jucewrapper/CardinalWrapper.cpp +++ /dev/null @@ -1,694 +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. - */ - -#include - -#include -#if MAC_OS_X_VERSION_MAX_ALLOWED > 101500 - #error unwanted macOS version, too new -#endif - -#define createPlugin createStaticPlugin -#include "src/DistrhoPluginInternal.hpp" -#include "src/DistrhoUIInternal.hpp" - -START_NAMESPACE_DISTRHO - -// -------------------------------------------------------------------------------------------------------------------- - -class ParameterFromDPF : public juce::AudioProcessorParameter -{ - PluginExporter& plugin; - const ParameterEnumerationValues& enumValues; - const ParameterRanges& ranges; - const uint32_t hints; - const uint index; - bool* const updatedPtr; - mutable juce::StringArray dpfValueStrings; - -public: - ParameterFromDPF(PluginExporter& plugin_, const uint index_, bool* const updatedPtr_) - : plugin(plugin_), - enumValues(plugin_.getParameterEnumValues(index_)), - ranges(plugin_.getParameterRanges(index_)), - hints(plugin_.getParameterHints(index_)), - index(index_), - updatedPtr(updatedPtr_) {} - - void setValueNotifyingHostFromDPF(const float newValue) - { - setValueNotifyingHost(ranges.getNormalizedValue(newValue)); - *updatedPtr = false; - } - -protected: - float getValue() const override - { - return ranges.getNormalizedValue(plugin.getParameterValue(index)); - } - - void setValue(const float newValue) override - { - *updatedPtr = true; - plugin.setParameterValue(index, ranges.getUnnormalizedValue(newValue)); - } - - float getDefaultValue() const override - { - return ranges.getNormalizedValue(plugin.getParameterDefault(index)); - } - - juce::String getName(const int maximumStringLength) const override - { - if (maximumStringLength <= 0) - return juce::String(plugin.getParameterName(index).buffer()); - - return juce::String(plugin.getParameterName(index).buffer(), static_cast(maximumStringLength)); - } - - juce::String getLabel() const override - { - return plugin.getParameterUnit(index).buffer(); - } - - int getNumSteps() const override - { - if (hints & kParameterIsBoolean) - return 2; - - if (enumValues.restrictedMode) - return enumValues.count; - - if (hints & kParameterIsInteger) - return ranges.max - ranges.min; - - return juce::AudioProcessorParameter::getNumSteps(); - } - - bool isDiscrete() const override - { - if (hints & (kParameterIsBoolean|kParameterIsInteger)) - return true; - - if (enumValues.restrictedMode) - return true; - - return false; - } - - bool isBoolean() const override - { - return (hints & kParameterIsBoolean) != 0x0; - } - - juce::String getText(const float normalizedValue, const int maximumStringLength) const override - { - float value = ranges.getUnnormalizedValue(normalizedValue); - - if (hints & kParameterIsBoolean) - { - const float midRange = ranges.min + (ranges.max - ranges.min) * 0.5f; - value = value > midRange ? ranges.max : ranges.min; - } - else if (hints & kParameterIsInteger) - { - value = std::round(value); - } - - if (enumValues.restrictedMode) - { - for (uint32_t i=0; i < enumValues.count; ++i) - { - if (d_isEqual(enumValues.values[i].value, value)) - { - if (maximumStringLength <= 0) - return juce::String(enumValues.values[i].label); - - return juce::String(enumValues.values[i].label, static_cast(maximumStringLength)); - } - } - } - - juce::String text; - if (hints & kParameterIsInteger) - text = juce::String(static_cast(value)); - else - text = juce::String(value); - - if (maximumStringLength <= 0) - return text; - - return juce::String(text.toRawUTF8(), static_cast(maximumStringLength)); - } - - float getValueForText(const juce::String& text) const override - { - if (enumValues.restrictedMode) - { - for (uint32_t i=0; i < enumValues.count; ++i) - { - if (text == enumValues.values[i].label.buffer()) - return ranges.getNormalizedValue(enumValues.values[i].value); - } - } - - float value; - if (hints & kParameterIsInteger) - value = std::atoi(text.toRawUTF8()); - else - value = std::atof(text.toRawUTF8()); - - return ranges.getFixedAndNormalizedValue(value); - } - - bool isAutomatable() const override - { - return (hints & kParameterIsAutomatable) != 0x0; - } - - juce::String getCurrentValueAsText() const override - { - const float value = plugin.getParameterValue(index); - - if (enumValues.restrictedMode) - { - for (uint32_t i=0; i < enumValues.count; ++i) - { - if (d_isEqual(enumValues.values[i].value, value)) - return juce::String(enumValues.values[i].label); - } - } - - if (hints & kParameterIsInteger) - return juce::String(static_cast(value)); - - return juce::String(value); - } - - juce::StringArray getAllValueStrings() const override - { - if (dpfValueStrings.size() != 0) - return dpfValueStrings; - - if (enumValues.restrictedMode) - { - for (uint32_t i=0; i < enumValues.count; ++i) - dpfValueStrings.add(enumValues.values[i].label.buffer()); - - return dpfValueStrings; - } - - if (hints & kParameterIsBoolean) - { - if (hints & kParameterIsInteger) - { - dpfValueStrings.add(juce::String(static_cast(ranges.min))); - dpfValueStrings.add(juce::String(static_cast(ranges.max))); - } - else - { - dpfValueStrings.add(juce::String(ranges.min)); - dpfValueStrings.add(juce::String(ranges.max)); - } - } - else if (hints & kParameterIsInteger) - { - const int imin = static_cast(ranges.min); - const int imax = static_cast(ranges.max); - - for (int i=imin; i<=imax; ++i) - dpfValueStrings.add(juce::String(i)); - } - - return dpfValueStrings; - } -}; - -// -------------------------------------------------------------------------------------------------------------------- - -// unused in cardinal -static constexpr const requestParameterValueChangeFunc nullRequestParameterValueChangeFunc = nullptr; - -// only needed for headless builds, which this wrapper never builds for -static constexpr const updateStateValueFunc nullUpdateStateValueFunc = nullptr; - -// DSP/processor implementation -class CardinalWrapperProcessor : public juce::AudioProcessor -{ - friend class CardinalWrapperEditor; - - PluginExporter plugin; - MidiEvent midiEvents[kMaxMidiEvents]; - TimePosition timePosition; - const uint32_t parameterCount; - - juce::AudioProcessorParameter* bypassParameter; - juce::MidiBuffer* currentMidiMessages; - bool* updatedParameters; - -public: - CardinalWrapperProcessor() - : plugin(this, writeMidiFunc, nullRequestParameterValueChangeFunc, nullUpdateStateValueFunc), - parameterCount(plugin.getParameterCount()), - bypassParameter(nullptr), - currentMidiMessages(nullptr), - updatedParameters(nullptr) - { - if (const double sampleRate = getSampleRate()) - if (sampleRate > 0.0) - plugin.setSampleRate(sampleRate, true); - - if (const int samplesPerBlock = getBlockSize()) - if (samplesPerBlock > 0) - plugin.setBufferSize(static_cast(samplesPerBlock), true); - - if (parameterCount != 0) - { - updatedParameters = new bool[parameterCount]; - std::memset(updatedParameters, 0, sizeof(bool)*parameterCount); - - for (uint i=0; i 0,); - - plugin.deactivateIfNeeded(); - plugin.setSampleRate(sampleRate, true); - plugin.setBufferSize(static_cast(samplesPerBlock), true); - plugin.activate(); - } - - void releaseResources() override - { - plugin.deactivateIfNeeded(); - } - - void processBlock(juce::AudioBuffer& buffer, juce::MidiBuffer& midiMessages) override - { - const int numSamples = buffer.getNumSamples(); - DISTRHO_SAFE_ASSERT_INT_RETURN(numSamples > 0, numSamples, midiMessages.clear()); - - uint32_t midiEventCount = 0; - - for (const juce::MidiMessageMetadata midiMessage : midiMessages) - { - DISTRHO_SAFE_ASSERT_CONTINUE(midiMessage.numBytes > 0); - DISTRHO_SAFE_ASSERT_CONTINUE(midiMessage.samplePosition >= 0); - - if (midiMessage.numBytes > static_cast(MidiEvent::kDataSize)) - continue; - - MidiEvent& midiEvent(midiEvents[midiEventCount++]); - - midiEvent.frame = static_cast(midiMessage.samplePosition); - midiEvent.size = (static_cast(midiMessage.numBytes)); - std::memcpy(midiEvent.data, midiMessage.data, midiEvent.size); - - if (midiEventCount == kMaxMidiEvents) - break; - } - - midiMessages.clear(); - - const juce::ScopedValueSetter cvs(currentMidiMessages, &midiMessages, nullptr); - - juce::AudioPlayHead* const playhead = getPlayHead(); - juce::AudioPlayHead::CurrentPositionInfo posInfo; - - if (playhead != nullptr && playhead->getCurrentPosition(posInfo)) - { - timePosition.playing = posInfo.isPlaying; - timePosition.bbt.valid = true; - - // ticksPerBeat is not possible with JUCE - timePosition.bbt.ticksPerBeat = 1920.0; - - if (posInfo.timeInSamples >= 0) - timePosition.frame = static_cast(posInfo.timeInSamples); - else - timePosition.frame = 0; - - // use 4/4 as fallback time signature if not provided by the host - if (posInfo.timeSigNumerator == 0) - posInfo.timeSigNumerator = 4; - if (posInfo.timeSigDenominator == 0) - posInfo.timeSigDenominator = 4; - - timePosition.bbt.beatsPerMinute = posInfo.bpm; - - const double ppqPos = std::abs(posInfo.ppqPosition); - const int ppqPerBar = posInfo.timeSigNumerator * 4 / posInfo.timeSigDenominator; - const double barBeats = (std::fmod(ppqPos, ppqPerBar) / ppqPerBar) * posInfo.timeSigNumerator; - const double rest = std::fmod(barBeats, 1.0); - - timePosition.bbt.bar = static_cast(ppqPos) / ppqPerBar + 1; - timePosition.bbt.beat = static_cast(barBeats - rest + 0.5) + 1; - timePosition.bbt.tick = rest * timePosition.bbt.ticksPerBeat; - timePosition.bbt.beatsPerBar = posInfo.timeSigNumerator; - timePosition.bbt.beatType = posInfo.timeSigDenominator; - - if (posInfo.ppqPosition < 0.0) - { - --timePosition.bbt.bar; - timePosition.bbt.beat = posInfo.timeSigNumerator - timePosition.bbt.beat + 1; - timePosition.bbt.tick = timePosition.bbt.ticksPerBeat - timePosition.bbt.tick - 1; - } - - timePosition.bbt.barStartTick = timePosition.bbt.ticksPerBeat* - timePosition.bbt.beatsPerBar* - (timePosition.bbt.bar-1); - } - else - { - timePosition.frame = 0; - timePosition.playing = false; - timePosition.bbt.valid = false; - } - - plugin.setTimePosition(timePosition); - - DISTRHO_SAFE_ASSERT_RETURN(buffer.getNumChannels() >= 2,); - - const float* audioBufferIn[18] = {}; - float* audioBufferOut[18] = {}; - - for (int i=buffer.getNumChannels(); --i >= 0;) - { - audioBufferIn[i] = buffer.getReadPointer(i); - audioBufferOut[i] = buffer.getWritePointer(i); - } - - plugin.run(audioBufferIn, audioBufferOut, static_cast(numSamples), midiEvents, midiEventCount); - } - - // fix compiler warning - void processBlock(juce::AudioBuffer&, juce::MidiBuffer&) override {} - - double getTailLengthSeconds() const override - { - return 0.0; - } - - bool acceptsMidi() const override - { - return true; - } - - bool producesMidi() const override - { - return true; - } - - juce::AudioProcessorParameter* getBypassParameter() const override - { - return bypassParameter; - } - - juce::AudioProcessorEditor* createEditor() override; - - bool hasEditor() const override - { - return true; - } - - int getNumPrograms() override - { - return 1; - } - - int getCurrentProgram() override - { - return 0; - } - - void setCurrentProgram(int) override - { - } - - const juce::String getProgramName(int) override - { - return "Default"; - } - - void changeProgramName(int, const juce::String&) override - { - } - - void getStateInformation(juce::MemoryBlock& destData) override - { - juce::XmlElement xmlState("CardinalState"); - - for (uint32_t i=0; i xmlState(getXmlFromBinary(data, sizeInBytes)); - DISTRHO_SAFE_ASSERT_RETURN(xmlState.get() != nullptr,); - - const juce::Array& parameters(getParameters()); - - for (uint32_t i=0; igetDoubleAttribute(plugin.getParameterSymbol(i).buffer(), - plugin.getParameterDefault(i)); - const float normalizedValue = plugin.getParameterRanges(i).getFixedAndNormalizedValue(value); - parameters.getUnchecked(static_cast(i))->setValueNotifyingHost(normalizedValue); - } - - for (uint32_t i=0, stateCount=plugin.getStateCount(); igetStringAttribute(key.buffer(), - plugin.getStateDefaultValue(i).buffer()); - plugin.setState(key, value.toRawUTF8()); - } - } - -private: - static bool writeMidiFunc(void* const ptr, const MidiEvent& midiEvent) - { - CardinalWrapperProcessor* const processor = static_cast(ptr); - DISTRHO_SAFE_ASSERT_RETURN(processor != nullptr, false); - - juce::MidiBuffer* const currentMidiMessages = processor->currentMidiMessages; - DISTRHO_SAFE_ASSERT_RETURN(currentMidiMessages != nullptr, false); - - const uint8_t* const data = midiEvent.size > MidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data; - return currentMidiMessages->addEvent(data, - static_cast(midiEvent.size), - static_cast(midiEvent.frame)); - } -}; - -// -------------------------------------------------------------------------------------------------------------------- - -// unused in cardinal -static constexpr const sendNoteFunc nullSendNoteFunc = nullptr; - -// unwanted, juce file dialogs are ugly -static constexpr const fileRequestFunc nullFileRequestFunc = nullptr; - -// UI/editor implementation -class CardinalWrapperEditor : public juce::AudioProcessorEditor, - private juce::Timer -{ - CardinalWrapperProcessor& cardinalProcessor; - - UIExporter* ui; - void* const dspPtr; - -public: - CardinalWrapperEditor(CardinalWrapperProcessor& cardinalProc) - : juce::AudioProcessorEditor(cardinalProc), - cardinalProcessor(cardinalProc), - ui(nullptr), - dspPtr(cardinalProc.plugin.getInstancePointer()) - { - setOpaque(true); - setResizable(true, false); - // setResizeLimits(648, 538, -1, -1); - setSize(1228, 666); - - startTimer(1000.0 / 60.0); - } - - ~CardinalWrapperEditor() override - { - stopTimer(); - delete ui; - } - -protected: - void timerCallback() override - { - if (ui == nullptr) - return; - - for (uint32_t i=0; iparameterChanged(i, cardinalProcessor.plugin.getParameterValue(i)); - } - } - - repaint(); - } - - void paint(juce::Graphics&) override - { - if (ui == nullptr) - { - juce::ComponentPeer* const peer = getPeer(); - DISTRHO_SAFE_ASSERT_RETURN(peer != nullptr,); - - void* const nativeHandle = peer->getNativeHandle(); - DISTRHO_SAFE_ASSERT_RETURN(nativeHandle != nullptr,); - - ui = new UIExporter(this, - (uintptr_t)nativeHandle, - cardinalProcessor.getSampleRate(), - editParamFunc, - setParamFunc, - setStateFunc, - nullSendNoteFunc, - setSizeFunc, - nullFileRequestFunc, - nullptr, // bundlePath - dspPtr, - 0.0 // scaleFactor - ); - - if (cardinalProcessor.wrapperType == juce::AudioProcessor::wrapperType_Standalone) - { - const double scaleFactor = ui->getScaleFactor(); - ui->setWindowOffset(4 * scaleFactor, 30 * scaleFactor); - } - } - - ui->plugin_idle(); - } - -private: - static void editParamFunc(void* const ptr, const uint32_t index, const bool started) - { - CardinalWrapperEditor* const editor = static_cast(ptr); - DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); - - CardinalWrapperProcessor& cardinalProcessor(editor->cardinalProcessor); - - if (started) - cardinalProcessor.getParameters().getUnchecked(static_cast(index))->beginChangeGesture(); - else - cardinalProcessor.getParameters().getUnchecked(static_cast(index))->endChangeGesture(); - } - - static void setParamFunc(void* const ptr, const uint32_t index, const float value) - { - CardinalWrapperEditor* const editor = static_cast(ptr); - DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); - - CardinalWrapperProcessor& cardinalProcessor(editor->cardinalProcessor); - const juce::Array& parameters(cardinalProcessor.getParameters()); - juce::AudioProcessorParameter* const parameter = parameters.getUnchecked(static_cast(index)); - static_cast(parameter)->setValueNotifyingHostFromDPF(value); - } - - static void setStateFunc(void* const ptr, const char* const key, const char* const value) - { - CardinalWrapperEditor* const editor = static_cast(ptr); - DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); - - CardinalWrapperProcessor& cardinalProcessor(editor->cardinalProcessor); - cardinalProcessor.plugin.setState(key, value); - } - - static void setSizeFunc(void* const ptr, uint width, uint height) - { - CardinalWrapperEditor* const editor = static_cast(ptr); - DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); - - #ifdef DISTRHO_OS_MAC - UIExporter* const ui = editor->ui; - DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); - - const double scaleFactor = ui->getScaleFactor(); - width /= scaleFactor; - height /= scaleFactor; - #endif - - editor->setSize(static_cast(width), static_cast(height)); - } -}; - -juce::AudioProcessorEditor* CardinalWrapperProcessor::createEditor() -{ - return new CardinalWrapperEditor(*this); -} - -// -------------------------------------------------------------------------------------------------------------------- - -END_NAMESPACE_DISTRHO - -// -------------------------------------------------------------------------------------------------------------------- - -juce::AudioProcessor* createPluginFilter() -{ - // set valid but dummy values - d_nextBufferSize = 512; - d_nextSampleRate = 48000.0; - return new DISTRHO_NAMESPACE::CardinalWrapperProcessor; -} - -// -------------------------------------------------------------------------------------------------------------------- diff --git a/plugins/Befaco b/plugins/Befaco index fcf9b564..4c55f117 160000 --- a/plugins/Befaco +++ b/plugins/Befaco @@ -1 +1 @@ -Subproject commit fcf9b564017d8eee63504771a3006bea81749ff8 +Subproject commit 4c55f117212e758324412efe73f2f573a18f75d3 diff --git a/plugins/CVfunk b/plugins/CVfunk new file mode 160000 index 00000000..642ee353 --- /dev/null +++ b/plugins/CVfunk @@ -0,0 +1 @@ +Subproject commit 642ee353c60d00ad49517f95514fbe4e8f22356a diff --git a/plugins/Cardinal/src/AudioFile.cpp b/plugins/Cardinal/src/AudioFile.cpp index 5bec077d..699cb598 100644 --- a/plugins/Cardinal/src/AudioFile.cpp +++ b/plugins/Cardinal/src/AudioFile.cpp @@ -541,10 +541,10 @@ struct AudioFileWidget : ModuleWidgetWithSideScrews<23> { setModule(module); setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/AudioFile.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(box.size.x - 4 * RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 4 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addOutput(createOutput(Vec(startX_Out, startY_list * 0.5f - padding + 2.0f), module, 0)); addOutput(createOutput(Vec(startX_Out, startY_list * 0.5f + 2.0f), module, 1)); diff --git a/plugins/Cardinal/src/ExpanderInputMIDI.cpp b/plugins/Cardinal/src/ExpanderInputMIDI.cpp index 921130f7..61dc369c 100644 --- a/plugins/Cardinal/src/ExpanderInputMIDI.cpp +++ b/plugins/Cardinal/src/ExpanderInputMIDI.cpp @@ -303,8 +303,8 @@ struct CardinalExpanderForInputMIDIWidget : ModuleWidgetWith3HP { setModule(m); setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/ExpanderMIDI.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); for (int i=0; i(Vec(startX + 4.0f, startY + padding * i), m, i)); diff --git a/plugins/Cardinal/src/ExpanderOutputMIDI.cpp b/plugins/Cardinal/src/ExpanderOutputMIDI.cpp index 776ff834..ce583cef 100644 --- a/plugins/Cardinal/src/ExpanderOutputMIDI.cpp +++ b/plugins/Cardinal/src/ExpanderOutputMIDI.cpp @@ -507,8 +507,8 @@ struct CardinalExpanderForOutputMIDIWidget : ModuleWidgetWith3HP { setModule(m); setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/ExpanderMIDI.svg"))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); for (int i=0; i(Vec(startX + 4.0f, startY + padding * i), m, i)); diff --git a/plugins/Cardinal/src/HostMIDI.cpp b/plugins/Cardinal/src/HostMIDI.cpp index 6d13ea3e..ebb81051 100644 --- a/plugins/Cardinal/src/HostMIDI.cpp +++ b/plugins/Cardinal/src/HostMIDI.cpp @@ -103,6 +103,8 @@ struct HostMIDI : TerminalModule { // Indexed by channel uint8_t notes[16]; bool gates[16]; + bool gatesForceGap[16]; + bool gateForceGaps; uint8_t velocities[16]; uint8_t aftertouches[16]; std::vector heldNotes; @@ -148,6 +150,7 @@ struct HostMIDI : TerminalModule { channels = 1; polyMode = ROTATE_MODE; pwRange = 0; + gateForceGaps = false; panic(true); } @@ -157,6 +160,7 @@ struct HostMIDI : TerminalModule { for (int c = 0; c < 16; c++) { notes[c] = 60; gates[c] = false; + gatesForceGap[c] = false; velocities[c] = 0; aftertouches[c] = 0; pwFilters[c].reset(); @@ -290,10 +294,11 @@ struct HostMIDI : TerminalModule { float pw = pwValues[(polyMode == MPE_MODE) ? c : 0]; float pitch = (notes[c] - 60.f + pw * pwRange) / 12.f; outputs[PITCH_OUTPUT].setVoltage(pitch, c); - outputs[GATE_OUTPUT].setVoltage(gates[c] ? 10.f : 0.f, c); + outputs[GATE_OUTPUT].setVoltage(gates[c] && !gatesForceGap[c] ? 10.f : 0.f, c); outputs[VELOCITY_OUTPUT].setVoltage(rescale(velocities[c], 0, 127, 0.f, 10.f), c); outputs[AFTERTOUCH_OUTPUT].setVoltage(rescale(aftertouches[c], 0, 127, 0.f, 10.f), c); outputs[RETRIGGER_OUTPUT].setVoltage(retriggerPulses[c].process(args.sampleTime) ? 10.f : 0.f, c); + gatesForceGap[c] = false; } outputs[START_OUTPUT].setVoltage(startPulse.process(args.sampleTime) ? 10.f : 0.f); @@ -483,6 +488,9 @@ struct HostMIDI : TerminalModule { for (int c = 0; c < channels; c++) { if (notes[c] == note) { gates[c] = false; + // this will stay low even when gates[c] = true + // is set by a note on before the gate is sent as low + gatesForceGap[c] = gateForceGaps; } } // Set last note if monophonic @@ -709,6 +717,7 @@ struct HostMIDI : TerminalModule { json_object_set_new(rootJ, "pwRange", json_real(midiInput.pwRange)); json_object_set_new(rootJ, "smooth", json_boolean(midiInput.smooth)); + json_object_set_new(rootJ, "forceGateGaps", json_boolean(midiInput.gateForceGaps)); json_object_set_new(rootJ, "channels", json_integer(midiInput.channels)); json_object_set_new(rootJ, "polyMode", json_integer(midiInput.polyMode)); @@ -736,6 +745,9 @@ struct HostMIDI : TerminalModule { if (json_t* const smoothJ = json_object_get(rootJ, "smooth")) midiInput.smooth = json_boolean_value(smoothJ); + if (json_t* const forceGateGapsJ = json_object_get(rootJ, "forceGateGaps")) + midiInput.gateForceGaps = json_boolean_value(forceGateGapsJ); + if (json_t* const channelsJ = json_object_get(rootJ, "channels")) midiInput.setChannels(json_integer_value(channelsJ)); @@ -817,6 +829,8 @@ struct HostMIDIWidget : ModuleWidgetWith9HP { menu->addChild(new MenuSeparator); menu->addChild(createMenuLabel("MIDI Input")); + menu->addChild(createBoolPtrMenuItem("Force gate gaps between notes", "", &module->midiInput.gateForceGaps)); + menu->addChild(createBoolPtrMenuItem("Smooth pitch/mod wheel", "", &module->midiInput.smooth)); static const std::vector pwRanges = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36, 48}; diff --git a/plugins/Cardinal/src/ModuleWidgets.hpp b/plugins/Cardinal/src/ModuleWidgets.hpp index 3541cea2..8c8c0b34 100644 --- a/plugins/Cardinal/src/ModuleWidgets.hpp +++ b/plugins/Cardinal/src/ModuleWidgets.hpp @@ -55,15 +55,15 @@ struct ModuleWidgetWithSideScrews : ModuleWidget { void createAndAddScrews() { if (hp > 3) { - addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); } else { - addChild(createWidget(Vec(0, 0))); - addChild(createWidget(Vec(box.size.x - RACK_GRID_WIDTH, 0))); - addChild(createWidget(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(createWidget(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(0, 0))); + addChild(createWidget(Vec(box.size.x - RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + addChild(createWidget(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); } } diff --git a/plugins/Fundamental b/plugins/Fundamental index 63d54b65..59315911 160000 --- a/plugins/Fundamental +++ b/plugins/Fundamental @@ -1 +1 @@ -Subproject commit 63d54b6575657c8bd8d221178253c750baf0ed3b +Subproject commit 59315911f93ca9f2af13a37fc8efa404400f2fbc diff --git a/plugins/GrandeModular b/plugins/GrandeModular index bc7ef815..2f5f9d84 160000 --- a/plugins/GrandeModular +++ b/plugins/GrandeModular @@ -1 +1 @@ -Subproject commit bc7ef8157f6ad1284d7c4706eb89132f59555ca1 +Subproject commit 2f5f9d84a3c1c9500c0bbd4bcc284dfe0d15209d diff --git a/plugins/HetrickCV b/plugins/HetrickCV index 2fc83df7..4dc7c53b 160000 --- a/plugins/HetrickCV +++ b/plugins/HetrickCV @@ -1 +1 @@ -Subproject commit 2fc83df75154c32b83addd3ed68b35eb6156ca0d +Subproject commit 4dc7c53b9f230bfd4f6c4deb432c477a65188ac0 diff --git a/plugins/MSM b/plugins/MSM index 3315c11e..24520e64 160000 --- a/plugins/MSM +++ b/plugins/MSM @@ -1 +1 @@ -Subproject commit 3315c11e8506c28cece304fe4b772383a2820f86 +Subproject commit 24520e6475dc875ee9373f48b1fffb6b2ced243a diff --git a/plugins/Makefile b/plugins/Makefile index df8c0885..4c0b6b52 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -553,7 +553,6 @@ MINIPLUGIN_FILES += BaconPlugs/src/Style.cpp PLUGIN_FILES += $(filter-out Befaco/src/plugin.cpp,$(wildcard Befaco/src/*.cpp)) 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 chowdsp @@ -646,6 +645,14 @@ PLUGIN_FILES += $(filter-out cf/src/plugin.cpp,$(wildcard cf/src/*.cpp)) # modules/types which are present in other plugins CF_CUSTOM = $(DRWAV) +# -------------------------------------------------------------- +# CVfunk + +PLUGIN_FILES += $(filter-out CVfunk/src/plugin.cpp,$(wildcard CVfunk/src/*.cpp)) + +# modules/types which are present in other plugins +CVFUNK_CUSTOM = Steps + # -------------------------------------------------------------- # dBiz @@ -741,12 +748,13 @@ HAMPTONHARMONICS_CUSTOM = Arp Progress PLUGIN_FILES += $(filter-out HetrickCV/src/HetrickCV.cpp,$(wildcard HetrickCV/src/*.cpp)) PLUGIN_FILES += $(wildcard HetrickCV/src/DSP/*.cpp) +PLUGIN_FILES += $(wildcard HetrickCV/src/DSP/Phasors/*.cpp) PLUGIN_FILES += $(wildcard HetrickCV/Gamma/src/arr.cpp) PLUGIN_FILES += $(wildcard HetrickCV/Gamma/src/Domain.cpp) PLUGIN_FILES += $(wildcard HetrickCV/Gamma/src/scl.cpp) # modules/types which are present in other plugins -HETRICKCV_CUSTOM = ASR BlankPanel FlipFlop MidSide MinMax +HETRICKCV_CUSTOM = ASR BlankPanel FlipFlop MidSide MinMax PanelBaseWidget InverterWidget # -------------------------------------------------------------- # ImpromptuModular @@ -1043,7 +1051,6 @@ 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 += \ @@ -1251,7 +1258,7 @@ PLUGIN_BINARIES += ValleyAudio/src/XFADE.bin # MINIPLUGIN_BINARIES += ValleyAudio/src/VOICE_5.bin # modules/types which are present in other plugins -VALLEYAUDIO_CUSTOM = $(DRWAV) DigitalDisplay +VALLEYAUDIO_CUSTOM = $(DRWAV) Chord DigitalDisplay VALLEYAUDIO_CUSTOM_PER_FILE = TempoKnob # -------------------------------------------------------------- @@ -1316,9 +1323,6 @@ 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 plugins @@ -1410,6 +1414,7 @@ RESOURCE_FILES += BaconPlugs/res/Keypunch029.json RESOURCE_FILES += BaconPlugs/res/midi/chopin RESOURCE_FILES += BaconPlugs/res/midi/debussy RESOURCE_FILES += BaconPlugs/res/midi/goldberg +RESOURCE_FILES += Befaco/res/SpringReverbIR.f32 RESOURCE_FILES += cf/playeroscs RESOURCE_FILES += DHE-Modules/svg RESOURCE_FILES += DrumKit/res/samples @@ -2135,7 +2140,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(AUTINN_CUSTOM),$(call custom_module_names,$(m),Autinn)) \ -DpluginInstance=pluginInstance__Autinn \ -Dinit=init__Autinn @@ -2213,15 +2218,22 @@ $(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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(CF_CUSTOM),$(call custom_module_names,$(m),cf)) \ -DpluginInstance=pluginInstance__cf \ -Wno-misleading-indentation +$(BUILD_DIR)/CVfunk/src/%.cpp.o: CVfunk/src/%.cpp + -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" + @echo "Compiling $<" + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ + $(foreach m,$(CVFUNK_CUSTOM),$(call custom_module_names,$(m),CVfunk)) \ + -DpluginInstance=pluginInstance__CVfunk + $(BUILD_DIR)/ChowDSP/%.cpp.o: ChowDSP/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(CHOWDSP_CUSTOM),$(call custom_module_names,$(m),ChowDSP)) \ -DpluginInstance=pluginInstance__ChowDSP \ -DUSE_EIGEN \ @@ -2258,7 +2270,7 @@ $(BUILD_DIR)/DrumKit/%.cpp.o: DrumKit/%.cpp $(BUILD_DIR)/EnigmaCurry/src/%.cpp.o: EnigmaCurry/src/%.cpp -@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)" @echo "Compiling $<" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(ENIGMACURRY_CUSTOM),$(call custom_module_names,$(m),EnigmaCurry)) \ -DpluginInstance=pluginInstance__EnigmaCurry \ -Wno-misleading-indentation @@ -2287,7 +2299,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(FEHLERFABRIK_CUSTOM),$(call custom_module_names,$(m),FehlerFabrik)) \ -DpluginInstance=pluginInstance__FehlerFabrik @@ -2315,7 +2327,7 @@ $(BUILD_DIR)/Fundamental/%.cpp.o: Fundamental/%.cpp $(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 $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(FUNDAMENTAL_CUSTOM),$(call custom_module_names,$(m),Fundamental)) \ -DpluginInstance=pluginInstance__Fundamental @@ -2345,7 +2357,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(GRANDEMODULAR_CUSTOM),$(call custom_module_names,$(m),GrandeModular)) \ -DpluginInstance=pluginInstance__GrandeModular \ -Wno-missing-braces \ @@ -2369,7 +2381,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(HETRICKCV_CUSTOM),$(call custom_module_names,$(m),HetrickCV)) \ -DpluginInstance=pluginInstance__HetrickCV \ -DSTDIO_OVERRIDE=HetrickCV \ @@ -2379,7 +2391,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM),$(call custom_module_names,$(m),ImpromptuModular)) \ -DpluginInstance=pluginInstance__ImpromptuModular \ -DStepAttributes=StepAttributesKernel \ @@ -2387,7 +2399,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(IMPROMPTUMODULAR_CUSTOM),$(call custom_module_names,$(m),ImpromptuModular)) \ -DpluginInstance=pluginInstance__ImpromptuModular \ -Dinit=init__ImpromptuModular @@ -2395,7 +2407,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_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 \ @@ -2459,7 +2471,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(LITTLEUTILS_CUSTOM),$(call custom_module_names,$(m),LittleUtils)) \ -DpluginInstance=pluginInstance__LittleUtils @@ -2489,7 +2501,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(MINDMELD_CUSTOM),$(call custom_module_names,$(m),MindMeld)) \ -DpluginInstance=pluginInstance__MindMeld \ -Dinit=init__MindMeld @@ -2497,7 +2509,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(MINDMELD_CUSTOM),$(call custom_module_names,$(m),MindMeld)) \ -DpluginInstance=pluginInstance__MindMeld @@ -2525,7 +2537,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_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 \ @@ -2578,7 +2590,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(PATHSET_CUSTOM),$(call custom_module_names,$(m),PathSet)) \ -DpluginInstance=pluginInstance__PathSet @@ -2623,7 +2635,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) $(NOFINITE_FLAGS) -c -o $@ \ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ \ $(foreach m,$(SAPPHIRE_CUSTOM),$(call custom_module_names,$(m),Sapphire)) \ -DpluginInstance=pluginInstance__sapphire @@ -2687,6 +2699,7 @@ $(BUILD_DIR)/ValleyAudio/%.cpp.o: ValleyAudio/%.cpp $(foreach m,$(VALLEYAUDIO_CUSTOM_PER_FILE),$(call custom_per_file_names,$(m),ValleyAudio_$(shell basename $*))) \ -DpluginInstance=pluginInstance__ValleyAudio \ -DSTDIO_OVERRIDE=ValleyAudio \ + -IValleyAudio/src \ -Wno-sign-compare \ -Wno-unused-but-set-variable diff --git a/plugins/ValleyAudio b/plugins/ValleyAudio index b2ed19ad..f306afed 160000 --- a/plugins/ValleyAudio +++ b/plugins/ValleyAudio @@ -1 +1 @@ -Subproject commit b2ed19ad46e91c650d0ba3e18eae9a1bbecb1f3c +Subproject commit f306afedcd000e2b2fe84aa793e6e9daf6ff44c9 diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp index 6051cdd3..6c345e0d 100644 --- a/plugins/plugins.cpp +++ b/plugins/plugins.cpp @@ -298,6 +298,11 @@ extern Model* modelTestVCF; // cf #include "cf/src/plugin.hpp" +// CVfunk +#define modelSteps modelCVfunkSteps +#include "CVfunk/src/plugin.hpp" +#undef modelSteps + // ChowDSP #include "ChowDSP/src/plugin.hpp" #define init initChowDSP @@ -397,6 +402,8 @@ void saveGtgPluginDefault(const char*, int) {} #define modelFlipFlop modelHetrickCVFlipFlop #define modelMidSide modelHetrickCVMidSide #define modelMinMax modelHetrickCVMinMax +#define PanelBaseWidget HetrickCVPanelBaseWidget +#define InverterWidget HetrickCVInverterWidget extern Model* modelTwoToFour; extern Model* modelAnalogToDigital; extern Model* modelASR; @@ -421,15 +428,47 @@ extern Model* modelExponent; extern Model* modelFBSineChaos; extern Model* modelFlipFlop; extern Model* modelFlipPan; +extern Model* modelGateDelay; extern Model* modelGateJunction; +extern Model* modelGateJunctionExp; extern Model* modelGingerbread; extern Model* modelLogicCombine; extern Model* modelMidSide; extern Model* modelMinMax; +extern Model* modelPhaseDrivenSequencer; +extern Model* modelPhaseDrivenSequencer32; +extern Model* modelPhasorAnalyzer; +extern Model* modelPhasorBurstGen; +extern Model* modelPhasorDivMult; +extern Model* modelPhasorEuclidean; +extern Model* modelPhasorGates; +extern Model* modelPhasorGates32; +extern Model* modelPhasorGates64; +extern Model* modelPhasorGen; +extern Model* modelPhasorGeometry; +extern Model* modelPhasorHumanizer; +extern Model* modelPhasorMixer; +extern Model* modelPhasorOctature; +extern Model* modelPhasorQuadrature; +extern Model* modelPhasorRandom; +extern Model* modelPhasorRanger; +extern Model* modelPhasorReset; +extern Model* modelPhasorRhythmGroup; +extern Model* modelPhasorShape; +extern Model* modelPhasorShift; +extern Model* modelPhasorStutter; +extern Model* modelPhasorSubstepShape; +extern Model* modelPhasorSwing; +extern Model* modelPhasorTimetable; +extern Model* modelPhasorToClock; +extern Model* modelPhasorToLFO; +extern Model* modelPhasorToWaveforms; +extern Model* modelProbability; extern Model* modelRandomGates; extern Model* modelRotator; extern Model* modelRungler; extern Model* modelScanner; +extern Model* modelVectorMix; extern Model* modelWaveshape; extern Model* modelXYToPolar; #undef modelASR @@ -437,6 +476,8 @@ extern Model* modelXYToPolar; #undef modelFlipFlop #undef modelMidSide #undef modelMinMax +#undef PanelBaseWidget +#undef InverterWidget // ImpromptuModular /* NOTE too much noise in original include, do this a different way @@ -833,6 +874,7 @@ Plugin* pluginInstance__BogaudioModules; Plugin* pluginInstance__CatroModulo; Plugin* pluginInstance__cf; Plugin* pluginInstance__ChowDSP; +Plugin* pluginInstance__CVfunk; Plugin* pluginInstance__dBiz; Plugin* pluginInstance__DHE; extern Plugin* pluginInstance__DrumKit; @@ -1796,6 +1838,25 @@ static void initStatic__ChowDSP() } } +static void initStatic__CVfunk() +{ + Plugin* const p = new Plugin; + pluginInstance__CVfunk = p; + + const StaticPluginLoader spl(p, "CVfunk"); + if (spl.ok()) + { +#define modelSteps modelCVfunkSteps + p->addModel(modelSteps); + p->addModel(modelEnvelopeArray); + p->addModel(modelPentaSequencer); + p->addModel(modelImpulseController); + p->addModel(modelSignals); + p->addModel(modelRanges); +#undef modelSteps + } +} + static void initStatic__dBiz() { Plugin* const p = new Plugin; @@ -2124,6 +2185,8 @@ static void initStatic__HetrickCV() #define modelFlipFlop modelHetrickCVFlipFlop #define modelMidSide modelHetrickCVMidSide #define modelMinMax modelHetrickCVMinMax +#define PanelBaseWidget HetrickCVPanelBaseWidget +#define InverterWidget HetrickCVInverterWidget p->addModel(modelTwoToFour); p->addModel(modelAnalogToDigital); p->addModel(modelASR); @@ -2148,15 +2211,47 @@ static void initStatic__HetrickCV() p->addModel(modelFBSineChaos); p->addModel(modelFlipFlop); p->addModel(modelFlipPan); + p->addModel(modelGateDelay); p->addModel(modelGateJunction); + p->addModel(modelGateJunctionExp); p->addModel(modelGingerbread); p->addModel(modelLogicCombine); p->addModel(modelMidSide); p->addModel(modelMinMax); + p->addModel(modelPhaseDrivenSequencer); + p->addModel(modelPhaseDrivenSequencer32); + p->addModel(modelPhasorAnalyzer); + p->addModel(modelPhasorBurstGen); + p->addModel(modelPhasorDivMult); + p->addModel(modelPhasorEuclidean); + p->addModel(modelPhasorGates); + p->addModel(modelPhasorGates32); + p->addModel(modelPhasorGates64); + p->addModel(modelPhasorGen); + p->addModel(modelPhasorGeometry); + p->addModel(modelPhasorHumanizer); + p->addModel(modelPhasorMixer); + p->addModel(modelPhasorOctature); + p->addModel(modelPhasorQuadrature); + p->addModel(modelPhasorRandom); + p->addModel(modelPhasorRanger); + p->addModel(modelPhasorReset); + p->addModel(modelPhasorRhythmGroup); + p->addModel(modelPhasorShape); + p->addModel(modelPhasorShift); + p->addModel(modelPhasorStutter); + p->addModel(modelPhasorSubstepShape); + p->addModel(modelPhasorSwing); + p->addModel(modelPhasorTimetable); + p->addModel(modelPhasorToClock); + p->addModel(modelPhasorToLFO); + p->addModel(modelPhasorToWaveforms); + p->addModel(modelProbability); p->addModel(modelRandomGates); p->addModel(modelRotator); p->addModel(modelRungler); p->addModel(modelScanner); + p->addModel(modelVectorMix); p->addModel(modelWaveshape); p->addModel(modelXYToPolar); #undef modelASR @@ -2164,6 +2259,8 @@ static void initStatic__HetrickCV() #undef modelFlipFlop #undef modelMidSide #undef modelMinMax +#undef PanelBaseWidget +#undef InverterWidget } } @@ -3179,6 +3276,7 @@ void initStaticPlugins() initStatic__CatroModulo(); initStatic__cf(); initStatic__ChowDSP(); + initStatic__CVfunk(); initStatic__dBiz(); initStatic__DHE(); initStatic__DrumKit(); diff --git a/src/Cardinal/DistrhoPluginInfo.h b/src/Cardinal/DistrhoPluginInfo.h index bae1099d..18afb2b8 100644 --- a/src/Cardinal/DistrhoPluginInfo.h +++ b/src/Cardinal/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2023 Filipe Coelho + * Copyright (C) 2021-2024 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 @@ -33,6 +33,10 @@ #define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal" +#define DISTRHO_PLUGIN_AU_TYPE aumf +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID DcnM + #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 @@ -56,4 +60,6 @@ #define DISTRHO_PLUGIN_USES_CUSTOM_MODGUI 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "mod:ControlVoltagePlugin, lv2:UtilityPlugin" +#define DPF_VST3_DONT_USE_BRAND_ID + #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalFX/DistrhoPluginInfo.h b/src/CardinalFX/DistrhoPluginInfo.h index 906bbc6b..14010001 100644 --- a/src/CardinalFX/DistrhoPluginInfo.h +++ b/src/CardinalFX/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2024 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 @@ -31,6 +31,10 @@ #define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#fx" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#fx" +#define DISTRHO_PLUGIN_AU_TYPE aumf +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID DcnF + #define DISTRHO_PLUGIN_NAME "Cardinal FX" #define DISTRHO_PLUGIN_LABEL "CardinalFX" @@ -58,4 +62,6 @@ #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" +#define DPF_VST3_DONT_USE_BRAND_ID + #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalSynth/DistrhoPluginInfo.h b/src/CardinalSynth/DistrhoPluginInfo.h index 5147667c..2d9c3fdd 100644 --- a/src/CardinalSynth/DistrhoPluginInfo.h +++ b/src/CardinalSynth/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2024 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 @@ #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 0 #define CARDINAL_VARIANT_SYNTH 1 @@ -32,6 +33,10 @@ #define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal#synth" #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.cardinal#synth" +#define DISTRHO_PLUGIN_AU_TYPE aumu +#define DISTRHO_PLUGIN_BRAND_ID Dstr +#define DISTRHO_PLUGIN_UNIQUE_ID DcnS + #ifdef HEADLESS #define DISTRHO_PLUGIN_HAS_UI 0 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 @@ -53,4 +58,6 @@ #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 +#define DPF_VST3_DONT_USE_BRAND_ID + #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index e5271ddd..ad893bd7 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -203,6 +203,7 @@ LV2_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).lv2/resources/%) VST3_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%) ifeq ($(MACOS),true) +AU_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).component/Contents/Resources/%) CLAP_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/$(NAME).clap/Contents/Resources/%) else CLAP_RESOURCES = $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.clap/resources/%) @@ -418,15 +419,22 @@ TARGETS = jack else ifeq ($(CARDINAL_VARIANT),native) TARGETS = jack else -TARGETS = lv2 vst2 vst3 clap static +TARGETS = au clap lv2 vst2 vst3 endif all: $(TARGETS) + +au: $(AU_RESOURCES) + +clap: $(CLAP_RESOURCES) + lv2: $(LV2_RESOURCES) + lv2_sep: $(LV2_RESOURCES) + vst2: $(VST2_RESOURCES) + vst3: $(VST3_RESOURCES) -clap: $(CLAP_RESOURCES) # -------------------------------------------------------------- # Extra rules for macOS app bundle @@ -503,15 +511,19 @@ $(TARGET_DIR)/Cardinal.clap/resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -$(TARGET_DIR)/$(NAME).vst/Contents/Resources/%: ../Rack/res/% +$(TARGET_DIR)/$(NAME).clap/Contents/Resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%: ../Rack/res/% +$(TARGET_DIR)/$(NAME).component/Contents/Resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ -$(TARGET_DIR)/$(NAME).clap/Contents/Resources/%: ../Rack/res/% +$(TARGET_DIR)/$(NAME).vst/Contents/Resources/%: ../Rack/res/% + -@mkdir -p "$(shell dirname $@)" + $(SILENT)ln -sf $(abspath $<) $@ + +$(TARGET_DIR)/$(NAME).vst3/Contents/Resources/%: ../Rack/res/% -@mkdir -p "$(shell dirname $@)" $(SILENT)ln -sf $(abspath $<) $@ diff --git a/src/custom/dep.cpp b/src/custom/dep.cpp index a7fd1e2d..398086e2 100644 --- a/src/custom/dep.cpp +++ b/src/custom/dep.cpp @@ -66,7 +66,6 @@ enum DarkMode { kModeDHE, kModeDrumKit, kModeESeries, - kModeHetrickCV, kModeJW, kModeLilacLoop, kModeLittleUtils, @@ -261,49 +260,6 @@ static const struct { // Custom, runtime dark mode used with permission { kModeESeries,"/ESeries/res/E340.svg", {}, -1 }, // CC0-1.0 - { 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 { kModeJW, "/JW-Modules/res/Add5.svg", {}, -1 }, { kModeJW, "/JW-Modules/res/BlankPanel1hp.svg", {}, -1 }, @@ -1310,25 +1266,6 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con goto postparse; } - // 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; - shapesOrig = shapesMOD = nullptr; - handleMOD = nsvgParseFromFile(silverfilename.c_str(), units, dpi); - 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)