-
Notifications
You must be signed in to change notification settings - Fork 103
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_PARAM_IS_AUDIO_RATE flag for parameters supporting audio rate automation/modulation #60
Comments
What about Because either the plugin accepts multiple values per process call or just one, like vst2 would. I find the feature interesting but it leads to other questions. Maybe the plugin wants to smooth differently one param versus an other or depending on the Let's go back to I think that this topic opens a lot of questions, leads to a more complicated code to maintain for the host while I'm not sure that we'd be able to really measure a performance win. What do you think? |
I feel like most plugins and parameters are block based, so having that be the default and having flags to indicate that a parameter can indeed make use of more than one value per block would make more sense to me. So opt-in instead of opt-out. In a sense that's equivalent to Audio rate might indeed be the wrong term, but if a plugin can handle sample accurate automation, then unless it processes audio in very large internal blocks it should be able to use any granularity of parameter change events.
I don't think this is necessary. The correct smoothing time for a parameter very much depends on the parameter itself. You can for instance use much lower smoothing times for a gain parameter than you can for a filter cutoff parameter that gets used for calculating new IIR filter coefficients. Only the plugin knows what the best smoothing time for a parameter is.
That's an interesting one actually. I don't think you can really encode it in the plugin standard, but it would definitely be a good idea to document that hosts should add all parameter change events for parameters that don't support sample accurate automation at the start of the queue. |
This issue would be fixed by #86 right? |
Partially! That would allow true audio rate automation which is great, but it doesn't allow you to influence the rate at which the host sends mid-buffer automation/modulation for 'normal' automation/modulation events or disable them entirely. Because for most uses you probably don't want to use the raster approach, as that takes you back to square 1. The problem with VST3's sample accurate automation approach that CLAP solves is that in VST3 every parameter has its own automation queue, and the plugin then first needs to merge all of those queues together with the other events into one larger queue before it can do anything. Being able to do audio rate modulation for single parameters like this would probably still be useful though. In those cases you may be able to split your processing loop up into into a normal loop with interleaved events and then a dedicated loops for the dense raster buffers. |
Could this in practice be similar to LV2 CVPort? https://lv2plug.in/ns/lv2core#CVPort Within LV2 such a port has an AudioPort formatted buffer, but then with extra control attributes like min/max/default and meaningful values. Which the Host can then route to other plugins, or to dedicated physical CV ports to interact with external gear (through DC-coupled i/o, for instance via JACK https://jackaudio.org/metadata/signal-type/). Compared to VST3 CV spec which is just a plain audio port with an extra flag (so only normalized values possible). Or, because CV concerns continuous frame processing, this would require a completely different API within CLAP? (sorry for the many - possibly completely unrelated to this topic - examples of audio rate controls but I'm trying to understand the different use cases here and what the overlap in functionality is) |
@dromer That already exists: https://github.com/free-audio/clap/blob/main/include/clap/ext/draft/cv.h Problem with CV is that it's completely separate from parameter automation. If you have |
Ah nice. Thnx for the link! Still seems quite preliminary and incomplete for what I think such ports should be able to do. Here I was thinking more from practical reasons, but parameters are certainly different from CV ports. Sorry for the tangent! |
Also cv is no really polyphonic and parameter modulation is, which we will need to grapple with when we get to true audio rate stuff |
Yes, understood. It's audiorate i/o from a different "angle", say. |
I realized that there's currently no way to tell which parameters support audio rate automation/modulation and which do not. Knowing this in advance would be very useful, because it allows the host to send accurate automation values per-sample for parameters that support it, and only one value per buffer for parameters that don't. Currently Bitwig for instance sends only one parameter update every 64 samples when using the modulators, presumably because very few plugins actually use it (JUCE doesn't sample accurate automation at all in the currently released version) and it would be a waste otherwise. But if the host does know that the plugin can use it, then it can send high resolution automation without wasting any resources. Being able to use Bitwig's Audio Rate modulator with plugins for instance would open up a huge world of new possibilities.
The text was updated successfully, but these errors were encountered: