<?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="nrpnout" module="max" category="MIDI">
	<digest>
		Format 14-bit MIDI NRPN messages
	</digest>
	<description>
		Format 14-bit MIDI Non-Registered Parameter Number messages to be transmitted using the <o>midiout</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>
				Parameter Value (0-16383 or list MSB LSB)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Parameter Delta Change (0-127)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Non-Registered Parameter Number (0-16383)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="3" type="INLET_TYPE">
			<digest>
				MIDI Channel
			</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="parameter-channel" optional="1" type="list">
			<digest>
				Parameter number and channel
			</digest>
			<description>
				The initial argument is an initial non-registered parameter number (in the range 0-16383) to be used in parameter changes messages formatted by <o>nrpnout</o>. Non-registered parameter numbers are automatically limited between 0 and 16383. The parameter number can also be expressed as a symbol formatted 'MSB:LSB' (for instance, '1:0' would specify parameter 128). If there is no controller number specified, the initial controller number is 0.
				<br />
				<br />
				Following the controller number argument is an initial value for the channel number with which to format control messages. If the channel argument is not present, <o>nrpnout</o> initially formats control messages on channel 1. In order for this argument to be used, a controller number argument must precede it. The channel number is clipped to the range 1-16.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output most recent value
			</digest>
			<description>
				Sends out a non-registered parameter message using the numbers currently stored in <o>nrpnout</o> 
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" type="int" optional="0" />
			</arglist>
			<digest>
				Send 14-bit non-registered parameter value
			</digest>
			<description>
				The number is a 14-bit non-registered parameter value to be formatted into a complete MIDI non-registered parameter number message by <o>nrpnout</o>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="msb" type="int" optional="0" />
				<arg name="lsb" type="int" optional="0" />
			</arglist>
			<digest>
				Send 14-bit non-registered parameter value
			</digest>
			<description>
				A pair of two 7-bit values, most significant byte (MSB) followed by least significant byte (LSB). The 7-bit MSB will be bitshifted and ORd with the 7-bit LSB to specify a 14-bit non-registered parameter value. The 14-bit value will be formatted into a complete MIDI non-registered parameter number message by <o>nrpnout</o>.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="delta" optional="0" type="int" />
			</arglist>
			<digest>
				Send 7-bit non-registered parameter delta
			</digest>
			<description>
				In middle-left inlet: The delta will be formatted into a complete MIDI non-registered parameter number message by <o>nrpnout</o>. Deltas outside of the range -127-127 will be ignored.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="parameter" type="int" optional="0" />
			</arglist>
			<digest>
				Set the active non-registered parameter number
			</digest>
			<description>
				In middle-right inlet: The number is stored as the non-registered parameter number of the messages transmitted by <o>nrpnout</o>. Parameter numbers outside of the range 0-16383 will be ignored.
			</description>
		</method>
		<method name="in3">
			<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 continuous controller message sent out by <o>nrpnout</o>. Channel numbers will be clipped to stay within the 1-16 range.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="parameter" type="list" optional="0" />
			</arglist>
			<digest>
				Set the current parameter number.
			</digest>
			<description>
				An argument between <m>0</m> and <m>16383</m> ((1 &lt;&lt; 14) - 1) will be stored as the non-registered parameter number of the messages transmitted by <o>nrpnout</o>.				<br />
				<br />
				The <m>set</m> message also accepts an argument list comprising most signficant byte (MSB) followed by least significant byte (LSB). The 7-bit MSB will be bitshifted and ORd with the 7-bit LSB to specify a 14-bit parameter number. For instance, <m>set 1 0</m> would specify non-registered parameter number 128.
				<br />
				<br />
				The parameter number argument can also be expressed as a symbol formatted 'MSB:LSB'. For instance, <m>set 1:0</m> would specify non-registered parameter number 128.
				<br />
				<br />
				Non-registered parameter numbers outside of the range 0-16383 will be ignored.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="hires" get="1" set="1" type="int" size="1">
			<digest>
				High resolution value mode
			</digest>
			<description>
				When enabled, <o>nrpnout</o> formats high resolution, 14-bit NRPN messages for the provided input. If you know that the parameter you are working with only responds to 7-bit values using the MSB, set <at>hires</at> to <m>0</m> to avoid inaccurate output from the object. If the parameter you are working with responds to 'high resolution' 7-bit values using an MSB of 0 and a value in the LSB, this setting will have no effect.
			</description>
			<attributelist>
				<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="Hi-resolution (14-bit) mode" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="running" get="1" set="1" type="int" size="1">
			<digest>
				Use running status
			</digest>
			<description>
				If running status is enabled, the status byte of all but the first group of bytes in the formatted NRPN messages will be eliminated.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Use Running Status" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="midiout" />
		<seealso name="ctlout" />
		<seealso name="nrpnin" />
		<seealso name="xctlout" />
		<seealso name="xbendout" />
		<seealso name="xnoteout" />
		<seealso name="rpnin" />
		<seealso name="rpnout" />
	</seealsolist>
	<discussion>
		A Non-Registered Parameter message comprises several groups of bytes to specify a 14-bit parameter number (2 groups for the for the most significant byte of the parameter number (MSB) and one for the least significant byte of the parameter number (LSB)), a 14-bit value (2 groups for the MSB and LSB of the value) or a 7-bit delta value (1 group), followed by a Null Function (2 groups) to terminate changes to the parameter.
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				When a value is received in the left inlet or 2nd inlet (value or delta), the complete MIDI NRPN message is sent out the outlet, byte-by-byte.
			</description>
		</entry>
	</misc>
</c74object>
