<?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="gate" module="max" category="Control">
	<digest>
		Pass input to an outlet
	</digest>
	<description>
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Control
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				0 Closes gate, Non-zero Opens Gate Outlet
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Incoming Gated Messages
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Output of Messages if Open
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="outlets" optional="1" type="int">
			<digest>
				Number of outlets
			</digest>
			<description>
				Specifies the number of outlets. If there is no argument, there is only one outlet.
			</description>
		</objarg>
		<objarg name="initial-state" optional="1" type="int">
			<digest>
				Initial state
			</digest>
			<description>
				Specifies which outlet is initially open. The default is 0 (none).
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Report the current outlet
			</digest>
			<description>
				Reports the current open outlet (0 if closed) out the left outlet.
			</description>
			<discussion>
				This message is provided for use with the <o>grab</o> object.
			</discussion>
		</method>
		<method name="int">
			<arglist>
				<arg name="outlet-number" optional="0" type="int" />
			</arglist>
			<digest>
				Set outlet number
			</digest>
			<description>
				The number specifies an open outlet through which to pass all messages received in the right inlet. A number in the left inlet does not trigger any output.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="outlet-number" optional="0" type="float" />
			</arglist>
			<digest>
				Set outlet number
			</digest>
			<description>
				Converted to <m>int</m>.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="gate.png" caption="Message is passed out the specified outlet.... This one closes the door behind itself" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="gswitch2" display="ggate" type="refpage">
			Pass the input out one of two outlets
		</seealso>
		<seealso name="gswitch" />
		<seealso name="route" />
		<seealso name="router" />
		<seealso name="send" />
		<seealso name="switch" />
		<seealso name="basicchapter09" module="max" type="tutorial" />
		<seealso name="basicchapter21" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="anything">
			<description>
				Messages received in the right inlet are passed out the outlet specified by the number in the left inlet. If the number in the left inlet is <m>0</m>, or if no outlet number has been received yet, all messages are ignored. If the number in the left inlet is less than 0, messages are sent out the leftmost outlet. If it is greater than the number of existing outlets, messages are sent out the rightmost outlet.
			</description>
		</entry>
	</misc>
</c74object>
