I’m in the process of creating an ambisonics encoder plugin (VST3) that is supposed to work up to order 5. Thus, my basic thinking was to initialise the processor like this:
.withInput ("Input", AudioChannelSet::ambisonic(5), true)
.withOutput ("Output", AudioChannelSet::ambisonic(5), true))
isBusesLayoutSupported always return
But, that way, when setting the track channels in Reaper to 36, in the
buffer.getNumChannels() both return 24 instead of 36.
I tried to add multiple Inputs and Outputs (even though I only want one bus after all), and somehow when setting the track channels in Reaper to 48 or something I get enough channels, but the behaviour seems a bit unpredictable.
Is there anything I’m doing wrong ? I can’t initialize with discrete channels either because that’s seeingly prohibited.
EDIT: Same happens when I try to use discrete channels and ignore the assert.
IIRC Fabian explained it, that the value in the constructor is merely to provide a starting point.
But the actual negotiation happens by the host calling
isBusesLayoutSupported with all variations it can work with. By returning always true, you are basically saying to the host “up to you”…
I don’t know enough about Reaper, why it would prefer a different number of channels than you selected there though.
That’s a VST3 issue, which also prevents me from porting Ambisonics plug-ins to VST3. I already have opened an issue at their github repository, a thread at their developer forum, and at the reaper forum, they (Steinberg) don’t seem to care that much about higher order Ambisonics :-/ feel free to comment the issue on github to maybe push it a little bit
Edit: here’s the link to the issue: https://github.com/steinbergmedia/vst3sdk/issues/28
Thanks for the clarification! That, in fact, is quite disappointing, now that the VST2 SDK isn’t available in JUCE anymore.
You can still build VST2 plugins with Juce, if you have the old Steinberg VST2 header files available. You can not however distribute such plugins if you didn’t get the Steinberg VST2 development license agreement last year.