<?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="midiformat" module="max" category="Notes">
	<digest>
		Prepare data in the form of a MIDI message
	</digest>
	<description>
		Numbers received in the inlets are used as data for MIDI messages. The data is formatted into a complete MIDI message (with the status byte determined by the inlet) and sent out the outlet as individual bytes.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Notes
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				MIDI Message Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				midievent Message Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial-MIDI-channel-number" optional="1" type="int">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				Sets an initial value for the channel number of the MIDI messages. Numbers greater than 16 are wrapped around to stay between 1 and 16. If there is no argument, the channel number is initially set to <m>1</m>.
			</description>
		</objarg>
		<objarg name="initial-MIDI-channel-number" optional="1" type="float">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				Converted to <m>int</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="value" type="int" optional="0" />
			</arglist>
			<digest>
				Depends on inlet
			</digest>
			<description>
				Function depends on inlet. See inlet entries, <m>in1</m>  <m>in2</m>  <m>in3</m>  <m>in4</m>  <m>in5</m>  <m>in6</m>  <m>in7</m>, for descriptions.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="value" type="float" optional="0" />
			</arglist>
			<digest>
				Depends on inlet
			</digest>
			<description>
				Function depends on inlet. See inlet entries, <m>in1</m>  <m>in2</m>  <m>in3</m>  <m>in4</m>  <m>in5</m>  <m>in6</m>  <m>in7</m>, for descriptions.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="pitch-value and velocity" optional="0" type="list" />
			</arglist>
			<digest>
				In leftmost inlet: The first number is a pitch value and the second number is a velocity value, to be formatted into a note-on message.
			</digest>
			<description>
				In leftmost inlet: The first number is a pitch value and the second number is a velocity value, to be formatted into a note-on message.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="aftertouch and pitch-value" optional="0" type="list" />
			</arglist>
			<digest>
				In 2nd inlet: The first number is an aftertouch (pressure) value and the second number is a pitch value (key number), to be formatted into a polyphonic key pressure message.
			</digest>
			<description>
				In 2nd inlet: The first number is an aftertouch (pressure) value and the second number is a pitch value (key number), to be formatted into a polyphonic key pressure message.
			</description>
		</method>
		<method name="in3">
			<arglist>
				<arg name="control-value and controller-number" optional="0" type="list" />
			</arglist>
			<digest>
				In 3rd inlet: The first number is a controller number and the second number is a control value, to be formatted into a control message.
			</digest>
			<description>
				In 3rd inlet: The first number is a controller number and the second number is a control value, to be formatted into a control message.
			</description>
		</method>
		<method name="in4">
			<arglist>
				<arg name="program-change-value" optional="0" type="int" />
			</arglist>
			<digest>
				In 4th inlet: The value is formatted into a program change message.
			</digest>
			<description>
				In 4th inlet: The value is formatted into a program change message.
			</description>
		</method>
		<method name="in5">
			<arglist>
				<arg name="aftertouch" optional="0" type="int" />
			</arglist>
			<digest>
				In 5th inlet: The value is formatted into an aftertouch (channel pressure) message.
			</digest>
			<description>
				In 5th inlet: The value is formatted into an aftertouch (channel pressure) message.
			</description>
		</method>
		<method name="in7">
			<arglist>
				<arg name="MIDI-channel-number" optional="0" type="int" />
			</arglist>
			<digest>
				In rightmost inlet: The number is stored as the channel number of the MIDI messages.
			</digest>
			<description>
				In rightmost inlet: The number is stored as the channel number of the MIDI messages. The actual value of the status byte is dependent on the channel. Numbers greater than 16 are wrapped around to stay between 1 and 16.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="hires" get="1" set="1" type="int" size="1">
			<digest>
				High-resolution Pitch Bend
			</digest>
			<description>
				The <at>hires</at> attribute is used to support high-resolution pitch bend scaling. When the attribute is set to 0, the pitch bend inlet will accept integer values in the standard MIDI range of 0 to 127. When the attribute is set to 1, it accepts float values in the audio signal range of -1 to 1. When the attribute is set to 2, it accepts integer values in the range of -8192 to 8191 (standard 14-bit MIDI high resolution pitch bend range).
			</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="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="Off (0-127)">
							<digest>
								Standard 8-bit MIDI pitch bend range (default)
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Float (-1 to 1)">
							<digest>
								Uses pitch bend messages in the audio signal range
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="14-bit Fixed (-8192 to 8191)">
							<digest>
								Standard 14-bit MIDI high resolution pitch bend range
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.2.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="High-resolution Pitch Bend" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="midiformat.png" caption="Numbers are formatted into MIDI messages and sent out as individual bytes" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="borax" />
		<seealso name="midiin" />
		<seealso name="midiinfo" />
		<seealso name="midiparse" />
		<seealso name="midiselect" />
		<seealso name="mpeconfig" />
		<seealso name="mpeformat" />
		<seealso name="mpeparse" />
		<seealso name="noteout" />
		<seealso name="polymidiin" />
		<seealso name="sxformat" />
		<seealso name="xbendout" />
		<seealso name="xnoteout" />
		<seealso name="midichapter03" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: MIDI messages are sent out as individual bytes, for recording by the <o>seq</o> object or for transmission by the <o>midiout</o> object.
			</description>
		</entry>
		<entry name="list">
			<description>
				Out right outlet: A formatted <m>midievent</m> message for use with the <o>vst~</o> object.
			</description>
		</entry>
	</misc>
</c74object>
