<?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.target" module="MSP" category="MC">
	<digest>
		Format messages to control MC objects
	</digest>
	<description>
		The <o>mc.target</o> object simpifies creating the <m>setvalue</m> messages used to target specific instances within MC wrapper objects.
	</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 to Target
			</digest>
			<description>
				Any message received in the left inlet of <o>mc.target</o> will be repeated to the left outlet preceded by <m>setvalue</m> and a target channel index most recently received in the right inlet.
			</description>
		</inlet>
		<inlet id="1" type="int">
			<digest>
				Voice Index
			</digest>
			<description>
				A voice index between 0 and 1024 will be used in subsequent <m>setvalue</m> messages triggered by messages in the left inlet.
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				<m>setvalue</m> Message Output
			</digest>
			<description>
				Any message received in the left inlet of <o>mc.target</o> will be repeated to the left outlet preceded by <m>setvalue</m> and a target channel index most recently received in the right inlet.
			</description>
		</outlet>
		<outlet id="1" type="int, voice">
			<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="1" name="initial voice" type="int" optional="1">
			<digest>
				Initial Voice Index
			</digest>
			<description>
				An int argument, if present, sets the initial value of the voice index. By default the voice index is initially 0. <m>setvalue 0</m> tells the MC wrapper to send the  message following the <m>0</m> to all instances.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output bang
			</digest>
			<description>
				In left inlet: <m>bang</m> is repeated to the left outlet preceded by <m>setvalue</m> and the current voice index.
			</description>
		</method>
		<method name="int">
			<arglist />
			<digest>
				Output int
			</digest>
			<description>
				In left inlet: The number is repeated to the left outlet preceded by <m>setvalue</m> and the current voice index.
				<br />
				<br />
				In right inlet: Sets voice index (0 - 1024) to be used for subsequent <m>setvalue</m> messages triggered by messages received in the left inlet.
			</description>
		</method>
		<method name="float">
			<arglist />
			<digest>
				Output float
			</digest>
			<description>
				In left inlet: The number is repeated to the left outlet preceded by <m>setvalue</m> and the current voice index.
				<br />
				<br />
				In right inlet: Converted to <m>int</m>. Sets the voice index (0 - 1024) to be used for subsequent <m>setvalue</m> messages triggered by messages received in the left inlet.
			</description>
		</method>
		<method name="list">
			<arglist />
			<digest>
				Output list
			</digest>
			<description>
				In left inlet: The list is repeated to the left outlet preceded by <m>setvalue</m> and the current voice index.
			</description>
		</method>
		<method name="anything">
			<arglist />
			<digest>
				Output anything
			</digest>
			<description>
				In left inlet: The message is repeated to the left outlet preceded by <m>setvalue</m> and the current voice index.
			</description>
		</method>
		<method name="voice">
			<arglist>
				<arg name="index" type="int" optional="0" />
			</arglist>
			<digest>
				Set voice index
			</digest>
			<description>
				In any inlet: the word <m>voice</m>, followed by a number (0 - 1024), sets the voice index used for subsequent <m>setvalue</m> messages triggered by messages received in the left inlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="append" get="1" set="1" type="atomarray" size="1">
			<digest>
				Message to Append
			</digest>
			<description>
				The <at>append</at> attribute can be set to one or more items to place at the end of the <m>setvalue</m> message produced by the object. By default nothing is appended.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Message to Append" />
			</attributelist>
		</attribute>
		<attribute name="prepend" get="1" set="1" type="atomarray" size="1">
			<digest>
				Message to Prepend
			</digest>
			<description>
				The <at>prepend</at> attribute can be set to one or more items to place at the beginning of the arguments to the <m>setvalue</m> message produced by the object (in other words, <m>setvalue</m> always comes first). By default nothing is prepended.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Message to Prepend" />
			</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.targetlist" />
		<seealso name="mc.voiceallocator~" />
		<seealso name="mc.noteallocator~" />
	</seealsolist>
</c74object>
