<?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="bendin" module="max" category="MIDI">
	<digest>
		Output MIDI pitch bend values
	</digest>
	<description>
		Outputs pitch bend values received from a MIDI device. The MIDI port and channel can be chosen with messages or by double-clicking on the object.
	</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>
				port Message Sets MIDI Input Port/Device
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Pitch Bend Amount
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				MIDI Channel
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="port" optional="1" type="symbol">
			<digest>
				MIDI port (a-z)
			</digest>
			<description>
				Specifies the port from which to receive incoming pitch bend messages. If there is no argument, <o>bendin</o> receives from all channels on all ports.
			</description>
		</objarg>
		<objarg name="midi-device" optional="1" type="symbol">
			<digest>
				MIDI device name
			</digest>
			<description>
				The name of a MIDI input device may be used as the first argument to specify the port.
			</description>
		</objarg>
		<objarg name="port-and-channel" optional="0" type="symbol">
			<digest>
				MIDI port (a-z) and channel
			</digest>
			<description>
				A letter and number combination (separated by a space) indicates a port and a specific MIDI channel on which to receive pitch bend messages. Channel numbers greater than 16 will be wrapped around to stay within the 1-16 range.
			</description>
		</objarg>
		<objarg name="channel" optional="0" type="int">
			<digest>
				Extended MIDI channel number
			</digest>
			<description>
				A number alone can be used in place of a letter and number combination. The exact meaning of the channel number argument depends on the channel offset specified for each port in the <m>MIDI Setup</m> dialog.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="anything">
			<arglist>
				<arg name="arguments" optional="0" type="list" />
			</arglist>
			<digest>
				See the <m>port</m> message
			</digest>
			<description>
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Select a MIDI port
			</digest>
			<description>
				Double-clicking on a <o>bendin</o> object shows a pop-up menu for choosing a MIDI port or device.
			</description>
		</method>
		<method name="(MIDI)">
			<digest>
				Receive MIDI input
			</digest>
			<description>
				The <o>bendin</o> object receives its input from a MIDI pitch bend message received from a MIDI input device.
			</description>
		</method>
		<method name="port">
			<arglist>
				<arg name="MIDI-port" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set the MIDI port
			</digest>
			<description>
				The word <m>port</m>, followed by a letter <m>a-z</m> or the name of an MIDI port or device, sets the port from which the object receives incoming pitch bend messages. The word <m>port</m> is optional and may 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="bendin.png" caption="Pitch bend messages can be received from everywhere, a specific port, or a specific port and channel" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bendout" />
		<seealso name="ctlin" />
		<seealso name="midiin" />
		<seealso name="notein" />
		<seealso name="rtin" />
		<seealso name="xbendout" />
		<seealso name="xbendin" />
		<seealso name="midichapter03" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				If a specific channel number is included in the argument, there is only one outlet. The output is the incoming pitch bend value from 0-127 (the most significant byte of the MIDI pitch bend message) on the specified channel and port.
				<br />
				<br />
				If there is no channel number specified by the argument, <o>bendin</o> will have a second outlet, on the right, which will output the channel number of the incoming pitch bend message.
			</description>
		</entry>
	</misc>
</c74object>
