A newer version of Max is available. Click here to access the latest version of this document.

thispoly~

Control poly~ voice allocation and muting

Description

The thispoly~ object is placed inside a patcher loaded by the poly~ object. It sends and receives messages from the poly~ object that loads it.

Arguments

None.

Messages

bang Reports the instance number of the patch. The first instance is reported as 1.
int busy-state (0 or 1) [int]
A value of 0 or 1 toggles the "busy" state off or on for the patcher instance. When "busy" (i.e., set to 1) the object will not receive messages generated by a note or midinote message to the left inlet of the parent poly~ object.
mute mute-flag (0 or 1) [int]
The mute message toggles the DSP for the loaded instance of the patcher on (0) and off (1). This message can be combined with an int message which toggles the "busy" state of the patcher to create voices in a patcher which are only on while they play a "note".
signal A signal input can be used to set the "busy" state of the patcher instance. When an incoming signal is non-zero, the busy state for the patcher instance is set to 1. When no signal is present, the busy state is set to 0.

Information for box attributes common to all objects

Output

int: Out left outlet: The instance number, starting at 1, reported when thispoly~ receives the bang message. If the patcher containing thispoly~ was not loaded within a poly~ object, 0 is output.
int: Out right outlet: If the loaded instance of the patcher is muted, a 1 is output. If the instance is not muted, a 0 is output.

Examples

thispoly~ reports the instance number of its poly~ subpatcher

See Also

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~
poly~ Polyphony/DSP manager for patchers
MSP Tutorial 21: Using the poly~ Object MSP Tutorial 21: Using the poly~ Object