-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLAP support development blog #383
Comments
Let's start things today. I was thinking of doing things in a "clap" branch, but as I am going through the files that will need tweaking I see old code that needs maintenance and little tweaks. I do not want those general tweaks and fixes to be stuck behind a specific branch, so I will just push the clap things directly into "develop". Also, my initial thought for this development was to do regular live streams accompanying it. But seems better not, I keep waiting for the right moment to do a stream (cant do it when I only have <1h dev time, or when I expect to have regular breaks because I need to do something on the side, or other life things..), this delays the actual time spent working on the feature which is not good. Let's focus on the technical stuff. We call today "day 0". |
Results of first day:
Works 🚀 Core API is quite simple, so fast start is not unexpected. Already started some initial code for UI and parameters, but not pushed yet. |
Just randomly trying things 👏 👏 👏 CLAP seems to follow many of same approaches as VST3 does in regards to driving the UI. I am really missing a way to push events from UI to DSP here, instead plugins need to do all of that message passing on their own. Unlike other formats though we cant have the UI ask the host to change a value, instead all happens during audio processing (or if plugin is not active, during a special "flush" call meant to replace it for that case) |
Results of 2nd day:
can start to see how the code needs to be structured for clap support. still only works for single-bus plugins (those with only a fixed set of ports, which is the majority of dpf plugins). so implementation is progressing at a good pace. |
I am giving up counting by days, there is not always something interesting to show every time. This time, it is transport information. Sending notes from UI to DSP also works now, plus some MIDI input related things are in place but it MIDI input doesnt work yet. |
We are close to the first target, dragonfly is only missing 1 feature to make it fully functional - state extension. Spent some time on Linux to ensure the UI works there, can confirm it is the case. Even resize works now (tested both host-initiated and plugin-initiated). |
Not a lot of development news recently, as I have been stabilizing the base implementation and doing tests, fixing the odd issues here and there as they appear. As CLAP is so new, hosts can still do things in an odd way as they pretty much only been tested with a very small pool of plugins. So far it has been quite okay to adjust once a problem is found. Seems mainly Bitwig, where:
Now that things are getting stable, I already made a few releases with DPF+CLAP in place. https://kx.studio/News/?action=view&url=introducing-masterme https://kx.studio/News/?action=view&url=cardinal-2209-released https://kx.studio/News/?action=view&url=ildaeil-v11-released For the last one, yeah you can use Ildaeil CLAP as a way to load LV2 😅 |
Starting new month, developments will begin again. For testing more specific and detailed features I find that doing the host side helps quite a lot. Because you get to see and experience things not just from the plugin side, but from the host side as well. Scanning already works, so the next bits are hosting. For the advanced/next features, it is just the more deep plugin things:
perhaps parameter modulation? not sure how to best fit into DPF API yet. |
More indirect progress, Carla hosting with parameters and MIDI, and basic time and GUI support This finally allows to try out all the small details for proper CLAP support in DPF. There was another issue with high-dpi screens on macOS + Reaper, spotted by u-he folks. |
No pics or screenshots, but got latency stuff now working for CLAP too, as per 847000e This one was tricky.. CLAP is very restrictive on the threads that can query latency information, so we must do a little dance to ensure the information ends up in the host. If the plugin is active and processing audio, then receives a parameter update (which can only happen during audio processing if plugin is active) which changes its internal latency, plugins must:
Main issue here is that reporting of latency changes must happen on main thread and when plugin is deactivated. I only have 1 example plugin that makes use of latency, no other DPF based plugin does that I am aware of. Next up, will likely be multi-IO support. So we get sidechain and related things. |
Some little news. Yesterday was release day, we got new Cardinal and Ildaeil that bring all CLAP fixes so far. Anklang (which only supports CLAP) loading LV2 plugins: Ardour (which does not support CLAP) loading CLAP plugins: |
Good news, multi-IO is in. Did the testing with https://github.com/DISTRHO/ndc-Plugs which includes a DPF port of https://www.niallmoody.com/ndcplugs/ampimposer.htm On this same topic, now that we have multi-IO, I went ahead and enabled the Cardinal main variant for CLAP. |
Oh forgot to mention, with CLAP hosting being available in Carla now, I have began to enable the runtime tests for plugin CI builds, as all other DPF-supported formats were handled already. Can be seen in for example https://github.com/DISTRHO/ndc-Plugs/actions/runs/3301517161/jobs/5447073018 EDIT: the error on the CI log is from the Carla CLAP multi-IO being broken on the version I have in the kxstudio repos, need to push an update-fix to that |
With a few more fixes in place, I went through the different kind of plugins in DPF-Plugins collection and verified the behaviour of each type. Fixing ProM also involved fixing some long-standing bugs in DPF when using OpenGL3 mode, among other details. Since with VST3 and CLAP in DPF having some tiny details not yet implemented, I revised DPF's README to no longer say that all plugin implementations are complete. They are mostly complete, for what most devs care about anyway. I was hoping to do some documentation related work this month, but the more slow times now need my attention for planning/preparations for a move. Going back to Berlin, land of u-he and bitwig among others 😎 In any case, will keep this thread updated for CLAP + DPF related things as usual, even if going slower in the next few weeks. |
Hey all, for those potentially interested in DPF I have created a plugin template at https://github.com/DISTRHO/imgui-template-plugin It is not documentation, but can be helpful for easy experimentation. |
Oh for those curious about imgui, their project page at https://github.com/ocornut/imgui has quite some info. |
Some news, though not 100% related to CLAP. Because documentation is super boring, and devs tend to not read it anyway, I am going in a slightly different approach for the time being - making project setup and builds as easy as possible. With that in mind, here are 2 fancy github actions you can use on DPF-based plugins to automatically test, build and get release binaries. https://github.com/DISTRHO/dpf-cmake-action One for cmake, the other for makefiles. I added it to the previously mentioned template repository. Which ends up being https://github.com/DISTRHO/imgui-template-plugin/blob/main/.github/workflows/build.yml
See https://github.com/DISTRHO/imgui-template-plugin/actions/runs/3501012211 for an example. Also helps me maintaining the different repositories, because copying over the yml file to every single repo everytime I wanted to do a small change was getting annoying. Now just need to update the actions related repo, and trigger a rebuild. Related to template repositories, I began experimenting with the Elements library as a widget type for DPF. Finally sorta related to CLAP, I have added a "IR Convolution Reverb" plugin to the WIP https://github.com/DISTRHO/OneKnob-Series collection. (not sure yet how to handle these for non LV2/CLAP formats that do not have such a concept, will deal with that later) |
I managed to get the DPF+ImGui example plugin running on Windows with CMake and MSVC++ without too much trouble. I targeted both CLAP and VST3, and both plugins seem fine in REAPER. I've been developing some really interesting drum programming software for the last 15 years or so... I'm looking to develop a bridge plugin that let's me easily integrate my stuff into traditional DAW environments. Looking at using DPF to get into it. I'm already using Dear ImGui extensively, so this seems like a pretty solid entrance point. |
I am opening this ticket as a sorta blog progress report style for anyone interested on following CLAP support in DPF.
I will be working on this for the next 2 months, starting with the basics for running a few plugins for this month.
We can set dragonfly reverb as a target, as that has parameters, meters, UI and of course audio.
Then next month going deeper in CLAP integration, for having time position, latency, and all other goodies.
The text was updated successfully, but these errors were encountered: