Dynamic Routing Using MC
There are two basic methods of dynamic routing for multichannel signals:
- Using mc.send~ and mc.receive, you can send multiple channels of audio between patchers.
- Using mc.matrix~, mcs.matrix~, mc.selector~, and mc.gate, you can control routing of multichannel signals using Max messages
Sending Multichannel Audio Between Patchers
mc.send~ and mc.receive~ are multichannel versions of send~ and receive~. An important limitation when using these multichannel versions is that you must expicitly define the number of channels you will be communicating between the objects via a typed-in argument that follows the receive name. The mc.receive~ cannot change its number of channels dynamically.
Any mc.send~ objects with a matching name can send up to the defined number of channels in the mc.receive~. If you try to send too many channels, the extra channels in the multichannel signal connected to mc.send~ are ignored. If you send too few channels, the additional channels come out the mc.receive~ set to zero. In other words, mc.receive~ always produces a multichannel signal containing its defined number of channels regardless of what you send it via mc.send~.
Dynamic Routing Using mc.send~ and mc.receive~
Like send~ and receive~, the mc.send~ and mc.receive~ objects accept the message to change the source or destination name they use to communicate. However, the fixed channel limitation of mc.receive~ is tied to the object instance, not the symbol used for the destination name. Here is an example using the message to mc.receive~. To start, the mc.receive uses the name and is communicating with the four-channel mc.send~ with name .
If we send mc.receive~, the output is still four channels despite the fact that mc.send~ with name is only sending two channels.
to the
Dynamic Multichannel Routing Using Max Messages
As objects that use the MC Wrapper, mc.gate~ and mc.selector~ work similarly to their single-channel counterparts:
The behavior of the two multichannel variants of the matrix~ warrants more detailed explanation. The mc.matrix~ consists of multiple matrix objects in the MC Wrapper. However, because each matrix can be individually targeted, channels within a multichannel input can be routed to different multichannel outputs. In this example, there is an mc.matrix~ with one multichannel input and two multichannel outputs. By sending the message (which goes to all matrix instances in the wrapper), we assign the inputs to the left outlet. The right outlet produces a multichannel signal with zero in all channels.
Using the
message to the wrapper, we can assign only the third channel of the input multichannel signal to the right outlet using the message .
The mcs.matrix~ object is a single matrix~ object where all the signal inputs are combined into one multichannel input and all the signal outputs are combined into one multichannel output. To duplicate the above example with mc.matrix~ in mcs.matrix~, first observe that there are four total inputs and eight total outputs, despite the arguments to mc.matrix~. To match this, we need an mcs.matrix~ with arguments :
Since mcs.matrix~ provides only one multichannel output, we need to use an mc.separate to split its eight-channel multichannel signal into two four-channel multichannel signals.
To route the third channel of the input in the same way, we send the message matrix~ channels are zero-relative):
(remember
Generally, you'll prefer mc.matrix when you want to route multichannel signals as a whole to different patch cords. This can be achived in one message with the mc.matrix example:
By contrast, mcs.matrix~ is an effective way to manipulate channels within a multichannel signal. For example, sending the messages in this mcs.matrix~ reverses the order of the eight input channels.