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 .
Dynamic Multichannel Routing Using Max Messages
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 themessage 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 :
To route the third channel of the input in the same way, we send the message matrix~ channels are zero-relative):(remember