<?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="mc.noteallocator~" module="msp" category="MC">
	<digest>
		Manage voice numbers for MIDI note events
	</digest>
	<description>
		The <o>mc.noteallocator~</o> object assigns voice numbers for MIDI and MPE note events using an optional multichannel signal to determine voice busy state. It also maintains a voice busy map used by other MC objects to avoid unnecessary processing for channels that are not actively playing notes.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MC
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="multi-channel signal">
			<digest>
				Multichannel signal representing busy state; <m>midievent</m> or <m>mpeevent</m> Messages
			</digest>
			<description>
				A multichannel signal connected to <o>mc.noteallocator~</o>'s left inlet establishes a voice busy state. Typically you'll connect the multichannel output of the sounds triggered by <o>mc.noteallocator~</o> events. This permits you to hold a voice busy during its &quot;release&quot; phase after a note-off is received until the level for that voice goes to zero.
				<br />
				<br />
				Send <m>midievent</m> messages produced by the <o>midiparse</o> object or <m>mpeevent</m> messages produced by the <o>mpeparse</o> object to the inlet of <o>mc.noteallocator~</o> to generate voice numbers accompanying note and controller events.
			</description>
		</inlet>
		<inlet id="1" type="multi-channel signal">
			<digest>
				Busy Signal, midievent or mpeevent Messages
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Note-on (Pitch, Attack Velocity)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Note-off (Pitch, Release Velocity)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				Controller (Number, Value)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				Aftertouch
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="4" type="OUTLET_TYPE">
			<digest>
				Pitch Bend
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="5" type="OUTLET_TYPE">
			<digest>
				Voice Number
			</digest>
			<description>
				Connect the voice number output to the right inlet of <o>mc.target</o> to direct notes or control information to specific channels within an MC object.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="voice count" type="int" optional="1">
			<digest>
				Voice Count
			</digest>
			<description>
				If present, a number argument sets the maximum voice count. You can change the voice count during the lifetime of the object by setting the <at>voices</at> attribute.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="midievent">
			<arglist>
				<arg name="MIDI" type="list" optional="0" />
			</arglist>
			<digest>
				MIDI events
			</digest>
			<description>
				When <o>mc.noteallocator~</o> receieves a <m>midievent</m> message (from a <o>midiparse</o> object) in its inlet, it allocates and outputs a voice number out its right outlet, then sends the MIDI note, controller, aftertouch, or pitch bend values in the <m>midievent</m> message out the designated outlets.
			</description>
		</method>
		<method name="mpeevent">
			<arglist>
				<arg name="MPE" type="list" optional="0" />
			</arglist>
			<digest>
				MPE events
			</digest>
			<description>
				When <o>mc.noteallocator~</o> receieves an <m>mpeevent</m> message (from an <o>mpeparse</o> object) in its inlet, it allocates and outputs a voice number out its right outlet, then sends the MIDI note, controller, aftertouch, or pitch bend values in the <m>mpeevent</m> message out the designated outlets.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Sets busy state
			</digest>
			<description>
				Connect an optional multichannel signal to prevent <o>mc.noteallocator~</o> from reallocating a voice until its audio level goes to zero.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="direct" get="1" set="1" type="int" size="1">
			<digest>
				Set Busy Map With Signal Input
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Set Busy Map With Signal Input" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="hires" get="1" set="1" type="int" size="1">
			<digest>
				High-resolution Pitch Bend
			</digest>
			<description>
				The <at>hires</at> attribute is used to support high-resolution pitch bend scaling. When the attribute is set to 0, <o>mc.noteallocator~</o> will accept and output pitch bend integer values in the standard MIDI range of 0 to 127. When the attribute is set to 1, it accepts high resolution MIDI data and outputs float values in the range of -1 to 1. When the attribute is set to 2, it accepts high resolution MIDI data and outputs integer values in the range of -8192 to 8191 (standard 14-bit MIDI high resolution pitch bend range). When the attribute is set to 3 (default), it accepts high resolution MIDI data and outputs integer values in the range of 0 to 16383 (unsigned 14-bit MIDI high resolution pitch bend range).
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="3" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="4">
					<enumlist>
						<enum name="Off (0-127)">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Float (-1 to 1)">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="14-bit Fixed (-8192 to 8191)">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="14-bit Fixed (0 to 16383)">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="High-resolution Pitch Bend" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="mpemode" get="1" set="1" type="int" size="1">
			<digest>
				MPE voice allocation mode
			</digest>
			<description>
				When <at>mpemode</at> is enabled, <o>mc.noteallocator~</o> outputs the voice number contained in <m>mpeevent</m> messages instead of allocating a voice number based on its internal busy state. When using MPE mode, the source of incoming MPE messages (such as a keyboard or other device) assumes responsibility for the details of voice allocation. MPE mode is disabled by default.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="MPE Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Busy map name
			</digest>
			<description>
				The <at>name</at> attribute assigns a global name to the object's busy map. By default, <o>mc.noteallocator~</o>'s busy map does not have a name and is available only to MC objects within the same patcher. A named busy map is accessible to all MC objects (in any patcher) that refer to it using the <at>busymapname</at> attribute.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Busy Map Name" />
			</attributelist>
		</attribute>
		<attribute name="steal" get="1" set="1" type="int" size="1">
			<digest>
				Voice Stealing
			</digest>
			<description>
				When <at>steal</at> is enabled, <o>mc.noteallocator~</o> will re-allocate (&quot;steal&quot;) a busy voice if it runs out of non-busy voices. The stolen voice number used will be the one least recently allocated. When <at>steal</at> is disabled, <o>mc.noteallocator~</o> will not produce any output if all voices are busy. Output resumes only when a voice becomes free, either via the input multichannel audio signal or an incoming MIDI note-off event.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Voice Stealing" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="voices" get="1" set="1" type="int" size="1">
			<digest>
				Voice Count
			</digest>
			<description>
				The <at>voices</at> attribute sets the maximum voice number <o>mc.noteallocator~</o> will allocate and output. When <at>voices</at> is 0 (the default), the active voice count is determined by the number of channels in the connected multichannel signal. If there is no connected signal, <o>mc.noteallocator~</o> defaults to 15 voices.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Voice Count" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="mc.voiceallocator~" />
		<seealso name="mc_poly_without_polytilde" module="core" type="vignette" />
		<seealso name="mc_polyphony" module="core" type="vignette" />
	</seealsolist>
</c74object>
