<?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="msp" category="MSP Routing">
	<digest>
		Route a signal to one of several outlets
	</digest>
	<description>
		Use <o>gate~</o> to route an input signal at the second inlet to one of several outlets, or to no outlet at all. When there is only one outlet (the default case), it acts as a simple switch. Unlike the Max <o>gate</o> object, any outlet which is not selected outputs a signal composed of zero values.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Routing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				int/signal Turns Input Off or Routes to Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
				(signal) Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Output 1 (Closed)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="number-of-outlets" optional="1" default="1" type="int">
			<digest>
				Number of outlets
			</digest>
			<description />
		</objarg>
		<objarg name="initial-open-outlet" optional="1" default="0" type="int">
			<digest>
				Initally selected outlet
			</digest>
			<description>
				Set the outlet that is initially selected. If 0, all signals are shut off and zero signals are sent out all outlets.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="outlet-selected" optional="0" type="int" />
			</arglist>
			<digest>
				Select outlet to route input to
			</digest>
			<description>
				Select outlet to route input to. If the number is <m>0</m> or negative a zero signal is sent out. If the number is greater than the number of outlets, the signal is sent to the rightmost outlet. If a <m>signal</m> is connected to the left inlet, <o>gate~</o> ignores <m>int</m> or <m>float</m> messages.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Select outlet to route input to. If the number is <m>0</m> or negative a zero signal is sent out. If the number is greater than the number of outlets, the signal is sent to the rightmost outlet. If a <m>signal</m> is connected to the left inlet, <o>gate~</o> ignores <m>int</m> or <m>float</m> messages.
				<br />
				<br />
				In right inlet: The input signal to be passed through to one of the <o>gate~</o> object's outlets, according to the most recently received <m>int</m> or <m>float</m> in the left inlet, or the value of the signal coming in the left inlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="gate~.png" caption="gate~ routes the input signal to one of its outlets, or shuts it off entirely" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="selector~" />
		<seealso name="matrix~" />
		<seealso name="gate" />
		<seealso name="05_mspbasicchapter04" module="msp" type="tutorial" />
		<seealso name="13_panningchapter01" module="msp" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				Depending on the value of the left inlet (either <m>signal</m> or number), one of the object's outlets will send out the input signal and rest will send out zero signals, or (if the inlet is closed) all outlets will send out zero signals.
			</description>
		</entry>
	</misc>
</c74object>
