<?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.targetlist" module="msp" category="MC">
	<digest>
		Format messages based on inlet number for controlling MC objects
	</digest>
	<description>
		The <o>mc.targetlist</o> object simplifies creating the <m>setvalue</m> messages used to target specific instances within MC wrapper objects. The object maps the index of an inlet where a message was received to a voice index used in the resulting <m>setvalue</m> message.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MC
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Message for Channel 1
			</digest>
			<description>
				Each inlet of <o>mc.targetlist</o> is associated with a voice index. The index corresponding to the inlet will be used as the first argument to the <m>setvalue</m> message sent out the object's left outlet.
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Message for Channel 2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				<m>setvalue</m> Message Output
			</digest>
			<description>
				Any message received any inlet of <o>mc.targetlist</o> will be repeated to the left outlet preceded by <m>setvalue</m> and a target channel index associated with the inlet where the message was originally received.
			</description>
		</outlet>
		<outlet id="1" type="int">
			<digest>
				Voice Index
			</digest>
			<description>
				Prior to the <m>setvalue</m> message being sent out the left outlet, the current voice index is sent out the right outlet. This is handy for use with other MC message objects including <o>mc.route</o>, <o>mc.makelist</o>, or another <o>mc.target</o>.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="prepend" type="symbol" optional="1">
			<digest>
				Initial Message
			</digest>
			<description>
				A symbol argument, if present, sets a message to use in <m>setvalue</m> message output. For example, if the argument is <m>tree</m>, the resulting message output for voice index 1 and an int with a value of 10 would be <m>setvalue 1 tree 10</m>.
			</description>
		</objarg>
		<objarg id="0" name="voice index" type="int" optional="1">
			<digest>
				Voice Indices
			</digest>
			<description>
				You can specify one or more voice index values to be associated with each inlet. For example, if the arguments are 5 6 7 8, four inlets are created and the left inlet is associated with voice index 5, the next inlet with 6, and so on. If no numbers are supplied as arguments, two inlets are created. The left inlet is associated with voice index 1 and the right inlet with voice index 2.
			</description>
		</objarg>
		<objarg id="0" name="inlet count" type="int" optional="1">
			<digest>
				@chans sets inlet count
			</digest>
			<description>
				To specify a number of inlets without having to type in a voice index for each one, precede an inlet count value with <m>@chans</m>. <m>@chans</m> and the inlet count must be the last typed-in arguments.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Set a bang message for the corresponding voice index
			</digest>
			<description>
				In any inlet: The <m>bang</m> message is repeated to the left outlet, preceded by <m>setvalue</m> and the voice index associated with the inlet where the message was received.
			</description>
		</method>
		<method name="int">
			<arglist />
			<digest>
				Set an integer value for the corresponding voice index
			</digest>
			<description>
				In any inlet: An number is repeated to the left outlet, preceded by <m>setvalue</m> and the voice index associated with the inlet where the number was received.
			</description>
		</method>
		<method name="float">
			<arglist />
			<digest>
				Set a decimal number for the corresponding voice index
			</digest>
			<description>
				In any inlet: An number is repeated to the left outlet, preceded by <m>setvalue</m> and the voice index associated with the inlet where the number was received.
			</description>
		</method>
		<method name="list">
			<arglist />
			<digest>
				Set a list value
			</digest>
			<description>
				In any inlet: A list is repeated to the left outlet, preceded by <m>setvalue</m> and the voice index associated with the inlet where the list was received.
			</description>
		</method>
		<method name="anything">
			<arglist />
			<digest>
				Set a message for the corresponding voice index
			</digest>
			<description>
				In any inlet: The message is repeated to the left outlet, preceded by <m>setvalue</m> and the voice index associated with the inlet where the message was received.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="listmode" get="1" set="1" type="int" size="1">
			<digest>
				Send each value of a list as individual <m>setvalue</m> messages
			</digest>
			<description>
				When enabled, the <at>listmode</at> attribute produces individual <m>setvalue messages</m> for each element in the list, as if you had sent each list element separately to successive inlets. For example, with <at>listmode</at> disabled, a list <m>5 6 7 8</m> received in the left inlet of an <o>mc.targetlist</o> object with four inlets would produce the message <m>setvalue 1 5 6 7 8</m>. With <at>listmode</at> enabled, the <o>mc.targetlist</o> object would produce four separate messages: <m>setvalue 1 5</m>, <m>setvalue 2 6</m>, <m>setvalue 3 7</m>, and <m>setvalue 4 8</m>.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<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="Iterate Lists" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="mc_events" module="core" type="vignette" />
		<seealso name="mc_events_newobjects" module="core" type="vignette" />
		<seealso name="mc_poly_without_polytilde" module="core" type="vignette" />
		<seealso name="mc.makelist" />
		<seealso name="mc.target" />
		<seealso name="mc.voiceallocator~" />
		<seealso name="mc.noteallocator~" />
	</seealsolist>
</c74object>
