<?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="matrix" module="" category="">
	<digest>
		Event routing matrix
	</digest>
	<description>
		The <o>matrix</o> object controls the connections between inlets and outlets. You can route any inlet to any combination of outlets. Each connection has an associated gain factor and all values travelling through <o>matrix</o> can be scaled. It shares the same control protocol with the signal <o>matrix~</o> object, but unlike <o>matrix~</o>, the outlets of the <o>matrix</o> object do not add the values of multiple inputs. <o>matrix</o> is best understood as a combination of <o>gate</o> and <o>switch</o> with many more features.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="list">
			<digest>
				Connect or Disconnect
			</digest>
			<description>
				The leftmost inlet is dedicated to messages to add or delete connections between the other inlets and outlets.
			</description>
		</inlet>
		<inlet id="1" type="list">
			<digest>
				Input 0
			</digest>
			<description>
				The other inlets receive messages that are relayed to any outlets connected to the inlet.
			</description>
		</inlet>
		<inlet id="2" type="list">
			<digest>
				Input 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="dictionary">
			<digest>
				Current Connections
			</digest>
			<description>
				The leftmost outlet will output a dictionary containing a list of the current connections in response to the <m>dumpconnections</m> message.
			</description>
		</outlet>
		<outlet id="1" type="dictionary">
			<digest>
				Output 0
			</digest>
			<description>
				The other outlets output messages that are relayed by any connected inlets.
			</description>
		</outlet>
		<outlet id="2" type="dictionary">
			<digest>
				Output 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="number-of-inputs" type="int" optional="1">
			<digest>
				Input Count
			</digest>
			<description>
				Sets the number of inputs; if not present the default is 2.
			</description>
		</objarg>
		<objarg id="1" name="number-of-outputs" type="int" optional="1">
			<digest>
				Output Count
			</digest>
			<description>
				Sets the number of outputs; if not present the default is 2.
			</description>
		</objarg>
		<objarg id="0" name="default-connect-gain" type="float" optional="1">
			<digest>
				Default Gain for Connections
			</digest>
			<description>
				If a float value is provided as a third argument, it sets a default gain to be used for the <m>connect</m> message when a gain argument to <m>connect</m> is not supplied.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="list">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Connect or disconnect; data to be routed
			</digest>
			<description>
				In left inlet: A list either adds or removes a connection between an inlet and outlet. The format of the message is <m>input index</m> (starting at 0 for the object's secont inlet from left), <m>output index</m> (starting at 0), <m>gain</m>. A non-zero gain adds a connection with the designated gain; a gain of 0 deletes the connection if it exists.
				<br />
				A list received in any other inlet is routed to any connected outlets.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Delete all connections
			</digest>
			<description>
				In left inlet: The <m>clear</m> message removes all inlet - outlet connections.
			</description>
		</method>
		<method name="connect">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Connect
			</digest>
			<description>
				In left inlet: The word <m>connect</m> followed by an inlet index, outlet index, and optional gain, adds a connection between the inlet and outlet. If the gain value is not present, the default gain (set either via typed-in argument or the <at>defaultgain</at> attribute) will be used for the connection.
			</description>
		</method>
		<method name="dictionary">
			<arglist>
				<arg name="ARG_NAME_0" type="symbol" optional="0" />
			</arglist>
			<digest>
				Set All Connections
			</digest>
			<description>
				The word <m>dictionary</m> followed a symbol naming a Max dictionary object, replaces all connections with the ones in the dictionary. If the dictionary has no connections, the existing connections are cleared. To see the format of the dictionary, send the <m>dumpdictionary</m> message and print or otherwise capture the resulting dictionary that is sent out the object's left outlet.
			</description>
		</method>
		<method name="disconnect">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Disconnect
			</digest>
			<description>
				In left inlet: The word <m>disconnect</m> followed by an inlet index and outlet index deletes a connection between the inlet and outlet if it exists.
			</description>
		</method>
		<method name="dumpconnections">
			<arglist />
			<digest>
				Report Connections
			</digest>
			<description>
				The <m>dumpdictionary</m> message outputs a Max dictionary message listing all current connections of the <o>matrix</o> object.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="defaultgain" get="1" set="1" type="float" size="1">
			<digest>
				Default Gain
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Default Gain" />
			</attributelist>
		</attribute>
		<attribute name="inhibit" get="1" set="1" type="int" size="1">
			<digest>
				Inhibit Non-Numeric Messages
			</digest>
			<description>
				When <at>inhibit</at> is enabled, messages such as <m>bang</m> or <m>clear</m> are not passed through the matrix.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Inhibit Non-Numeric Messages" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="inrange" get="1" set="1" type="float" size="1">
			<digest>
				Input Range
			</digest>
			<description>
				Sets an input range for constaining incoming values and/or scaling. When an input range is set, incoming numbers and lists are constained so they are within the range. If the <at>outscale</at> attribute is also set, the incoming values are <i>also</i> scaled so they map from the input range to the output scaling.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Input Range" />
			</attributelist>
		</attribute>
		<attribute name="outscale" get="1" set="1" type="float" size="1">
			<digest>
				Output Scaling
			</digest>
			<description>
				Sets an output range for constaining output values and/or scaling. When an output scaling is set, values are constained so they are within the range before being sent out the object's outlets. If the <at>inrange</at> attribute is also set, the incoming values are <i>also</i> scaled so they map from the input range to the output scaling.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Scaling" />
			</attributelist>
		</attribute>
		<attribute name="scalemode" get="1" set="1" type="int" size="1">
			<digest>
				Scale Message Arguments
			</digest>
			<description>
				When the <at>scalemode</at> attribute is enabled, input, gain, and output scaling will be applied to numeric arguments to messages that do not start with a number. For example, if <at>scalemode</at> is enabled, the message <m>set 74</m> will scale the 74.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Scale Message Arguments" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="crosspatch" />
		<seealso name="gate" />
		<seealso name="matrix~" />
		<seealso name="matrixctrl" />
		<seealso name="receive" />
		<seealso name="router" />
		<seealso name="switch" />
		<seealso name="send" />
		<seealso name="switch" />
	</seealsolist>
</c74object>
