<?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="xnotein" module="max" category="MIDI">
	<digest>
		Interpret MIDI note messages with release velocity
	</digest>
	<description>
	</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>
				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>
				Pitch
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Velocity
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				1 for Note-on, 0 for Note-off
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				MIDI Channel
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="channel" optional="1" type="int">
			<digest>
				MIDI channel
			</digest>
			<description>
				Specifies a channel number on which to look for incoming MIDI note-on and note-off messages. Channel numbers greater than 16 will be wrapped around to stay within the 1-16 range. If there is no argument, <o>xnotein</o> recognizes note-on and note-off messages on all MIDI channels, and the channel number of the message is sent out the rightmost outlet.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Receive and interpret MIDI input
			</digest>
			<description>
				The numbers are individual bytes of a MIDI stream from <o>midiin</o>. Whereas a note-on with a velocity of 0 is most commonly used to indicate a note-off, <o>xnotein</o> also recognizes the MIDI note-off command, and outputs its release velocity.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="xnotein.png" caption="Both note-on and note-off messages are interpreted, with a key-down or key-up velocity" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="notein" />
		<seealso name="midiin" />
		<seealso name="xnoteout" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: The pitch value of the incoming note-on or note-off message.
				<br />
				<br />
				Out 2nd outlet: The key-down or key-up velocity of a note-on or a note-off message.
				<br />
				<br />
				Out 3rd outlet: The number is the indicator of whether the incoming MIDI message is a note-on or a note-off. If the incoming message is a note-on, the output is <m>1</m>. If the incoming message is a note-off--or a note-on with a velocity of 0--the output is <m>0</m>.				<br />
				<br />
				If no channel number is specified as an argument, <o>xnotein</o> has a 4th outlet on the right. The channel number of incoming messages is sent out the rightmost outlet.
			</description>
		</entry>
	</misc>
</c74object>
