<?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="sxformat" module="max" category="MIDI">
	<digest>
		Prepare MIDI system exclusive messages
	</digest>
	<description>
		Accepts, as arguments, a list of numbers which are sent out sequentially. In addition, you may use one or more &quot;expr&quot;-style statements, which start with the word &quot;is&quot;, which will be evaluated with the result being sent out. &quot;is&quot; statements need to be separated by slashes.
	</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>
				First Argument, Causes Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Argument 2 in Format String
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Formatted String as a Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="SysEx" optional="0" type="list">
			<digest>
				MIDI sysex bytes
			</digest>
			<description>
				Obligatory. The arguments are a list of numbers which represent the values of individual bytes of a MIDI system exclusive message. The first number should be <m>240</m> (or <m>0xF0</m>), the system exclusive status byte and the last number should be <m>247</m> (or <m>0xF7</m>), the end byte. There can be any number of values for data bytes in between.
				<br />
				<br />
				Arguments for data bytes can also be in the form of a mathematical expression (like the expressions in <o>expr</o> and <o>if</o> objects) to be evaluated before numbers are sent out the outlet. The expressions can contain changeable arguments in the form <m>$i</m>, followed immediately by an inlet number (for example, <m>$i2</m>). The changeable arguments are replaced by numbers received in the specified inlet. Expressions used in place of numbers should be preceded by the word <m>is</m>, and should be separated from other arguments with a slash (/) on either side of the expression (see example).
				<br />
				<br />
				If the value of an evaluated expression is less than 0, no number is sent out in place of that expression. This allows you to send variable-length system exclusive messages.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output using the most recent input values
			</digest>
			<description>
				In left inlet: Sends out the bytes of the formatted message, using the most recently received numbers.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value and cause output
			</digest>
			<description>
				In left inlet: The number replaces any $ <m>i1</m> arguments in the object box, and the entire list of arguments is evaluated and sent out the outlet, one-by-one.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in3">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in4">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in5">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in6">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in7">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in8">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="in9">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Replace expression value
			</digest>
			<description>
				In any other inlet besides left: The number is stored in place of the <m>$i</m> argument that corresponds to that inlet, until a number is received in the left inlet.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Replace expression values and cause output
			</digest>
			<description>
				In left inlet: The numbers in the list are used to replace the corresponding $i arguments in the object box, then the list of arguments is evaluated and the numbers are sent out one-by-one.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="sxformat.png" caption="sxformat can send a complete MIDI system exclusive message, byte-by-byte, to midiout" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="expr" />
		<seealso name="midiout" />
		<seealso name="sysexin" />
	</seealsolist>
	<discussion>
		The format of <o>sxformat</o> arguments is similar to statements in a &quot;lib&quot; object script.
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				When a number is received in the left inlet, any expressions in the argument are evaluated and the numbers in the list are sent out one at a time, as bytes of a MIDI system exclusive message, for transmission by <o>midiout</o>.
			</description>
		</entry>
	</misc>
</c74object>
