Polyphony/DSP manager for patchers
Name | Type | Opt | Description |
---|---|---|---|
patcher-name | symbol | Obligatory. The first argument must be the name of a patcher. Note: Unlike the patcher object, a subpatch window is not automatically opened for editing when a patcher argument is supplied for the poly~ object; the patcher containing the object must already exist and be found in the Max/MSP search path. |
|
number-of-patcher-instances | int | opt | After the patcher name argument, the number of instances of the loaded patcher (which correspond to the number of available "voices") is specified. The default value is | , and the maximum number of instances is 1023. The number of available voices may be dynamically changed by using the message.
'local' and flag (0 or 1) | symbol | opt | The word poly~ object's loaded patcher. Local scheduling means that the poly~ object maintains its own scheduler that runs during its audio processing rather than using the global Max scheduler. This allows finer resolution for events generated by multiple patcher instances. However, no scheduling occurs if audio processing is turned off, either globally or locally for the poly~ object or one or more of its instances. The default is off ( ). Local scheduling cannot be changed by sending messages to the poly~ object. Scheduler locality is permanent for any patcher which is loaded. | , followed by a zero or one, toggles local scheduling for the
'up' and up-sampling-factor | symbol | opt | The word poly~ object, the message takes precedence over . | , followed by a number which is a power of 2, specifies that upsampling by the designated power of two is to be done on the currently loaded patcher. The message specifies upsampling by a factor of 2 (e.g., 88200 Hz at a sampling rate of 44100 Hz). Although both and are permissible arguments to the
'down' and down-sampling factor | symbol | opt | The word poly~ object, the message takes precedence over . | , followed by a number which is a power of 2, specifies that downsampling by the designated power of two is to be done on the currently loaded patcher. The message specifies downsampling by a factor of 2 (e.g., 22050 Hz at a sampling rate of 44100 Hz). Although both and are permissible arguments to the
'args' and list-of-argument-values | symbol | opt | The word | can be used to initialize any pound-sign arguments (e.g., ) in the loaded patcher. If used, the args argument must be the last argument word used; everything which appears after the word will be treated as an argument value.
bang | Performs functions which are specific to the user-designed poly~ patcher itself. | |
int | input [int] |
Performs functions which are specific to the user-designed poly~ patcher itself. |
float | input [float] |
Performs functions which are specific to the user-designed poly~ patcher itself. |
list | message [list] |
In any inlet: If you want to send a message to a poly~ instance that starts with one of the words used to control the poly~ object itself, prepend the message with the word . For example, the message sent to the left inlet of poly~ will output out the outlet of all in 1 objects, rather than changing the current target instance to the second patcher. |
anything | message [list] |
The number of inlets and outlets for poly~ is determined by the patcher that is loaded. The inlets for the patcher loaded by a poly~ object accept both signal and event connections. The signals are routed inside of the loaded patcher by using the in~ objects for signals or the in object for events. The number of total inlets in a 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 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. |
(drag) | When a patch is dragged from the Max 5 File Browser to a poly~ object, the file will be loaded. | |
allnotesoff | In left inlet: The word | can be used to turn off all playing notes by sending a message to each instance with a playing note. The message consists of the MIDI pitch most recently received via the or message followed by a 0 (meaning zero velocity or note-off).|
busymap | message-outlet-number [int] |
In left inlet: The word poly~ object. | , followed by a number which specifies a message outlet number, will report voice busy states out the specified message outlet of the
(mouse) | Double-clicking on poly~ opens a display window where you can view the contents. | |
down | 'down' and down-sampling factor [int] |
The word poly~ object, the message takes precedence over . | , followed by a number which is a power of 2, specifies that downsampling by the designated power of two is to be done on the currently loaded patcher. The message specifies downsampling by a factor of 2 (e.g., 22050 Hz at a sampling rate of 44100 Hz). Although both and are permissible messages to the
exclude |
voice number [int] 0/1 [int] |
In left inlet: The word poly~ instance from being sent messages via note allocation when the poly~ receives a or message. By default, all voices are enabled for note allocation. The word , followed by a voice number and a zero re-enables the instance to receive messages when the poly~ receives a or message. | , followed by a voice number and a one, prevents a
mute |
instance-index [int] on/off-flag (0 or 1) [int] |
In left inlet: The word poly~ object and send a message to the thispoly~ object for the specified instance. When the second number is a processing in the patcher instance is turned off (muted). When the second number is a , the processing in the patcher instance is turned on. The message mutes all instances, and turns on signal processing for all instances of the patcher. | , followed by a number and a zero or one, will turn signal processing off for the specified instance of a patcher loaded by the
open | instance-index [int] |
In left inlet: The word poly~ object). You can use this message to view an individual instance of the patcher at work. With no arguments, the message opens the instance that is currently the target (see the message). | , followed by a number, opens the specified instance of the patcher. You can view the activity of any instance of the patcher up to the number of voices (set by the message or by an argument to the
note | voice-allocated-data [list] |
In left inlet: The word in object of the first instance of the patcher that has not marked itself "busy" by sending a to a thispoly~ object inside the patcher instance. | , followed by a message, will send the data to the first
midinote | pitch and velocity (for voice-allocation) [list] |
In left inlet: The first number after the word poly~ object routes the pitch velocity to the first available instance. If the velocity is 0 (i.e. note-off), the pitch velocity will be sent to the poly~ instance that generated the note. The determination of which instance of the loaded patcher the message will be sent to is managed by sending a (non-busy) or (busy) to a thispoly~ object located in the loaded patcher. | is the note number, followed by the velocity. If the velocity of the received MIDI note is not 0, the
mutemap | message-outlet-number [int] |
In left inlet: The word poly~ object. | , followed by a number which specifies a message outlet number, will report voice mutes out the specified message outlet of the
up | 'up' and up-sampling-factor [int] |
The word poly~ object, the message takes precedence over . | , followed by a number which is a power of 2, specifies that upsampling by the designated power of two is to be done on the currently loaded patcher. The message specifies upsampling by a factor of 2 (e.g., 88200 Hz at a sampling rate of 44100 Hz). Although both and are permissible messages to the
threadcount | number of threads [int] |
The word poly~ instances' audio processing. The default is the number of processor cores available in your computer. Typically, the number of threads should be set to the number of processor cores in your computer for best performance. This can also be accomplished by sending the message . If a poly~ object has sixteen instances and the threadcount is 4, four of the poly~ instances will process audio in each of four threads. | , followed by a number, sets the number of threads used to divide
wclose | instance-index [int] |
In left inlet: The word | , followed by a number, will close the window which contains the instance of the loaded patcher identified by the numbered index. It is the complement to the message. When used without the number argument, will close the patcher window with the highest numbered index.
Name | Type | g/s | Description |
---|---|---|---|
args | atom | Specifies the arguments for the poly~ object's loaded patch. The patch must be reloaded by setting the attribute in order for new arguments to take effect after initial load. | |
parallel | int | Toggles parallel processing. When this attribute is set to enable parallel processing, the poly~ object enables the use of multiple threads to run audio processing for all patcher instances. Otherwise, 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 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 | symbol | Specifies the filename of a patcher file loaded into the poly~ object. | |
steal | int | Toggles voice stealing. If voice stealing is set, the 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. The default is 0 (voice stealing off). | |
target | int | Specifies the poly~ instance that will receive subsequent messages (other than messages specifically used by the poly~ object itself) arriving at the poly~ object's inlets - for example, The message routes messages to the second instance. The message sends input to all instances, and using any negative number value with the message will disable input to all instances. | |
voices | int | Sets the number of instances (copies) of the loaded patcher. Instances of the patcher are loaded or deleted as needed. The maximum number of instances is 1023. | |
vs | int | Specifies the signal vector size for the 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. |
Name | Description |
---|---|
in | Message input for a patcher loaded by poly~ or pfft~ |
in~ | Signal input for a patcher loaded by poly~ |
out | Message output for a patcher loaded by poly~ or pfft~ |
out~ | Signal output for a patcher loaded by poly~ |
patcher | Create a subpatch within a patch |
thispoly~ | Control poly~ voice allocation and muting |
MSP Tutorial 20: MIDI Sampler Control | MSP Tutorial 20: MIDI Sampler Control |
MSP Tutorial 21: Using the poly~ Object | MSP Tutorial 21: Using the poly~ Object |