<?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="spray" module="max" category="Data, Lists">
	<digest>
		Distribute a value to a numbered outlet
	</digest>
	<description>
		Accepts lists as input, where the first number is taken as the outlet number, and one or more values that follow are sent out that outlet and those to its right, in right-to-left order. The argument sets the number of outlets (there is no set limit). The default number of outlets is 2.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
		<metadata name="tag">
			Lists
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				list: Outlet Number Followed by Data
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				list: Outlet Number Followed by Data
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Outlet Number 0
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Outlet Number 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="outlets" optional="1" type="int">
			<digest>
				Number of outlets.
			</digest>
			<description>
				The first argument sets the number of outlets. If there is no argument present, the object has two outlets.
			</description>
		</objarg>
		<objarg name="offset" optional="1" type="int">
			<digest>
				Numbering offset
			</digest>
			<description>
				The second argument sets an offset for the numbering of the outlets. If the second argument is not present, the outlets are numbered beginning with 0.
			</description>
		</objarg>
		<objarg name="listmode" optional="1" type="int">
			<digest>
				List Mode
			</digest>
			<description>
				The third argument, if set to '1', sets the object to &quot;list mode.&quot; In &quot;list mode,&quot; an entire list is output through the indicated outlet (with the optional offset provided by the second object argument), instead of unpacking the list and sending the individual elements out sequential outlets. This argument defaults to '0'.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Post an error
			</digest>
			<description>
				Posts an error-message in the Max Console stating that <o>spray</o> requires a list.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Send values to numbered outlets
			</digest>
			<description>
				The first number in the list is a number that specifies the outlet number; the second is an int or float value to send out that outlet. If there are additional elements in the list, they are sent out the subsequent outlets to the right of the one specified by the first number in the list. The list may contain only ints or floats; symbols will be ignored.
			</description>
		</method>
		<method name="offset">
			<arglist>
				<arg name="shift" optional="0" type="int" />
			</arglist>
			<digest>
				Set the numbering offset
			</digest>
			<description>
				The word <m>offset</m> followed by a number will offset the output of the object by the number of outlets given shifted to the left (a negative number will specify the number of outlets offset to the right).
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="spray.png" caption="Used to break up a list and send the items out specific outlets" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="cycle" />
		<seealso name="funnel" />
		<seealso name="gate" />
		<seealso name="listfunnel" />
		<seealso name="route" />
		<seealso name="unjoin" />
		<seealso name="unpack" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				When a list of is received by <o>spray</o>, the first number is used to specify an outlet, and the second int or float is sent out that outlet. Any additional numbers in the list are sent out subsequent outlets to the right.
			</description>
		</entry>
	</misc>
</c74object>
