<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="poly" module="max" category="Notes">
	<digest>
		Allocate notes to different voices
	</digest>
	<description>
		Provides polyphonic voice-allocation by allocating data to different individual voices.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			MIDI
		</metadata>
		<metadata name="reference">
			TEXT_HERE
		</metadata>
		<metadata name="license">
			TEXT_HERE
		</metadata>
		<metadata name="tag">
			Notes
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Pitch or list with Pitch and Velocity
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Velocity
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Voice Number
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Pitch
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				Velocity
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				Overflow Notes
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="voices" optional="1" type="number">
			<digest>
				Number of voices
			</digest>
			<description>
				Sets the number of voices to which <o>poly</o> can allocate notes (thus limiting the number of notes <o>poly</o> can hold at one time). If there is no argument present, <o>poly</o> will hold up to 16 notes.
			</description>
		</objarg>
		<objarg name="steal-mode" optional="1" type="float">
			<digest>
				Voice steal mode
			</digest>
			<description>
				If there is no second argument, or if the second argument is <m>0</m>, <o>poly</o> sends any notes it cannot hold out the rightmost outlet. If there is a non=zero second argument, <o>poly</o> steals voices: when <o>poly</o> 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.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="pitch" optional="0" type="int" />
			</arglist>
			<digest>
				Input pitch, cause output
			</digest>
			<description>
				The number is treated as the pitch value of pitch-velocity pair and the note is sent out.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="velocity" optional="0" type="int" />
			</arglist>
			<digest>
				Input velocity
			</digest>
			<description>
				The number is stored as the velocity to be paired with numbers received in the left inlet.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Send note-offs for held notes
			</digest>
			<description>
				In left inlet: Immediately sends note-offs for all the notes currently being held by <o>poly</o>, freeing all voices.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="poly.png" caption="Send each voice to a different place... Limit the number of notes held at a time" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="borax" />
		<seealso name="flush" />
		<seealso name="makenote" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: The output is the voice number of the note-on or note-off being sent out.
				<br />
				<br />
				Out 2nd outlet: The output is the pitch of the note-on or note-off.
				<br />
				<br />
				Out 3rd outlet: The number is the velocity of the note-on or note-off.
			</description>
		</entry>
		<entry name="list">
			<description>
				Out 4th outlet: The first number is the pitch, and the second number is the velocity, of any notes <o>poly</o> cannot hold. If there is a non-zero second argument, <o>poly</o> steals voices rather than send out overflow, so the fourth outlet is not created.
			</description>
		</entry>
	</misc>
</c74object>
