-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Please implement clap_plugin.reset() for your plugins. #488
Comments
there is no call on DPF side that this can map to, so there is nothing to implement here. CLAP should be smart enough to have a fallback in case this is not implemented on the plugin side, which is as simple as deactivating and activating the plugin again. |
I can see you already have a function named
CLAP doesn't have any API that allows the host to query whether or not a plugin is implemented correctly. The host assumes that when it calls reset() the plugin will do what the clap documentation says it should do.
There is no need to do anything realtime unsafe. At most you are just setting an array of floats back to zero. |
the issue is that many plugins already released which do not have this function and if exposed will misbehave (clap host sees the function available but then it does nothing..)
but it does have query possible, the function being null means its not implemented.
I dont think I was clear in my point... if DPF would do the quick approach of implementing a fallback reset that triggers deactivate + activate, that would break RT requirements because those calls are not meant to be RT safe. |
Well yes that is exactly the issue I am reporting. Calling reset() doesn't do anything.
Says who? Is that documented in the CLAP headers somewhere? As far as I know reset is a required function. Plugins can return null when an extension is queried but that is extensions, not core functions. But I might have missed some documentation somewhere. In any case none of the DPF plugins set that function to null.
Why not simply implement reset()? |
is it stated somewhere that the plugin struct calls are all mandatory?
just being very conservative on any additions to DPF base API, to not get it bloated. this request seems reasonable, but we have to keep in mind backwards compatibility. |
Is it stated somewhere that they're not? CLAP doesn't have a proper specification yet so a lot of stuff like this is unspecified. I've cried a lot about it here: free-audio/clap#414 Personally I would assume that all functions are mandatory unless explicitly specified as being optional. What do you think?
The function is already there. It's just a no-op DPF/distrho/src/DistrhoPluginCLAP.cpp Line 2446 in f581516
|
well I added something for this in 800583a which might serve as the initial step. if we introduce a dedicated reset function on DPF plugin API then we could make use of that instead of doing this restart. |
Thanks for looking into this, but this is not correct! "reset" and "restart" are different concepts. The plugin shouldn't request the host to restart it when reset() is called. All it needs to do is reset its own DSP state back to zero. |
I know and understand the concept, but in many (all?) plugins the re-activation triggers the same. it just so happens that deactivate + activate does a few more extra things. And this is just a fallback anyway |
Okay I get it. Sorry I am a bit tired but I understand your reasoning now. Thanks for looking into it! |
testing would be much appreciated. do you know of other plugin APIs that have similar concepts? it would add extra motivation/reasons to add it as plugin API. I recall AU having this, dont think VST2 has it, LV2 for sure doesnt. maybe VST3? |
I can trying building your develop branch from source tomorrow and see if your fallback works ok. I think the main motivation to add it should be that CLAP specifies that it should be added but I admit that CLAP is still under-specified so you are not morally required to do anything. The argument that hosts may simply call I'm not overly familiar with VST3 but if I understand right, the VST host has the flexibility to destroy and recreate the audio component without affecting the GUI, so they don't need to rely on the plugin developer to implement a DSP reset. CLAP's approach is probably cleaner but unfortunately doesn't work very well currently because it requires the plugin developers to all be playing by the rules |
juce has VST3 has AU has clap has (as mentioned) From perusing the JUCE code it seems Unity has a similar API, but VST2 and AAX do not, or if they do, they are not implemented by JUCE. But that was just a quick scan. |
I'd like to help you test this but I'm not actually sure how to build the DPF plugins with your 'develop' branch instead of 'main'. But if it is easy for you to send me an MVerb.clap binary for Windows then I can at least give it a quick test to check if the reverb tail is stopping now. But there is no rush, I can wait until your next official release |
@colugomusic simply checkout develop branch and build? |
https://github.com/DISTRHO/DPF-Plugins has no develop branch |
@colugomusic ah sorry, didn't realize you meant that repo and I also didn't know that this one has dpf fully vendored instead of as a submodule. |
Ah I see what you mean. I may be able to just checkout develop and drop it in locally then. |
there is a script on that repo to update the plugins, anyhow I run it just now and updated the plugins + dpf |
there is an experimental implementation as per 576b507 instead of a new function I went with a custom parameter designation, alike bypass. |
Hello!
https://github.com/free-audio/clap/blob/main/include/clap/plugin.h
CLAP hosts have to rely on plugin developers to implement this in order to revert the plugin DSP back to a "clean" DSP state. An example of where this is needed is the "panic button" that many DAWs provide which will kill active reverb tails, delay feedback, etc.
The text was updated successfully, but these errors were encountered: