RoutingMatrix
The RoutingMatrix
object with which you can manipulate the channels and connections of each audio modules outputs.
const var MasterChain = Synth.getRoutingMatrix("Master Chain");
MasterChain.setNumChannels(8);
Multi Output Plugin Tutorial
1. Building HISE Multi Output
In order to do it, you'll have to build a multi-output version of HISE.
A. In the projucer file, add these two preprocessor definitions:
NUM_MAX_CHANNELS = XX
HISE_NUM_PLUGIN_CHANNELS = XX
'XX' being the number of outputs you need in your plugin, and it must be a multiple of 2, obviously.

I'm using the latest develop build of HISE, but noticed that the NUM_MAX_CHANNELS = XX
preprocessor didn't work properly. I don't know if it's a bug or a problem on my end - or I was really tired at that moment...
I changed the value directly in HISE's source code.This can be changed in the file: {HISE_FOLDER}hi_tools\Marcos.h
line (49):/** Change this value if you need more than 8 stereo channels in HISE routing. Default: 16*/
ifndef NUM_MAX_CHANNELS
define NUM_MAX_CHANNELS XX
endif
### B. Build HISE
Build HISE as usual.
## **2. Setting the outputs in HISE**
1. In HISE, click on the Main channel meter to open the routing popup:


> My build has 48 channels, that's why there're so many output here. Your setup will be different depending on how many outputs you've configured for your build)
Right-click somewhere in the popup, and change the channel amount (let's say we want 8 outputs) :

Now the routing appears like this:

> Again, it will look a bit different on your version, but all the output of your plugin should be routed to each of HISE's output channels.
2. Edit the project setting
Lastly, you'll have to add those extra definitions in your project's settings:
HISE_NUM_PLUGIN_CHANNELS=8NUM_MAX_CHANNELS=8

You're all set now to do what you want with your outputs.
Here's a snippet:HiseSnippet 2136.3oc6as0TajbEdDvrAoMYK6s1Zq7XWToJjVKj0Mt3PbYrEfCULFUHXcRQQ4pYlVnNdT2S5oG.U65Gxur7WH+T1WySImSOijFIKqEDdcXoF8.ntO849oO8W2EzTIcXAARkUlbG0ymYk42Z2pmP2oQGJWXs21VYJXePn1OTS5xDgADovqGosTQzcXDWoSHLslp4Rg0K54SCBXtVYxL+KQ1yjcAKyme5Yuf5QENrgSYY88RtC6U7tb8vYat0eg64sK0kcDuahUWeq8bjhFROYHXpyaW1xm57N54rWSwkM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XhUvwYhIVoOwOK5XFg4U8NBLOzcRg4kBy61.yqZJLuTXd2uf4UMElWJLuTXd2ig4M2zzw7epf4U6txq48rTXdov7tcv7pkByKEl28KXd0Rg4kByKEl28XXdKLMcX+oBlW86Jul2Vov7Rg4c6f4UOElWJLu6Wv7pmByKElWJLu6wv79hooieyOmNd3D0wh2J+HlX0ju0X0wHVK4aMVaLh0SBes9XDWMI70UGi3ZIiHqMFw0SFQVePDoK0QIeqSze5xl+49Ly.UBBy+0gYs2GGS9f+rqsr5BHtdqiynh5CXr5rxXsYkw5yJiqNqLt1rx35yJia7yyHBH94gZY2ntEVV62bGyec4Yxri.+uOyz3v5+wGeMh2
Original post on the forum: Multi Output Tutorial
Class methods
addConnection
adds a connection to the given channels. Edit on GitHub
RoutingMatrix.addConnection(int sourceIndex, int destinationIndex)
addSendConnection
adds a send connection to the given channels. Edit on GitHub
RoutingMatrix.addSendConnection(int sourceIndex, int destinationIndex)
clear
Removes all connections. Edit on GitHub
RoutingMatrix.clear()
getDestinationChannelForSource
Returns the output channel that is mapped to the given input channel (or -1). Edit on GitHub
RoutingMatrix.getDestinationChannelForSource(var sourceIndex)
getNumDestinationChannels
Gets the amount of destination channels. Edit on GitHub
RoutingMatrix.getNumDestinationChannels()
getNumSourceChannels
Gets the amount of source channels. Edit on GitHub
RoutingMatrix.getNumSourceChannels()
getSourceChannelsForDestination
Returns one or multiple input channels that is mapped to the given output channel (or -1). Edit on GitHub
RoutingMatrix.getSourceChannelsForDestination(var destinationIndex)
getSourceGainValue
Gets the current peak value of the given channelIndex. Edit on GitHub
RoutingMatrix.getSourceGainValue(int channelIndex)
removeConnection
Removes the connection from the given channels. Edit on GitHub
RoutingMatrix.removeConnection(int sourceIndex, int destinationIndex)
removeSendConnection
removes the send connection. Edit on GitHub
RoutingMatrix.removeSendConnection(int sourceIndex, int destinationIndex)
setNumChannels
Sets the amount of channels (if the matrix is resizeable). Edit on GitHub
RoutingMatrix.setNumChannels(int numSourceChannels)