Use the mc.poly~ to encapsulate a patcher inside an object box, to specify the patcher filename and the number of instances you want to load as arguments to the poly~ object, and to control object processing and routing in the loaded patcher instances.
The mc.poly~ object directs signals and events (messages) received in its inlets to in and in~ objects inside patcher instances, and handles the output of signals or events from instances of the poly~ object using the out and out~ objects. Unlike mc.poly~, the audio inputs to patchers can be instance-specific using multi-channel inputs, and the audio outputs from patchers are not mixed to a single channel but appear as a multi-channel output.
The first argument must specify the name of a patcher to be loaded which already exists and is in the Max search path. A subpatch window is not automatically opened for editing when a patcher argument is supplied for the mc.poly~ object.
The number of patcher instances corresponds to the number of available "voices" This number can be any number between 1 and 1023, and may be dynamically changed by using themessage.
local and flag (0 or 1) [symbol]
With mc.poly~ object maintains its own scheduler that runs during its audio processing rather than using the global Max scheduler, allowing finer resolution for events generated by multiple patcher instances. The local scheduler is run immediately before processing a vector of audio, as if "Scheduler in Audio Interrupt" were on within the context of the poly~ object. Local scheduling is disabled by default - Scheduler locality is permanent for any patcher which is loaded, and cannot be changed by sending messages to the poly~ object.set to 1, the
'up' and up-sampling-factor [symbol]
Use theargument followed by a number which is a power of two to upsample local DSP processing on the currently loaded patcher (e.g., specifies 88200 Hz at a sampling rate of 44100 Hz). Upsampling may be dynamically changed by using the message.
'down' and down-sampling factor [symbol]
Use theargument followed by a number which is a power of two to downsample local DSP processing on the currently loaded patcher (e.g., specifies 22050 Hz at a sampling rate of 44100 Hz). Downsampling may be dynamically changed by using the message.
'args' and list-of-argument-values [symbol]
Use the argumentfollowed by an argument value to initialize any pound-sign arguments in the loaded patcher (e.g., ). If used, the argument must be the last argument word used; everything which appears after the word will be treated as an argument value.
args [20 atoms]
When using messages to specify arguments for a mc.poly~ object's loaded patch, the patch must be reloaded by setting the attribute for new arguments to take effect after initial load.
legacynotemode [int] (default: 0)8.0.0
When set to 1, legacynotemode allows note and midinote messages to use the old (pre Max 8) voice assignment algorithm, which continues to play voice 1. When set to 0, note and midinote messages cycle through the least recently used voice.
midimode [int] (default: 0)7.2.0
When midimode is set to '1', all MIDI messages sent to mc.poly~ will be sent to all voices. Note that this does not apply to messages. In order to send all messages to all voices, use a '-1' value for the voice argument, eg: 'mpeevent 1 1 2 210 117' (an aftertouch message to all voices).
mpemode [int] (default: 0)7.2.0
When this attribute is set to '1', mc.poly~ will perform direct voice allocation based on the voice argument of an mpeevent message.
When this attribute is set to enable parallel processing, the mc.poly~ object enables the use of multiple threads to run audio processing for all patcher instances. If disabled mc.poly~ runs all patcher instances in the audio processing thread. The DSP chain must be restarted whenever the parallel attribute is changed. This attribute is disabled it when Max is hosted by the Live application.
Note: At this time, you cannot specify a single subpatcher on a different core. When enabled, this attribute splits up the number of voices between the number of processors available. It is primarily intended for patches that use a significant amount of CPU within multiple voices of the same mc.poly~ object, and the multithreading overhead is primarily useful for larger signal vector sizes (at least 32 or greater). Other situations will not benefit. Using the default threadcount (which is equal to the number of physical cores) is best.
patchername [32 symbols]
The filename(s) of a patcher file or files loaded into the mc.poly~ object. The mc.poly~ object can load different patchers on different voices, specified as arguments to the patchername/patchernames attribute. If there is no voices argument, the total number of patchers specified by the attribute will be the number of voices; if there is a voices argument, then patchers are repeated in a cycle up to the voice number.
replicate [int] (default: 1)8.0.0
Toggles the use of high-quality resampling filters. These filters are enabled by default.
Voice stealing enable causes the mc.poly~ object sends the data from the or messages to instances that are still marked "busy"; this can result in clicks depending on how the instances handle the interruption. Voice stealing is disabled by default.
The mc.poly~ instance that will receive subsequent messages (other than messages specifically used by the mc.poly~ object itself) arriving at the mc.poly~ object's inlets - for example, The message routes messages to the second instance. If the message specifies a value greater than the current number of instances (copies) of the loaded patcher, the message will be sent to the highest numbered instance (e.g., sending the message to a mc.poly~ object containing only a single instance will send subsequent messages to the first instance). The message sends input to all instances, and using any negative number value with the message will disable input to all instances.
Number of Voices
Specifies the signal vector size for the mc.poly~ object's loaded patch. The signal vector size will be set on the next compilation of the DSP chain. The message does not force a recompilation of the DSP chain. specifies no fixed vector size. The default is the current signal vector size.
zone [int] (default: 0)7.2.0
Use this attribute to set the MPE 'zone' that the mc.poly~ will listen to. The default is '0' (ignore zones).
Common Box Attributes
The signals are routed inside of the loaded patcher by using the in~ objects for signals or the in object for events. The total number of inlets in a mc.poly~ object is determined by the highest number of an in~ or in object in the loaded patcher (e.g., if there is an in~ with argument 3 and an in with argument 4, the mc.poly~ object will have four inlets. All the inlets accept signal connections even though there may not be an in~ object corresponding to each inlet.
Signal inputs are fed to all instances.
If the second note value is not 0, the mc.poly~ object routes the pitch velocity to the first available instance. If the velocity is 0 (i.e. a MIDI note-off message), the pitch velocity will be sent to the mc.poly~ instance that generated the note. To determine which instance of the loaded patcher the message will be sent to, send a (non-busy) or (busy) message to a thispoly~ object located in the loaded patcher.
Note: The only way to turn a voice off properly when using a is to use a signal to a thispoly~ object in the subpatcher loaded by the mc.poly~ object (if a signal is not connected to the thispoly~ object , the MIDI note-off message turns off the voice assignment immediately).
message arguments [list]
The number of outlets of a mc.poly~ object is determined by the sum of the highest argument numbers of the out and out~ objects in the loaded patcher. For instance, if there is an out 3 object and an out~ 2 object, the mc.poly~ object will have six outlets. The signal outputs corresponding to the out~ objects are leftmost in the mc.poly~ object, followed by the event outlets corresponding to the out objects, followed by a voice number outlet.
Signals sent to the inlet of out~ objects in each patcher instance are not mixed, but combined into a multi-channel signal output, one outlet for each out~ index. The number of channels in the multi-channel output corresponds to the number of instances (voices) loaded in the mc.poly~ object.
|MSP MIDI Tutorial 3: MIDI Sampler||MSP MIDI Tutorial 3: MIDI Sampler|
|MSP Polyphony Tutorial 1: Using the poly~ Object||MSP Polyphony Tutorial 1: Using the poly~ Object|