<?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="mpeformat" module="max" category="MIDI">
	<digest>
		Prepare data in the form of a Multidimensional Polyphonic Expression (MPE) MIDI message
	</digest>
	<description>
		Numbers received in the inlets from <o>midiformat</o> objects are routed as MPE-compatible MIDI messages. In addition, the object outputs <m>mpeevent</m> messages for use with instruments hosted by the <o>vst~</o> object.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			TEXT_HERE
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				MIDI Input (Zone Master Channel)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 2)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 3)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="3" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 4)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="4" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 5)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="5" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 6)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="6" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 7)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="7" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 8)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="8" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 9)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="9" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 10)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="10" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 11)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="11" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 12)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="12" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 13)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="13" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 14)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="14" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 15)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="15" type="INLET_TYPE">
			<digest>
				MIDI Input (for MIDI Output Channel 16)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				MIDI Output
			</digest>
			<description>
				Out left outlet: MIDI messages are sent out as individual bytes.
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				mpeevent Message Output
			</digest>
			<description>
				Out rightmost outlet: The MPE Event Message. The MPE event message is a list composed of the symbol mpeevent, followed by 6 integers which specify the Zone Master Channel, Zone Index, Voice Number, Channel Number, MIDI Message Number, and Data. This message can be sent to a patch encapsulated in a <o>poly~</o> object using the <o>polymidiin</o> object.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="channels" type="int" optional="0">
			<digest>
				Number of MIDI input channels
			</digest>
			<description>
				An argument can be used to set the number of MIDI input channels. The number of inlets will be one more than the argument value, since the leftmost inlet is a global MIDI input. If no argument is specified, one Zone Master Channel input and 15 channel inputs will be created.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				<m>bang</m> message to the leftmost inlet will send out the MPE configuration message for the current state of this object out the <o>mpeformat</o> object's left outlet.
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="byte" type="int" optional="0" />
			</arglist>
			<digest>
				MIDI message data
			</digest>
			<description>
				Numbers received in the other inlets are used as data for MIDI messages and routed to the input channel corresponding to the inlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="byte" type="float" optional="0" />
			</arglist>
			<digest>
				Converted to <m>int</m>.
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="midievent">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				MIDI event message
			</digest>
			<description>
				In any inlet: The MIDI Event Message. The message is a list composed of the symbol <m>midievent</m>, followed by a list of integers which specify the MIDI event type and value.
			</description>
		</method>
		<method name="mpeevent">
			<arglist>
				<arg name="MPE message" type="list" optional="0" />
			</arglist>
			<digest>
				MPE MIDI event message
			</digest>
			<description>
				In any inlet: The MPE event message is a list composed of the symbol <m>mpeevent</m>, followed by 6 integers which specify the Zone Master Channel, Zone Index, Voice Number, Channel Number, MIDI Message Number, and Data.
			</description>
		</method>
		<method name="reset">
			<arglist />
			<digest>
				Reset input channel/global
			</digest>
			<description>
				The message <m>reset</m> resets an individual voice (if received in a voice inlet) or all voices (if received in the leftmost inlet).
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="chanrange" get="1" set="1" type="int" size="1">
			<digest>
				Channel Range
			</digest>
			<description>
				The channel range specifies the number of channels following the Zone Master Channel (15 by default. <m>masterchannel 1, chanrage 15</m> will be all 16 channels, and <m>masterchannel 1, chanrange 5</m> will be master channel 1 and the zone will run until the end of channel 6). The default value of the attribute is the same value as the first argument to the <o>mpeformat</o> object (i.e. the number of input channels). If you set the attribute's value as an argument (e.g. <m>@chanrange 4</m>, you will set the number of inlets the object has, as well.
				<br />
				<br />
				Note: You can set this attribute to a value between 1 and the Channel range if this change only effects the config MIDI message received from a <o>mpeconfig</o> object.
			</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="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Channel Range" />
			</attributelist>
		</attribute>
		<attribute name="masterchan" get="1" set="1" type="int" size="1">
			<digest>
				Master MIDI Channel
			</digest>
			<description>
				Sets the first MIDI channel to be addressed. All other channels number from there.
			</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="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Zone Master Channel" />
			</attributelist>
		</attribute>
		<attribute name="zone" get="1" set="1" type="int" size="1">
			<digest>
				Zone ID
			</digest>
			<description>
				Sets the MPE MIDI Zone ID.
			</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="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Zone ID" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="midiformat" />
		<seealso name="midiin" />
		<seealso name="midiparse" />
		<seealso name="mpeconfig" />
		<seealso name="mpeparse" />
		<seealso name="polymidiin" />
	</seealsolist>
</c74object>
