Open sadko4u opened 2 years ago
Hi. Most of the plugins you've mentioned use subclasses of the supported types. Looks like the only not supported ones are few descendants of the UtilityPlugin.
But most should work and do work for me:
auto cls_uri = lilv_plugin_class_get_uri(cls);
auto parent_cls_uri = lilv_plugin_class_get_parent_uri(cls);
for (auto const& supported_cls : supported_classes) {
if (lilv_node_equals(cls_uri, supported_cls) ||
(parent_cls_uri != NULL && lilv_node_equals(parent_cls_uri, supported_cls))) {
skip = false;
}
}
Not sure why those are getting filtered out for you. I've added some extra logging to print types of the discarded plugins if you want to give that a shot :-)
I agree that having a filtering like this is far from ideal. It's a rather naïve attempt on listing only plugins that make sense in the context of OBS. It should be replaced with something that just checks if plugin has workable set of inputs and outputs.
OK, thanks. I'll check a bit later and give additional information.
All new changes are available in master
, right?
Yes, the extra logging is now in master
. I've also added the few subclasses of Utility Plugin you've mentioned that seem to make sense in OBS.
Also, one more idea: is it really so needed to strictly require from plugin to support HardRT? I think you can give it as an option for the user to use only HardRT plugins or not on his responsibility.
Here's the output:
LSP Artistic Delay Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Artistic Delay Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Delay Compensator Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Delay Compensator Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Delay Compensator x2 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Compressor LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Compressor Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Compressor MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Compressor Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Crossover LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Crossover Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Crossover MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Crossover Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Dynamic Processor LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Dynamic Processor Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Dynamic Processor MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Dynamic Processor Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Expander LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Expander Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Expander MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Expander Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Gate LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Gate Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Gate MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Gate Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x16 LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x16 Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x16 MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x16 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x32 LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x32 Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x32 MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Graphic Equalizer x32 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Impulse Responses Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Impulse Responses Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Impulse Reverb Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Impulse Reverb Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Latency Meter filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Limiter Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Limiter Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Loudness Compensator Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Loudness Compensator Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Compressor LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Compressor Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Compressor MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Compressor Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Dynamic Processor LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Dynamic Processor Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Dynamic Processor MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Dynamic Processor Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Expander LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Expander Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Expander MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Expander Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Gate LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Gate Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Gate MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multiband Gate Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multi-Sampler x12 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multi-Sampler x12 DirectOut filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multi-Sampler x24 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multi-Sampler x24 DirectOut filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multi-Sampler x48 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Multi-Sampler x48 DirectOut filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Oscillator Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Oscilloscope x1 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Oscilloscope x2 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Oscilloscope x4 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x16 LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x16 Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x16 MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x16 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x32 LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x32 Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x32 MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Parametric Equalizer x32 Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Phase Detector filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Profiler Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Profiler Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Room Builder Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Room Builder Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sampler Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sampler Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Compressor LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Compressor Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Compressor MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Compressor Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Dynamic Processor LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Dynamic Processor Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Dynamic Processor MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Dynamic Processor Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Expander LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Expander Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Expander MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Expander Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Gate LeftRight filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Gate Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Gate MidSide filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Gate Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Limiter Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Limiter Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Compressor LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Compressor Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Compressor MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Compressor Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Dynamic Processor LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Dynamic Processor Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Dynamic Processor MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Dynamic Processor Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Expander LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Expander Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Expander MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Expander Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Gate LeftRight x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Gate Mono x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Gate MidSide x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Sidechain Multiband Gate Stereo x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Slapback Delay Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Slapback Delay Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Spectrum Analyzer x1 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Spectrum Analyzer x12 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Spectrum Analyzer x16 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Spectrum Analyzer x2 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Spectrum Analyzer x4 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Spectrum Analyzer x8 filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Surge Filter Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Surge Filter Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Trigger MIDI Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Trigger MIDI Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Trigger Mono filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
LSP Trigger Stereo filtered out - http://lv2plug.in/ns/lv2core#Plugin (parent (null)) class not supported
Hmmm... It sees any plugin class as instance of http://lv2plug.in/ns/lv2core#Plugin
while in the TTL file:
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
...
plug:compressor_stereo
a lv2:CompressorPlugin, doap:Project ;
doap:name "LSP Compressor Stereo" ;
lv2:minorVersion 0 ;
lv2:microVersion 8 ;
That can be an older lilv
library:
rpm -qa | grep lilv
liblilv-0-0-0.24.10-1.10.x86_64
Interesting. According to NEWS 0.24.10 was released 27 Sep 2020 and I'm pretty it has worked ever since I've implemented the filtering in May of 2020 as I've been using some LSP plugins back then (thanks!) Maybe that particular release has this bugged?
FWIW I'm on lilv 0.24.18 and lv2 1.18.8 and I have 1.2.2 version of LSP installed and the classes resolve correctly for me.
Also, one more idea: is it really so needed to strictly require from plugin to support HardRT? I think you can give it as an option for the user to use only HardRT plugins or not on his responsibility.
I'm not opposed to having a way for lifting that requirement. Should be trivial to add the checkbox.
I don't know much about audio, Hard RT made sense to me because we are working in livestreaming environment and applying filters on the fly to live audio. From what I understand if plugin is not hard-rt-capable it's meant for "offline" use, i.e. when processing audio is detached from playback and can willy-nilly cause underruns. If that's not true I'm happy to be corrected though :-)
From what I understand if plugin is not hard-rt-capable it's meant for "offline" use, i.e. when processing audio is detached from playback and can willy-nilly cause underruns.
HardRT compatible means that plugin does not perform any sleeps/memory allocations or system calls in the run()
method which is responsible for the audio processing. That means, that each run()
is predictable regardless to the time of execution. Some of plugins don't set this flag even if conform to the HardRT requirement. Also, it is not bad if plugin is not HardRT compatible. For several buffer/sample rate settings they may behave well. In some extreme cases they may behave wrong. So I believe the user can use them on his own risk.
Maybe that particular release has this bugged?
I don't know. Maybe @drobilla can clarify something to us.
Host support for that stuff is a bit sketchy since everything works if you just ignore it, but hardRTCapable is about the real-time requirements @sadko4u mentioned (no blocking, basically). It is not about "offline" type things at all (that's isLive).
To the original topic, nothing says that plugins even have to use the standard classes, and new standard classes may be added at any time. So, hosts allow-listing plugin classes strikes me as a very bad idea. If you want to keep the spam of weird utility plugins (or whatever) down, I recommend inverting this and instead (optionally) hiding classes you know you don't want to show up.
@drobilla and what about the invalid detection of plugin class like http://lv2plug.in/ns/lv2core#Plugin
instead of http://lv2plug.in/ns/lv2core#CompressorPlugin
etc.? Do you remember something related in lilv
?
No idea. I'm traveling at the moment and don't have the time to dig in to the code of another project right now (where does cls
come from?), but one way the more specific classes won't be there is if the plugin data isn't loaded yet (and lv2:Plugin is the only one in manifest.ttl
, which is pretty common). lilv_plugin_get_class
will only return lv2:Plugin if that's the only class the plugin has.
It's possible a regression has snuck in at some point, but nothing has changed about this code in quite a long while and everything else seems to still work fine :shrug:
Ulitmately, though, this is a "don't do that" situation, this:
It should be replaced with something that just checks if plugin has workable set of inputs and outputs.
is the right way, and generally how hosts hide plugins: it hides just the ones that literally won't work at all.
Anything beyond that based on plugin class is just to fuzzy to rely on to outright hide plugins from the user. We could so some work on the spec and tools like lv2lint
to change that, but at the moment, it's just trouble.
https://github.com/ivyl/obs-lv2/commit/8fd3232efc068ba6ee477cecf33b52611b05ae28 should help the situation. It's still fairly naïve - we make sure that there's enough input and output audio ports for the number of channels the OBS is set up to use.
Adding a patch bay would be nice, especially since OBS allows us to access other sources so we could use them for sidechaining. But that's out of the scope for now, there are more pressing issues :-)
PS. I've also removed the hard RTC requirement: https://github.com/ivyl/obs-lv2/commit/86321f40fd8b483e024a608612ad996a922f1dd2.
At this moment while discovering the issue https://github.com/sadko4u/lsp-plugins/issues/256 I see the following messages in the log:
According to the code, I see that plugins are filtered by the plugin class:
This is VERY small subset of plugins that actually can be supported by the host. At least, following additional plugin types are not supported but looks like should be:
Anyway, I find the filtering of the strict list a bad practice that should be avoided. Instead of this, it is much better to specify plugin class selector as an additional combo or checkbox list.
So I would like to suggest to change the way the plugin list is formed.