# How to add 15 channel to Audio plug in

**URL:** <https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656>\
**Category:** Audio Plugins\
**Created:** [May 10, 2016, 11:56am UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656 "2016-05-10T11:56:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![godwincharan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/godwincharan/32/213_2.png) [@godwincharan](https://forum.juce.com/u/godwincharan)\
**Post date:** [May 10, 2016, 11:56am UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/1 "2016-05-10T11:56:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![godwincharan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/godwincharan/32/213_2.png) [@godwincharan](https://forum.juce.com/u/godwincharan)\
**Post date:** [May 10, 2016, 12:30pm UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/2 "2016-05-10T12:30:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [May 10, 2016, 5:49pm UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/3 "2016-05-10T17:49:50Z")

</div>

Is this a vst2 plugin?

---

<div class="post-metadata">

**Author:** ![godwincharan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/godwincharan/32/213_2.png) [@godwincharan](https://forum.juce.com/u/godwincharan)\
**Post date:** [May 10, 2016, 6:32pm UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/4 "2016-05-10T18:32:43Z")

</div>

yes its a VST plug in

---

<div class="post-metadata">

**Author:** ![godwincharan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/godwincharan/32/213_2.png) [@godwincharan](https://forum.juce.com/u/godwincharan)\
**Post date:** [May 11, 2016, 8:20am UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/5 "2016-05-11T08:20:30Z")

</div>

Anyone has answer to this?

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [May 11, 2016, 10:08am UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/6 "2016-05-11T10:08:11Z")

</div>

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}

![](https://us1.discourse-cdn.com/flex026/uploads/juce/original/1X/cd55bd35b4770933b1ee2b8e428bae05c0722d92.png)

---

<div class="post-metadata">

**Author:** ![carlosbarbosa](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/carlosbarbosa/32/772_2.png) [@carlosbarbosa](https://forum.juce.com/u/carlosbarbosa)\
**Post date:** [May 11, 2016, 10:25am UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/7 "2016-05-11T10:25:55Z")

</div>

…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](http://pastebin.com/4Yi4hppJ)

---

<div class="post-metadata">

**Author:** ![godwincharan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/godwincharan/32/213_2.png) [@godwincharan](https://forum.juce.com/u/godwincharan)\
**Post date:** [May 11, 2016, 12:02pm UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/8 "2016-05-11T12:02:49Z")

</div>

> [@fabian](#):
>
> en shot shows an example of a plug-in which ca

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?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [May 11, 2016, 12:53pm UTC](https://forum.juce.com/t/how-to-add-15-channel-to-audio-plug-in/17656/9 "2016-05-11T12:53:30Z")

</div>

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](https://forum.juce.com/t/the-ultimate-juce-4-1-multibus-guide/16755) 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](https://forum.juce.com/t/collaborate-document-for-host-specific-behaviour/17424)…
