<?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="switch" module="max" category="Control">
	<digest>
		Accept messages from a specific inlet
	</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 Turns switch Off, Non-zero Selects Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Switch Input 1 (Currently Closed)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Switch Input 2 (Currently Closed)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Output if Open Input Receives Anything
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="inlets" optional="1" type="int">
			<digest>
				Number of inlets
			</digest>
			<description>
				Specifies the number of inlets, in addition to the leftmost inlet. If there is no argument, there are two additional inlets.
			</description>
		</objarg>
		<objarg name="initial" optional="1" type="int">
			<digest>
				Initial state
			</digest>
			<description>
				An optional second argument can be used to specify which inlet is initially open. The default is 0 (i.e., none).
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Report open inlet
			</digest>
			<description>
				In left inlet: Sends out the number of the open inlet, or <m>0</m> if all inlets are closed.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="inlet" optional="0" type="int" />
			</arglist>
			<digest>
				Select open inlet
			</digest>
			<description>
				In left inlet: The number specifies an open inlet for receiving subsequent messages to be sent out the outlet. All inlets other than the designated open one are closed. If the number is 0, all inlets are closed.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="inlet" optional="0" type="float" />
			</arglist>
			<digest>
				Select open inlet
			</digest>
			<description>
				In left inlet: Converted to <m>int</m>.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="switch.png" caption="'Listen' to only one inlet at a time, or ignore all inlets" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="forward" />
		<seealso name="funnel" />
		<seealso name="gate" />
		<seealso name="gswitch2" display="ggate" type="refpage">
			Pass the input out one of two outlets
		</seealso>
		<seealso name="gswitch" />
		<seealso name="receive" />
		<seealso name="router" />
		<seealso name="send" />
		<seealso name="basicchapter21" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="anything">
			<description>
				If the number in the left inlet is less than 0, its absolute value is used to determine which inlet to open. (<m>-1</m> opens inlet 1, <m>-2</m> opens inlet 2, etc.) If the absolute value of the number is greater than the number of existing inlets, messages are received in the rightmost inlet.
			</description>
		</entry>
	</misc>
</c74object>
