How to determine the number of channels in the calling host?


#1

Hi,

I’m currently writing a plug-in with per channel processing for Cubase SX. The plugin should be inserted in an audio track with different channel count, e.g. stereo, 5.0 or 5.1. Therefor I have to get the information, how many channels the the audio track has, so that the GUI (and the effect) can adapt automatically to the number of channels.
As far as I know, the number of channels can only be set in the plug-in (the plug-in determines the number of channels).
How can I get the channel configuration of the audio-channel from the calling host?


#2

Are you sure it’s possible. I’m fairly certain JAP does not provide facilities for this and, that the number of channels have to be static

VST SDK 2.4 might though. It does have a method for annoucing to the host that the config has changed which suggests that it should be possible.
The docs are included with the download package so have a look in there.


#3

It might be possible in VST2.4 but I’m not really sure how it’d help, because once your plugin has been created, you’ve already set the number of channels that it asks for. And it’s not going to work in all hosts, or as an AU, RTAS, etc…

The next JAP release will have some more options for channel count though - in this one you’ll be able to specify a range of channel configs that your plugin can handle, so the host can pick one. Hopefully that means that even for a VST, the filter will end up using the same number of channels as the track, though it’s all very messy and I’m not finished yet…


#4

Has the latest juce VST wrapper been enhanced to provide the capability to determine the number of channels used in the calling host?


#5

Well, the stuff that was discussed in this 3-year-old thread has been in there for a long time, yes!


#6

Jules,

We have the 1.50 Juce SDK and are using that VST wrapper. Our JucePluginCharacteristics.h has JucePlugin_MaxNumInputChannels set to 6. If I have stereo input file, the number of channels set up and passed to processBlock is still 2. Can you tell me what I might be missing?

Thanks


#7

Did you set up JucePlugin_PreferredChannelConfigurations correctly?


#8