poly

Allocate notes to different voices

Description

poly enables polyphonic voice-allocation by allocating data to different individual voices.

Arguments

Name Type Opt Description
number-of-voices and steal-mode (0 or non-zero) int opt The first argument sets the number of voices to which poly can allocate notes (thus limiting the number of notes poly can hold at one time). If there is no argument present, poly can hold 16 notes.

If there is no second argument, or if the second argument is 0, poly sends any notes it cannot hold out the rightmost outlet. If there is a second argument not equal to 0, poly steals voices: when poly receives more notes than it has voices, it turns off the note it has held the longest and puts the new note in its place.
number-of-voices and steal-mode (0 or non-zero) float opt Converted to int.

Messages

int pitch-value [int]
In left inlet: The number is treated as the pitch value of pitch-velocity pair and the note is sent out.
  (inlet1) velocity-value [int]
In right inlet: The number is stored as the velocity to be paired with numbers received in the left inlet.
stop In left inlet: Immediately sends note-offs for all the notes currently being held by poly, freeing all voices.

Information for box attributes common to all objects

Output

int: Out left outlet: The output is the voice number of the note-on or note-off being sent out.

Out 2nd outlet: The output is the pitch of the note-on or note-off.

Out 3rd outlet: The number is the velocity of the note-on or note-off.
list: Out 4th outlet: The first number is the pitch, and the second number is the velocity, of any notes poly cannot hold. If there is a non-zero second argument, poly steals voices rather than send out overflow, so the fourth outlet is not created.

Examples

Send each voice to a different place... Limit the number of notes held at a time

See Also

Name Description
borax Report current information about note-ons and note-offs
flush Provide note-offs for held notes
makenote Generate a note-off message following each note-on