(though I do have a couple of plugins here that have had CLAP support since February this year
EDIT: Oops, sorry! I thought I was posting in the tracking thread. Can't remove posts on KVR.
There’s three strategiesHanz Meyzer wrote: Thu Nov 03, 2022 2:36 pm Surely this already was asked, but can't find it... What is the best approach to support CLAP, VST3 and AU, if you start from scratch? I mean, can CLAP be extended to VST3 or so? Do you base your plugin on CLAP and then extend to VST3, or vice versa? Is there a VST3-to-CLAP wrapper? Couldn't find any hint on the github CLAP page.
I've had the pre-release installed for a bit but I'm glad to see that it's in the official distribution now.lalo wrote: Mon Nov 28, 2022 7:22 pm Reaper 6.71 with CLAP (first official release after several months of betas with CLAP support)![]()
![]()
yes, one task per voice, so at the end you will need to take all voice buffer and merge those into a single common bus, the main one. In my case, I try to reuse the voice buffer to have a better cache handling so I just need a per thread voice buffer.Urs wrote: Thu Dec 15, 2022 3:22 pm Well, the plug-in says how many separate tasks it wants to be scheduled. Whether or not the host then distributes that over a number of cores is up to the host.
I think typically one would schedule one task for each voice, but it's deliberately left open to do whichever way the plug-in dev sees fit.
So allocate buffers on per-thread basis, let voice tasks use the buffers of whatever thread happens to run the task, then merge per-thread rather than per-voice at the end?otristan wrote: Fri Dec 16, 2022 8:33 amyes, one task per voice, so at the end you will need to take all voice buffer and merge those into a single common bus, the main one. In my case, I try to reuse the voice buffer to have a better cache handling so I just need a per thread voice buffer.Urs wrote: Thu Dec 15, 2022 3:22 pm Well, the plug-in says how many separate tasks it wants to be scheduled. Whether or not the host then distributes that over a number of cores is up to the host.
I think typically one would schedule one task for each voice, but it's deliberately left open to do whichever way the plug-in dev sees fit.
This info is easy to give to the plugin
I can think of a number of (silly) modelsmystran wrote: Fri Dec 16, 2022 11:12 amSo allocate buffers on per-thread basis, let voice tasks use the buffers of whatever thread happens to run the task, then merge per-thread rather than per-voice at the end?otristan wrote: Fri Dec 16, 2022 8:33 amyes, one task per voice, so at the end you will need to take all voice buffer and merge those into a single common bus, the main one. In my case, I try to reuse the voice buffer to have a better cache handling so I just need a per thread voice buffer.Urs wrote: Thu Dec 15, 2022 3:22 pm Well, the plug-in says how many separate tasks it wants to be scheduled. Whether or not the host then distributes that over a number of cores is up to the host.
I think typically one would schedule one task for each voice, but it's deliberately left open to do whichever way the plug-in dev sees fit.
This info is easy to give to the plugin
I don't think there's a sane way to do this with the current API. As you say, knowing the number of threads in the pool and having sequential indexes for them that are passed to the task function would enable these kinds of schemes where tasks "borrow" per-thread resources.
With the current API the sane thing to do is just alloc per-voice, but I'd support revision of the API for these extra bits of information; implementation cost should be low, performance benefits should be real even if not necessarily huge and really the only downside is that it'd be a breaking change to API.
Submit: News, Plugins, Hosts & Apps | Advertise @ KVR | Developer Account | About KVR / Contact Us | Privacy Statement
© KVR Audio, Inc. 2000-2026