<?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="xctlin" module="max" category="MIDI">
	<digest>
		Output received 14-bit MIDI control values
	</digest>
	<description>
		Output the value from a specific 14-bit controller pair and MIDI channel.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			TEXT_HERE
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Raw MIDI Bytes From midiin
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Raw MIDI Bytes From midiin
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Controller Value (14-bit)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Controller Number (MSB)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				MIDI Channel
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="ctrllr-channel" optional="1" type="list">
			<digest>
				Controller and channel
			</digest>
			<description>
				The initial argument is a single high resolution controller number (in the range 0-95) to be recognized by <o>xctlin</o>. If there is no controller number, or if the argument is a negative number, <o>xctlin</o> recognizes all high resolution controller numbers. If a single controller number is specified in the argument, the outlet which normally sends the controller number is unnecessary, and is not created.
				<br />
				<br />
				Following the controller number argument is a single channel number on which to receive control messages. If the channel argument is not present, <o>xctlin</o> receives control messages on all channels. In order for this argument to be used, a controller number argument must precede it. To specify a channel number without specifying a controller number, use <m>-1</m> for the controller number. The channel number is clipped to the range 1-16.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" type="int" optional="0" />
			</arglist>
			<digest>
				Evaluate as 14-bit MIDI CC data.
			</digest>
			<description>
				The numbers are individual bytes of a MIDI message stream, received from an object such as <o>midiin</o>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" type="list" optional="0" />
			</arglist>
			<digest>
				Evaluate as 14-bit MIDI CC data.
			</digest>
			<description>
				The numbers are bytes of a MIDI message stream, received from an object such as <o>midiin</o>.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="controller" type="int" optional="1" />
			</arglist>
			<digest>
				Set the current controller number.
			</digest>
			<description>
				The message <m>set</m> without any arguments, or with an argument of <m>-1</m>, will cause <o>xctlin</o> to output incoming 14-bit MIDI continuous controller messages from any high resolution controller. An argument between <m>0</m> and <m>95</m> (the MIDI high resolution controller numbers) will cause <o>xctlin</o> to only output incoming 14-bit MIDI continuous controller messages from the controller specified.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="lsbfirst" get="1" set="1" type="int" size="1">
			<digest>
				Parse incoming messages with the LSB byte group first.
			</digest>
			<description>
				When enabled, the LSB group of bytes in the incoming continuous controller messages will be parsed first, followed by the MSB group. This ordering is unusual, but is required by some MIDI hardware.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Transmit LSB before MSB" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<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="midiin" />
		<seealso name="ctlin" />
		<seealso name="xctlout" />
		<seealso name="xbendin" />
		<seealso name="xnotein" />
		<seealso name="nrpnin" />
		<seealso name="rpnin" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: The number is the value of an incoming MIDI control change message as a single 14-bit value.
				<br />
				<br />
				If a specific controller number is not specified as an argument, the controller number is sent out the 2nd outlet.
				<br />
				<br />
				If a specific channel number is not included in the argument, the channel number is sent out an additional, right, outlet.
			</description>
		</entry>
	</misc>
</c74object>
