LV2 channel count notification

I’m currently working on Ambisonic audio plug-ins which support up to 7th order. In order to do so, an on- and output bus with 64 discrete channels is used. For an automatic Ambisonic order selection depending on the available channels, the actual channel count should be known.

With the VST2’s, the actual channel count of the track can be reported (with this workaround) and the available channels in the processor gets “reduced” to this amount. Also when changing the channel count during operation, the preapreToPlay() method of the processor gets called and so on. At least that’s the case in REAPER.

However with LV2 plug-ins that’s not the case, regardless of the actual track properties, everything is stuck at the 64 channels. Also the compatibility settings in the REAPER plug-in options are not available where this could be manually enabled for VST2 (and VST3) plug-ins.

I don’t know if thats a missing feature in JUCE, LV2 or REAPER, but is there a chance to get the actual channel count?

1 Like

As far as I’m aware, LV2 doesn’t support dynamic channel counts. The plugin’s input and output channels must be declared in the manifest, which is a static data file.

I guess it would be possible for the host to use a subset of the declared channels, but there’s no way for the host to tell the plugin which channels it intends to use, or the speaker/location associated with each channel.

Thanks for the fast reply!
That’s unfortunate, I was hoping LV2 could to some extent replace VST2 in terms of SDK availability and VST3 regarding flexible multichannel handling with more than 24 channels. I’ll be opening an issue/feature request at the LV2 repo, maybe this will find its way into an upcoming release.
But it works fine on a subset of the declared channels, at least that’s a start!

1 Like