<?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="qlist" module="max" category="Data">
	<digest>
		Store a collection of messages
	</digest>
	<description>
		Stores a collection of timed or untimed &quot;cues&quot; in the form of messages which can be sent either out its outlet or remotely to various receive objects in your patch.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Control Messages to qlist
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Control Messages to qlist
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Direct Message Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				bang on End of Cue List
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				bang When File Is Read
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Trigger automatic playback
			</digest>
			<description>
				Sending a <m>bang</m> to qlist triggers automatic-playback of the entire cue list. It begins sending messages from the first line, until a line begins with a number, at which point <o>qlist</o> will use that number as a delay time in milliseconds before continuing to send the remaining messages. A <o>qlist</o> that is playing automatically can be stopped using the <m>stop</m> message.
			</description>
		</method>
		<method name="append">
			<arglist>
				<arg name="message" optional="0" type="list" />
			</arglist>
			<digest>
				Append a message to the last entry
			</digest>
			<description>
				The word <m>append</m> followed by any arguments will append those arguments to the last entry in the <o>qlist</o> object's cue-list. To append a semicolon, it must be preceded by a backslash character.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Clear all contents
			</digest>
			<description>
				The word <m>clear</m> will clear the contents of the cue-list. This is the same as sending a <m>set</m> message with no arguments.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Open the text editing window
			</digest>
			<description>
				Double-clicking with the mouse on the <o>qlist</o> object displays its contents as text in an editing window which the user can modify.
			</description>
		</method>
		<method name="fwd">
			<arglist>
				<arg name="lines" optional="0" type="int" />
			</arglist>
			<digest>
				Move ahead to a location
			</digest>
			<description>
				The word <m>fwd</m>, followed by a number, is used to &quot;fast forward&quot; through a given number of lines, without remotely sending messages to named receive objects. For example, <m>fwd 2</m> will output the next two lines in the cue-list which bengin with numerical values. Lines beginning with symbols will be ignored.
			</description>
		</method>
		<method name="insert">
			<arglist>
				<arg name="message" optional="0" type="list" />
			</arglist>
			<digest>
				Insert into the cue-list
			</digest>
			<description>
				The word <m>insert</m> followed by any arguments will append those arguments to the <o>qlist</o> object's cue-list as a new entry in the list. To append a semicolon, it must be preceded by a backslash character.
			</description>
		</method>
		<method name="next">
			<arglist>
				<arg name="ignore-symbols" optional="0" type="int" />
			</arglist>
			<digest>
				Move to the next line
			</digest>
			<description>
				The word <m>next</m> is used to output the next line in the cue-list. It will remotely send all lines beginning with a symbol, and stop after it encounters and outputs a line beginning with a numerical value. If the word <m>next</m> is followed by a non-zero argument, it will ignore lines beginning with symbols and only output the next line beginning with a numerical value.
			</description>
		</method>
		<method name="open">
			<arglist />
			<digest>
				Open the text editing window
			</digest>
			<description>
				The word <m>open</m> will cause the <o>qlist</o> object's text editing window to be opened.
			</description>
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Read <o>qlist</o> data from disk
			</digest>
			<description>
				The word <m>read</m> will allow you to read a file from disk via a standard Max file opening dialog. If followed by a symbol argument, Max will use the symbol as a filename (or filepath and filename) and try to read a text file with the given name from the disk.
			</description>
		</method>
		<method name="rewind">
			<arglist />
			<digest>
				Move to the beginning of the file
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="cue-list-contents" optional="0" type="list" />
			</arglist>
			<digest>
				Set the stored contents
			</digest>
			<description>
				The word <m>set</m> can be used to set the contents of a <o>qlist</o> object. It completely clears any previous cue-list contents. Sending a <m>set</m> message with no arguments is the same as sending a <m>clear</m> message.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Stop playback
			</digest>
			<description>
				The word <m>stop</m> can be used to stop a <o>qlist</o> which is in the middle of playback as a result of a <m>bang</m> message.
			</description>
		</method>
		<method name="tempo">
			<arglist>
				<arg name="tempo-multiplier" optional="0" type="float" />
			</arglist>
			<digest>
				Adjust playback speed
			</digest>
			<description>
				The word <m>tempo</m>, followed by a floating-point numerical value, can be used to allow a <o>qlist</o> to automatically play itself at a faster or slower speed than indicated by the millisecond values stored internally in the cue list. By default the tempo is 1.0, which means the playback tempo is not scaled. A tempo of 0.5 plays back the cue list at half speed, whereas a tempo of 2. plays it back twice as fast.
			</description>
		</method>
		<method name="wclose">
			<arglist />
			<digest>
				Close the text editing window
			</digest>
			<description>
				The word <m>wclose</m> will cause the <o>qlist</o> object's text editing window to be closed.
			</description>
		</method>
		<method name="write">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Write <o>qlist</o> data to disk
			</digest>
			<description>
				The word <m>write</m> will allow you to save a file via a standard Max file saving dialog. If followed by a symbol argument, Max will use the symbol as a filename (or filepath and filename) and write a text file with the given name to disk.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="qlist.png" caption="qlist is flexible and can be interfaced with a patcher of your own design" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="coll" />
		<seealso name="text" />
		<seealso name="external_editor" module="core" type="vignette" />
	</seealsolist>
	<discussion>
		If you double-click on the object it opens up a text editor where you can enter or edit the <o>qlist</o> object's cue-list. Each line of the cue-list is a message ending in a semicolon. Lines do not need to be numbered or indexed (as with the <o>coll</o> object), but there are a few idiosyncrasies which need to be discussed here.
		<br />
		<br />
		There are three different message formats for lines in a cue-list: lines which contain only numerical values (i.e an <m>int</m>, <m>float</m> or <m>list</m>), lines which begin with a <m>symbol</m> (i.e. message name and arguments), and lines beginning with a numerical value (or <m>list</m> of numerical values) and subsequently having a <m>symbol</m> (message name) with arguments. These three types of lines are treated differently by <o>qlist</o>. Lines containing only numerical values are sent out the <o>qlist</o> object's left outlet, and lines beginning with a symbol are sent remotely to a <o>receive</o> object named with that symbol. (Note that this is similar to remotely sending messages from a message box - contents before the first semicolon are sent out the outlet, and messages after each semicolon are sent remotely to named <o>receive</o> objects.) Lines which begin with a numerical value (or values) but have a message and arguments after the number(s), are treated as two separate lines - the first part (all numerical) is sent out the left outlet, and the second (message) part is remotely sent to a <o>receive</o> object.
		<br />
		<br />
		When <o>qlist</o> receives a command (such as the <m>next</m> message) to output data, it will send all lines beginning with symbols to the corresponding receive objects, and stop after it has output the numerical contents of a line beginning with a number. The qlist object also has an internal timer which it uses for automatic sequencing. Sending a <m>bang</m> message to a <o>qlist</o> will cause it to play the entire contents of the cue-list. When a line begins with a number, qlist will use that number as a delay time in milliseconds before it continues outputting or sending the remaining cues.
		<br />
		<br />
		The <o>qlist</o> objects saves its cue-list with the patcher.
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet. The <o>qlist</o> object outputs a numerical value or list of numerical values when a line in the cue list begins with a number. Output is usually in response to a <m>next</m> or <m>fwd</m> message, but can also be a result of the object's internal timer, when the entire list of cues is being played as the result of a <m>bang</m> message.
			</description>
		</entry>
		<entry name="list">
			<description>
				Out left outlet. The <o>qlist</o> object outputs a numerical value or list of numerical values when a line in the cue list begins with a number. Output is usually in response to a <m>next</m> or <m>fwd</m> message, but can also be a result of the object's internal timer, when the entire list of cues is being played as the result of a <m>bang</m> message.
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out middle outlet. A <m>bang</m> is sent when a cue list has reached the end, and there are no more lines to send or output.
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out right outlet. A <m>bang</m> is sent when a file has been read successfully from disk.
			</description>
		</entry>
	</misc>
</c74object>
