We are working on documenting this, but basically have a set of clap extensions which don't require you to fork juce. Right now Surge/SurgeFX/ Tuning Workbench all build
It's pretty simple really. The steps are
- Check out the clap core, helpers, and juce extensions
- Check out the synths at head
- Add cmake flags pointing to the setup in 1 and 2
- Build, Enjoy!
So here we go.
There's lots of todos on the JUCE code, but it is working it seems in win/lin/mac pretty well for several things
Make a directory called 'clap-plugins' or some such where you will check out everything.
First step: clone the libs
git clone https://github.com/free-audio/clap
git clone https://github.com/free-audio/clap-helpers
git clone https://github.com/free-audio/clap-juce-extensions
Then checkout surge at main and grab submodules
git clone https://github.com/surge-synthesizer/surge.git
cd surge
git submodule update --init --recursive
cd ..
You want to set up the cmake build first. These instructions work on mac and linux; on windows you
would replace ${PWD}/..
with the path to your clap directory hosting the elements
cd surge
cmake -Bignore/clap -DCLAP_ROOT=${PWD}/.. -DCLAP_JUCE_EXTENSIONS_ROOT=${PWD}/../clap-juce-extensions -DCMAKE_BUILD_TYPE=Debug -GNinja -DSURGE_COPY_AFTER_BUILD=True
Then once this is done you can build either of the plugins.
cmake --build ignore/clap --target surge-xt_CLAP
cmake --build ignore/clap --target surge-fx_CLAP
The generic formula I am working towards is
git clone https://github.com/surge-synthesizer/PLUGIN.git
cd PLUGIN
git submodule update --init --recursive
cmake -Bignore/clap -DCLAP_ROOT=${PWD}/.. -DCLAP_JUCE_EXTENSIONS_ROOT=${PWD}/../clap-juce-extensions -DCMAKE_BUILD_TYPE=Debug -GNinja
cmake --build ignore/clap --target PLUGIN_CLAP
As of this writing the following synths work with this generic formula (with PLUGIN replaced with the synth name)
- midi-monitor (https://github.com/surge-synthesizer/midi-monitor)
- tuning-workbench-synth (https://github.com/surge-synthesizer/tuning-workbench-synth)
- monique-monosynth (https://github.com/surge-synthesizer/monique-monosynth) with target name
MoniqueMonosynth_CLAP
and requiring the extra flag-DMONIQUE_COPY_PLUGIN_AFTER_BUILD=TRUE
on the first cmake
Pretty simple.
git clone https://github.com/free-audio/clap-host
cd clap-host
git submodule update --init --recursive
cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug
On Ubuntu 20 you need to download QT6 and add a line line -DCMAKE_PREFIX_PATH=/home/paul/Qt/6.2.1/gcc_64/
then to build and run
cmake --build build
CLAP_HOST_FORCE_PLUGIN=~/Library/Audio/Plug-Ins/CLAP/Surge\ XT.clap ./clap-host/build/host/clap-host