<?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="ctlout" module="max" category="MIDI">
	<digest>
		Transmit MIDI controller messages
	</digest>
	<description>
		Transmits MIDI continuous controller values to a MIDI device.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			MIDI
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Controller Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Controller Number
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				MIDI Channel
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="port" optional="1" type="symbol">
			<digest>
				MIDI port ID
			</digest>
			<description>
				Specifies the port (a-z) for transmitting MIDI control messages. If there is no argument, <o>ctlout</o> initially transmits out port a, on channel 1. When a port is specified by a letter argument, channel numbers greater than 16 received in the right inlet will be wrapped around to stay within the 1-16 range.
			</description>
		</objarg>
		<objarg name="device" optional="1" type="symbol">
			<digest>
				MIDI output device
			</digest>
			<description>
				The name of a MIDI output device may be used as the first argument to specify the port.
			</description>
		</objarg>
		<objarg name="ctrllr-channel" optional="1" type="list">
			<digest>
				Controller and channel
			</digest>
			<description>
				Following the (optional) port argument, the next argument is an initial value for the controller number to be used in control messages transmitted by <o>ctlout</o>. Controller numbers are automatically limited between 0 and 127. If there is no controller number specified, the initial controller number is 1.
				<br />
				<br />
				Following the controller number argument is an initial value for the channel number on which to transmit control messages. If the channel argument is not present, <o>ctlout</o> initially transmits control messages on channel 1. In order for this argument to be used, a controller number argument must precede it.
				<br />
				<br />
				If a port has been specified with a letter argument, channel numbers greater than 16 will be wrapped around to stay within the 1-16 range. If no port argument is present, the channel number specifies both the port and the channel. The exact meaning of the channel number argument depends on the channel offset specified for each port in the MIDI Setup dialog.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Format and output control message
			</digest>
			<description>
				In left inlet: The number is used as the control value, and <o>ctlout</o> transmits a MIDI control change message. Numbers are limited between 0 and 127.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Format and output control message
			</digest>
			<description>
				Converted to <m>int</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="port" optional="0" type="list" />
			</arglist>
			<digest>
				Set the MIDI output device
			</digest>
			<description>
				Performs the same function as <m>port</m>.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Select a MIDI input device
			</digest>
			<description>
				Double-clicking on a <o>ctlout</o> object shows a pop-up menu for choosing a MIDI port or device.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="channel" optional="0" type="int" />
			</arglist>
			<digest>
				Set MIDI channel number
			</digest>
			<description>
				In right inlet: The number is stored as the channel number on which to transmit the control messages.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="controller" optional="0" type="int" />
			</arglist>
			<digest>
				Set the active MIDI continuous controller number
			</digest>
			<description>
				In middle inlet: The number is stored as the controller number of the control change messages transmitted by <o>ctlout</o>. Numbers are limited between 0 and 127.
			</description>
		</method>
		<method name="port">
			<arglist>
				<arg name="port" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set the MIDI output device
			</digest>
			<description>
				In left inlet: The word <m>port</m>, followed by a letter <m>a-z</m> or the name of a MIDI output port or device, specifies the port used to transmit MIDI control messages. The word <m>port</m> is optional and can be omitted.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Port Name
			</digest>
			<description>
				Set the object's midi port based on a device name. The attribute will attempt to do a case-sensitive partial string match based on the attribute's value.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Port Name" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="text_onesymbol" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="ctlout.png" caption="Letter argument transmits to only one port......... Otherwise, number specifies both port and channel" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bendout" />
		<seealso name="ctlin" />
		<seealso name="midiout" />
		<seealso name="noteout" />
		<seealso name="xbendout" />
		<seealso name="midichapter01" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="(MIDI)">
			<description>
				There are no outlets. The output is a MIDI control message transmitted directly to the object's MIDI output port.
			</description>
		</entry>
	</misc>
</c74object>
