How to add 15 channel to Audio plug in


#1

I am trying to add 15 channel Audio plug in.
I used setPlayConfigDetails( 15,15,getSampleRate(),getBlockSize()); inside the prepareToPlay method.
But There is only two input and out put pins available.
Can anyone tell me how to add more channels?


#2

I realized that you need to change the JucePlugin_MaxNumInputChannels to represent the maximum number of channels required.

I changed it to 32 now. But I need to enable only 15 channels.
Please let me know how to show only 15 pins only.


#3

Is this a vst2 plugin?


#4

yes its a VST plug in


#5

Anyone has answer to this?


#6

There two ways to do this. The easiest way is to change the “Plugin Channel Configurations” field in the Projucer (see screenshot). For example, for 15 in and 15 out change it to {15,15}. Then re-save your project.

The screen shot shows an example of a plug-in which can have two configurations: {1,1} and {2,2}


#7

…the other one is overriding the setPreferredBusArrangement:

#ifndef JucePlugin_PreferredChannelConfigurations
bool setPreferredBusArrangement (bool isInputBus, int busIndex,
                                 const AudioChannelSet& preferred) override;
#endif

http://pastebin.com/4Yi4hppJ


#8

Can I enable the N out of M Pins dynamically.
My plug in can produce maximum of 32 channel data. Having said that user can tweak it to produce only 16 channel data also.
The number of output channel will be a parameter. So user can change using the Editor window.

So user can select any number between 1 to 32 and he will get those many output channels from the plug in.

Is this possible?


#9

I don’t know, if this applies for ALL hosts, but afaik you don’t. It’s because the output of your plugin changes the input of subsequent plugins.
In ProTools it works this way: you get your plugin for selection only if the input bus layout matches (either number of channels or channel layout). Your plugin can require a certain layout in the preferredBusLayout, see the ultimate JUCE 4.1 MultiBus Guide from fabian. In that case for example a plugin for a 5.1 layout will not show up in a 6.0 bus.
You get not only one plugin to select but one entry for each possible output layout.
You have to be aware, that selecting a plugin variant with different input and output channel layouts, that all subsequent plugins will be changed to match the new layout (and pro tools gives you a warning, that it will alter these).
If a subsequent plugin doesn’t provide a variant with the new input layout, it will be removed.

It would be interesting how other hosts behave with changes of the bus layout dynamically, one for the Collaborate knowledge base