CLAP: The New Audio Plug-in Standard (by U-he, Bitwig and others)
- u-he
- 30188 posts since 8 Aug, 2002 from Berlin
Also, wrappers for CLAP from and to other formats seem to be shaping up nicely. That'll resolve the issue during the transition time, while people catch up.
- KVRAF
- 2673 posts since 18 Mar, 2006 from The Void
It really is. I was in much the same position, although I'd hardly looked at even VST2. I was thinking about diving into audio plugins, and then hit the VST3 license shenanigans, saw other problems and just about gave up. A week or two later, CLAP arrived, and it's a complete changeantto wrote: Sun Jun 19, 2022 11:02 am so, CLAP seems like a spark of light in this tunnel
thanks to everyone involved...
Really, it's much easier to get started than VST ever was. I've been working from the awesome example by baconpaul here but there are also other clap example plugins linked on the main page here. I've no idea which are easier for Linux, as I'm currently playing with them on Windows and am too engrossed to fire up my Linux box and try a build there also
I would think that anyone with basic C++ knowledge could get going to a simple level fairly easily.
- KVRAF
- 8476 posts since 12 Feb, 2006 from Helsinki, Finland
From what I've looked at it so far, it's actually quite a nice API to use directly from C as well. While many similar APIs really benefit from having a "thick" abstraction layer even if you're working in raw C, the CLAP API actually feels perfectly usable directly as-is.koalaboy wrote: Sun Jun 19, 2022 11:24 am I would think that anyone with basic C++ knowledge could get going to a simple level fairly easily.
In a sense, if you implement all the relevant interfaces directly in C you should end up with something that feels like modern high-level C code that actually feels good in plain C as well (ie. if you're used to C programming, you don't feel like you're being treated as a second-class citizen here), rather than something that feels like you had to wrap it in C++ to actually keep your sanity. It's not hard to wrap, but it's also not hard to use it directly as-is.
Personally I mostly do C++ these days, but I've done a fair bit of plain C as well.. and honestly this feels like actual C rather than "some glue for C++ code to interop with lesser languages."
- KVRian
- 1313 posts since 31 Dec, 2008
This was fun to watch.
www.solostuff.net
The 3rd law of thermo-dynamics states that: the 2nd law has two meanings, one of them is strictly wrong, the other is massively misunderstood.
The 3rd law of thermo-dynamics states that: the 2nd law has two meanings, one of them is strictly wrong, the other is massively misunderstood.
- u-he
- 30188 posts since 8 Aug, 2002 from Berlin
Thank you! I seem to enjoy this, but really I've been a mess inside. Running on auto pilot.
- KVRian
- 1424 posts since 15 Nov, 2005 from Italy
I'm trying porting a plugin, on Mac, using that repository. I have XCode 12.5, with clang 12.0audiothing wrote: Sat Jun 18, 2022 10:11 pm Ok, for anyone interested, this repo https://github.com/free-audio/clap-juce-extensions has just been updated so that people using JUCE with Projucer (and not just CMake) can easily port their plugins to CLAP.
I issue these commands:
Code: Select all
cmake -Bbuild-clap -GXcode -DPATH_TO_JUCE="/path-to-juce/JUCE" -DPATH_TO_CLAP_EXTENSIONS="/path-to-ext/clap-juce-extensions" -DPLUGIN_LIBRARY_PATH="/path-to-plugin/MyPlugin" -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=Release
cmake --build build-clap --config Release
Code: Select all
Undefined symbols for architecture x86_64:
"createPluginFilter()", referenced from:
ClapAdapter::clap_create_plugin(clap_plugin_factory const*, clap_host const*, char const*) in clap-juce-wrapper.o
"juce::BigInteger::BigInteger(juce::BigInteger const&)", referenced from:
ClapJuceWrapper::audioPortsInfo(unsigned int, bool, clap_audio_port_info*) const in clap-juce-wrapper.o
ClapJuceWrapper::defineAudioPorts() in clap-juce-wrapper.o
"juce::BigInteger::~BigInteger()", referenced from:
ClapJuceWrapper::audioPortsInfo(unsigned int, bool, clap_audio_port_info*) const in clap-juce-wrapper.o
ClapJuceWrapper::defineAudioPorts() in clap-juce-wrapper.o
...(continues with a lot more undefined symbols)- KVRian
- 1424 posts since 15 Nov, 2005 from Italy
- KVRAF
- 8476 posts since 12 Feb, 2006 from Helsinki, Finland
Given that the standard install path on Windows is %CommonFilesFolder%/CLAP/ and generally speaking %CommonFilesFolder% typically expands to "C:\Program Files\Common Files" by default.. I don't think spaces are avoidable.Audiority wrote: Mon Jun 20, 2022 3:59 pm Are spaces allowed for TARGET, paths and plugin file name?
- KVRist
- 64 posts since 12 Aug, 2011
am developing against CLAP in C and can confirm all of this. very pleasant to use without any sort of higher level wrapper.mystran wrote: Sun Jun 19, 2022 12:21 pm From what I've looked at it so far, it's actually quite a nice API to use directly from C as well. While many similar APIs really benefit from having a "thick" abstraction layer even if you're working in raw C, the CLAP API actually feels perfectly usable directly as-is.
In a sense, if you implement all the relevant interfaces directly in C you should end up with something that feels like modern high-level C code that actually feels good in plain C as well (ie. if you're used to C programming, you don't feel like you're being treated as a second-class citizen here), rather than something that feels like you had to wrap it in C++ to actually keep your sanity. It's not hard to wrap, but it's also not hard to use it directly as-is.
owner/operator LHI Audio
-
- KVRian
- 1213 posts since 25 Dec, 2018
hmmm that would happen only if the links on clap-juce-wrapper didn't transfer.Audiority wrote: Mon Jun 20, 2022 2:58 pmI'm trying porting a plugin, on Mac, using that repository. I have XCode 12.5, with clang 12.0audiothing wrote: Sat Jun 18, 2022 10:11 pm Ok, for anyone interested, this repo https://github.com/free-audio/clap-juce-extensions has just been updated so that people using JUCE with Projucer (and not just CMake) can easily port their plugins to CLAP.
I issue these commands:
It fails during the linking process due to undefined symbols:Code: Select all
cmake -Bbuild-clap -GXcode -DPATH_TO_JUCE="/path-to-juce/JUCE" -DPATH_TO_CLAP_EXTENSIONS="/path-to-ext/clap-juce-extensions" -DPLUGIN_LIBRARY_PATH="/path-to-plugin/MyPlugin" -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=Release cmake --build build-clap --config Release
Any hints?Code: Select all
Undefined symbols for architecture x86_64: "createPluginFilter()", referenced from: ClapAdapter::clap_create_plugin(clap_plugin_factory const*, clap_host const*, char const*) in clap-juce-wrapper.o "juce::BigInteger::BigInteger(juce::BigInteger const&)", referenced from: ClapJuceWrapper::audioPortsInfo(unsigned int, bool, clap_audio_port_info*) const in clap-juce-wrapper.o ClapJuceWrapper::defineAudioPorts() in clap-juce-wrapper.o "juce::BigInteger::~BigInteger()", referenced from: ClapJuceWrapper::audioPortsInfo(unsigned int, bool, clap_audio_port_info*) const in clap-juce-wrapper.o ClapJuceWrapper::defineAudioPorts() in clap-juce-wrapper.o ...(continues with a lot more undefined symbols)
Can you try, if you don't mind, with the unix makefile or ninja generator just to rule out the Xcode generator first?
-
- KVRian
- 1213 posts since 25 Dec, 2018
TARGET maybe not. I didn't think CMake targets could contain spaces.Audiority wrote: Mon Jun 20, 2022 3:59 pm Are spaces allowed for TARGET, paths and plugin file name?
Surge has a space in the plugin name ("Surge XT") but the actually *target* name in cmake is surge-xt
- KVRian
- 1424 posts since 15 Nov, 2005 from Italy
For other readers: jadin fixed and updated the clap extension repository. Now everything works as expected and the CLAP builds without any issues! 
You do not have the required permissions to view the files attached to this post.
- u-he
- 30188 posts since 8 Aug, 2002 from Berlin
- KVRAF
- 1752 posts since 2 Jul, 2018
Thanks for your efforts. I already built a relieably working working vst2 to vst3 adapter in Juce. I will definitely try to add CLAP support to my existing products in the next months which should not big a big deal. Either by extending Juce or VST 2.4.
https://www.tone2.com
Our award-winning synthesizers offer true high-end sound quality.
Our award-winning synthesizers offer true high-end sound quality.
