<?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="xbendout" module="max" category="MIDI">
	<digest>
		Format extra precision MIDI pitch bend messages
	</digest>
	<description>
		Formats messages which occupy both bytes of the MIDI pitch bend message. <link name="xbendout" type="refpage">xbendout2</link> allows you to send the pitch bend data as two bytes from 0-127.
	</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>
				MSB of Pitch Bend
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				LSB of Pitch Bend
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Raw MIDI Bytes to midiout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="xbendout2" optional="0" type="symbol">
			<digest>
				Add extra inlet
			</digest>
			<description>
				If the object is called <link name="xbendout" type="refpage">xbendout2</link>, there will be three inlets. The most significant byte of the pitch bend message is received in the left inlet, and the least significant (extra precision) byte is received in the middle inlet.
			</description>
		</objarg>
		<objarg name="channel" optional="1" type="int">
			<digest>
				MIDI channel
			</digest>
			<description>
				The number sets an initial value for the MIDI channel of the pitch bend messages. If there is no argument, the initial channel number is <m>1</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output most recent value
			</digest>
			<description>
				Sends out a MIDI pitch bend message using the numbers currently stored in <o>xbendout</o>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Send 14-bit pitch bend value
			</digest>
			<description>
				The number is a 14-bit pitch bend value to be formatted into a complete MIDI pitch bend message by <o>xbendout</o>.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="channel" optional="0" type="int" />
			</arglist>
			<digest>
				Set the MIDI output channel
			</digest>
			<description>
				In right inlet: The number is stored as the MIDI channel for the pitch bend message sent out by <o>xbendout</o>. Channel numbers greater than 16 will be wrapped around to stay within the 1-16 range.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="channel" optional="0" type="int" />
			</arglist>
			<digest>
				Set MIDI output channel
			</digest>
			<description>
				The number is stored as the MIDI channel for the pitch bend message sent out by <o>xbendout</o>. Channel numbers greater than 16 will be wrapped around to stay within the 1-16 range.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="value" optional="0" type="int" />
				<arg name="channel" optional="0" type="int" />
			</arglist>
			<digest>
				Input both values, send pitch bend data
			</digest>
			<description>
				The first number is a 14-bit pitch bend value, and the second number is the channel. Both numbers are stored and are formatted into a MIDI pitch bend message which is sent out the outlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="xbendout.png" caption="14-bit pitch bend value is formatted into a MIDI message, which is sent out byte-by-byte" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bendout" />
		<seealso name="midiout" />
		<seealso name="xbendin" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				When a pitch bend value is received in the left inlet, the complete MIDI pitch bend message is sent out the outlet, byte-by-byte.
			</description>
		</entry>
	</misc>
</c74object>
