Unable to create VST3 with PlugType::kFxAnalyzer.
Hey all,
Plug-ins with the feature CLAP_PLUGIN_FEATURE_ANALYZER do not show in Audacity due to it only allowing VST3s of type PlugType::kFx to show in the insert effects list. Bitwig, Live, and Reaper are fine with PlugType::kAnalyzer being inserted in their effects lists, but the comment describing kAnalyzer in ivstaudioprocessor.h says "not selectable as insert plug-in".
CLAP's documentation is not so specific about if the plug-in can be an insert or not, but it has me wondering if CLAP_PLUGIN_FEATURE_ANALYZER would be better mapped to PlugType::kFxAnalyzer?
CLAP_PLUGIN_FEATURE_ANALYZER is already mapped to PlugType::kFxAnalyzer: https://github.com/free-audio/clap-wrapper/blob/5ba58f16a7816085d46cb8b7bb40b1eb1d9561d2/src/detail/vst3/categories.cpp#L64
Do you mean it should be mapped to kFx?
Actually, I am not sure. The question is two-fold:
- Why is the VST3 const so specific not to be in an insert?
- Do we loose anything by changing that mapping (like: it is not being listed anymore in a analyzer category)?
To me it looks to me like it's mapped to kAnalyzer, not kFxAnalyzer. The resulting string that the VST3 host reads is "Analyzer" rather than "Fx|Analyzer".
https://github.com/free-audio/clap-wrapper/blob/48e3859ab2494bcfcabb874b76c5693a3c6ce5c8/src/detail/vst3/categories.cpp#L64
For more detail. In my plug-in, if I mark it as an analyzer like so:
static constexpr const char * features[] = {
CLAP_PLUGIN_FEATURE_ANALYZER,
CLAP_PLUGIN_FEATURE_STEREO,
nullptr,
}
Bitwig shows "Analysis" for the category for the VST3 and CLAP versions, but Audacity doesn't allow it to be inserted and the VST3PluginTestHost shows "Analyzer" for the SubCat, but also no longer allows me to insert it into its effects list.
If I mark it like so:
static constexpr const char * features[] = {
CLAP_PLUGIN_FEATURE_ANALYZER,
CLAP_PLUGIN_FEATURE_AUDIO_EFFECT, // swapping this with the line above has no affect to the behavior
CLAP_PLUGIN_FEATURE_STEREO,
nullptr,
}
Bitwig shows "Audio FX" for the category on both VST3 and CLAP versions. The resulting SubCat is "Analyzer|Fx" (regardless of order). I only just now noticed that it does insert both the category and subcategory but in the wrong order. However, if that behavior was fixed the CLAP plug-in would still not show the Analyzer category.
Hm, we will try to figure this out. In the meantime you can also implement CLAP_PLUGIN_FACTORY_INFO_VST3 where you can override all VST3 options, also the feature string.
ok, the VST3 SDK lists:
SMTG_CONSTEXPR const CString kFxAnalyzer = "Fx|Analyzer"; ///< Scope, FFT-Display, Loudness Processing...
//...
SMTG_CONSTEXPR const CString kAnalyzer = "Analyzer"; ///< Meter, Scope, FFT-Display, not selectable as insert plug-in
So essentially, if Fx is missing, it shouldn't be in an insert - why ever this should be desirable.
In this case, I think we should map it to kFxAnalyzer. The function clapCategoriesToVST3 must be adapted a bit since it does not support the |inside, it also does not sort Fx before Analyzer . It just sorts them alphabetically - which should be okay according to the VST3 SDK, but hosts.. sigh
So, yes, this needs a bit of tweaking.
Hm, we will try to figure this out. In the meantime you can also implement CLAP_PLUGIN_FACTORY_INFO_VST3 where you can override all VST3 options, also the feature string.
Thank you for the advice. I had not seen that prior and this is working great in the meantime.