Messages to the MC Object Wrapper
Most MC objects exist inside an MC Wrapper. The wrapper holds one or more instances of an object. Using features specific to the wrapper, you can address all instances at once or target specific instances. Finally, a powerful set of wrapper messages permit simultaneous high-level control of all object instances.
Setting a Number of Object Instances Within the Wrapper
The
attribute sets the count of instances of an object within a wrapper object . If the attribute has a value other than 0, the instance count is fixed and does not auto-adapt to the maximum number of channels in any multichannel signal connected to its inlets. Typically is a typed-in argument to a wrapper object.Changing channel attributes
While the
attribute can be changed during the lifetime of an object, the actual multichannel outputs of the object will not update to reflect the new channel count until the audio is restarted.In this example, if the mc.*~ object while the audio is running, the output will not change. But if you turn the audio off and on again after having sent the message, it will send a four-channel signal to the mc.unpack~ meaning the four right outputs of mc.unpack~ will change to 0.
message is sent to the
Setting Initial Values of Instances Within the Wrapper
If you simply type cycle~ objects within the wrapper will have the initial frequency value of 440. To assign different initial values to wrapper instances, use the typed-in attribute. For example, would assign a frequency of 440 to the first cycle~ object, a frequency of 660 to the second cycle~ object, and a frequency of 880 to the third object. You can combine both if you want the first few objects to be set to different values but the rest set to a default value. For example, would set the first three cycle~ objects to 440, 660, and 880 and the rest of the objects to 200.
allSending Messages to All Instances Within the Wrapper
To send a message to all instances of an object within the wrapper, simply send the message. It will be sent to each instance. In this example, after clicking the message mc.cycle~, all 16 instances will have the frequency 660.
connected to the
Sending Messages to a Specific Instance Within the Wrapper
To send a message to a specific instance of an object within the wrapper, precede the message by the word mc.cycle~ shown below, the first instance will have a frequency of 660 while the remaining 15 instances will have a frequency of 440.
followed by the instance number starting at 1. For example, after clicking the message connected to the
A simpler way to target specific instances within a wrapper object is to use the mc.target object. Sending any message into the left inlet of mc.target outputs that message preceded by and the current channel (voice) number. Here is the same example as above. First the message is sent to the right inlet of mc.target, then the is sent. The mc.target object produces the message .
Many event-based objects in MC follow a convention of sending a voice number out a rightmost outlet immediately before a message out a different outlet, making it possible to use mc.target to control specific object instances with these events.
Applying a List of Values to Successive Instances Within the Wrapper
If you want to apply a single value within a list to successive instances of an object within the wrapper, use the cycle~ within the mc.cycle~ object will have a value of 440, the second will have a value of 660 and the third will have a value of 880.
message. In this example, after clicking the message box, the first instance of
In addition to applying numerical values, lores~ instance is set to a different value based on the arguments to the message sent to mc.lores~.
can set single-valued message arguments and attribute values. In this example, the attribute of each
Applying a Sequence of Values to Successive Instances Within the Wrapper
To apply a repeating sequence of values to all wrapper instances, use the mc.sig~ to a repeating cycle of 1, 2, and 3.
message. With one argument, is the same as simply sending that value to all instances. With two or more arguments, cycles through the arguments applying them to each instance in succession. For example, clicking the message in this example will set all values of