<?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="seq~" module="msp" category="MSP Functions">
	<digest>
		Signal-driven event sequencer
	</digest>
	<description>
		The <o>seq~</o> object is an event sequencer that is driven by a signal input. <o>seq~</o> can be used to create looping sequences of control data that are synchronized to a <o>phasor~</o>.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Functions
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				phasor~ input, commands, messages to be sequenced
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="anything">
			<digest>
				sequence output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="list">
			<digest>
				dump output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="symbol">
			<digest>
				id on read, (bang) when done reading
			</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>
				Causes information about the <o>seq~</o> object's current sequence number, mode of operation (record, overdub, play)
			</digest>
			<description>
				Causes information about the <o>seq~</o> object's current sequence number, mode of operation (record, overdub, play) and total number of current events to be printed in the Max window.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Same as <m>anything</m>.
			</digest>
			<description>
				Same as <m>anything</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Same as <m>anything</m>.
			</digest>
			<description>
				Same as <m>anything</m>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Same as <m>anything</m>.
			</digest>
			<description>
				Same as <m>anything</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				The <o>seq~</o> object is used to record and play back messages.
			</digest>
			<description>
				The <o>seq~</o> object is used to record and play back messages. All events received in the inlet are stored according to the current value of the input signal. Any message can be sequenced except for commands to the <o>seq~</o> object itself. The example shows a simple way to work around this limitation.
				<br />
				Note: <o>seq~</o> can be used to sequence MIDI data if the MIDI input stream is converted into lists of MIDI events. This conversion is necessary to avoid outputting a corrupted MIDI stream which would occur if only the raw int messages of a MIDI stream were sequenced individually and the <o>seq~</o> object were not doing a simple forward linear playback.
			</description>
		</method>
		<method name="add">
			<arglist>
				<arg name="sequence-name (symbol), start time (float), optional end time (float) and Max-Event (message)" optional="0" type="list" />
			</arglist>
			<digest>
				The word <m>add</m>, followed by an int, a float and a message, inserts a Max event specified by the message at the time specified by the float for the sequence number specified by the int. (e.g., <m>add 2 0.5 honk</m> will insert the message <m>honk</m> to be played at the halfway point of sequence 2.)
			</digest>
			<description>
				The word <m>add</m>, followed by an int, a float and a message, inserts a Max event specified by the message at the time specified by the float for the sequence number specified by the int. (e.g., <m>add 2 0.5 honk</m> will insert the message <m>honk</m> to be played at the halfway point of sequence 2.)
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				The word <m>clear</m>, followed by the name of a sequence, erases the sequence.
			</digest>
			<description>
				The word <m>clear</m>, followed by the name of a sequence, erases the sequence. The message <m>clear all</m> erases all current sequences.
			</description>
		</method>
		<method name="erase">
			<arglist />
			<digest>
				Synonym for <m>clear</m>.
			</digest>
			<description>
				Synonym for <m>clear</m>.
			</description>
		</method>
		<method name="delete">
			<arglist>
				<arg name="sequence-number (int), time (float), and Max-Event (message)" optional="0" type="list" />
			</arglist>
			<digest>
				The word <m>delete</m>, followed by an symbol that specifies a sequence name, a float and a message, deletes a Max event or events specified by the message at the time specified by the float for the sequence name specified by the symbol. An additional end time may also be specified. Here are some examples:
				<br />
				<br />
				<m>delete mysequence 5.</m>: delete all the events at time 5 in mysequence.
				<br />
				<m>delete mysequence 6.5 8.</m>: delete all the events between time 6.5 and 8 in mysequence.
				<br />
				<m>delete mysequence -1. 99. explosion</m>: delete only the event explosion wherever it occurs.
			</digest>
			<description>
				The word <m>delete</m>, followed by an symbol that specifies a sequence name, a float and a message, deletes a Max event or events specified by the message at the time specified by the float for the sequence name specified by the symbol. An additional end time may also be specified. Here are some examples:
				<br />
				<br />
				<m>delete mysequence 5.</m>: delete all the events at time 5 in mysequence.
				<br />
				<m>delete mysequence 6.5 8.</m>: delete all the events between time 6.5 and 8 in mysequence.
				<br />
				<m>delete mysequence -1. 99. explosion</m>: delete only the event explosion wherever it occurs.
			</description>
		</method>
		<method name="dump">
			<arglist>
				<arg name="sequence-number (int)" optional="1" type="int" />
			</arglist>
			<digest>
				Causes the contents of the current stored event sequence to be sent out the middle outlet.
			</digest>
			<description>
				Causes the contents of the current stored event sequence to be sent out the middle outlet. The word <m>dump</m>, followed by a number, outputs only the sequence designated by the number.
			</description>
		</method>
		<method name="play">
			<arglist>
				<arg name="playback-enable-flag (0 or 1)" optional="0" type="int" />
			</arglist>
			<digest>
				The word <m>play</m>, followed by 1, causes <o>seq~</o> to begin Max event playback of the current sequence (set by the <m>seqnum</m> message)
			</digest>
			<description>
				The word <m>play</m>, followed by 1, causes <o>seq~</o> to begin Max event playback of the current sequence (set by the <m>seqnum</m> message) at the point of the loop specified by the current value of the signal input. <m>play 0</m> turns off playback. By default, playback is off.
			</description>
		</method>
		<method name="offset">
			<arglist>
				<arg name="number-to-offset-sequence-numbering" optional="0" type="int" />
			</arglist>
			<digest>
				The word <m>offset</m> followed by a number will offset the numbering of sequences by the specified number.
			</digest>
			<description>
				The word <m>offset</m> followed by a number will offset the numbering of sequences by the specified number.
			</description>
		</method>
		<method name="overdub">
			<arglist>
				<arg name="overdub-enable-flag (0 or 1)" optional="0" type="int" />
			</arglist>
			<digest>
				The word <m>overdub</m>, followed by 1, causes <o>seq~</o> to begin Max event recording of the current sequence (set by the <m>seqnum</m> message)
			</digest>
			<description>
				The word <m>overdub</m>, followed by 1, causes <o>seq~</o> to begin Max event recording of the current sequence (set by the <m>seqnum</m> message) in &quot;overdub&quot; mode. Recording begins at the current point of the loop and wraps around at the point where the input signal reaches 1, continuing to record as the signal passes its original value. The message <m>overdub 0</m> turns off overdub mode.
			</description>
		</method>
		<method name="seq">
			<arglist>
				<arg name="sequence (int or symbol)" optional="0" type="int" />
			</arglist>
			<digest>
				Performs the same function as <m>seqnum</m>.
			</digest>
			<description>
				Performs the same function as <m>seqnum</m>.
			</description>
		</method>
		<method name="seqnum">
			<arglist>
				<arg name="sequence (int or symbol)" optional="0" type="int" />
			</arglist>
			<digest>
				The word <m>seqnum</m>, followed by a number or symbol, sets the current Max event sequence being recorded or played back.
			</digest>
			<description>
				The word <m>seqnum</m>, followed by a number or symbol, sets the current Max event sequence being recorded or played back.
			</description>
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
			</arglist>
			<digest>
				Reads a text file containing Max event sequences created using the <o>seq~</o> object's <m>write</m> message into the memory of the.
			</digest>
			<description>
				Reads a text file containing Max event sequences created using the <o>seq~</o> object's <m>write</m> message into the memory of the. <o>seq~</o> object. If no symbol argument appears after the word <m>read</m>, a standard open file dialog is opened showing available text files. The word <m>read</m>, followed by a symbol, reads the file whose filename corresponds to the symbol into the <o>seq~</o> object's memory without opening the dialog box.
			</description>
		</method>
		<method name="record">
			<arglist>
				<arg name="playback-enable-flag (0 or 1)" optional="0" type="int" />
			</arglist>
			<digest>
				The word <m>record</m>, followed by 1, causes <o>seq~</o> to begin recording events into the current sequence (set by the <m>seqnum</m> message)
			</digest>
			<description>
				The word <m>record</m>, followed by 1, causes <o>seq~</o> to begin recording events into the current sequence (set by the <m>seqnum</m> message) at the point of the loop specified by the current value of the signal input. <m>record 0</m> turns off recording. Recording is off by default.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				An input signal whose output is between 0.
			</digest>
			<description>
				An input signal whose output is between 0. and 1.0 (usually the output of a <o>phasor~</o>) is used to drive the event sequencer.
			</description>
		</method>
		<method name="symbol">
			<arglist>
				<arg name="input" optional="0" type="symbol" />
			</arglist>
			<digest>
				Same as <m>anything</m>.
			</digest>
			<description>
				Same as <m>anything</m>.
			</description>
		</method>
		<method name="write">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
			</arglist>
			<digest>
				Saves the contents of all current Max event sequences into a text file.
			</digest>
			<description>
				Saves the contents of all current Max event sequences into a text file. A standard file dialog is opened for naming the file. The word <m>write</m>, followed by a symbol, saves the file, using the symbol as the filename, in the same folder as the patch containing the <o>seq~</o> object. If the patch has not yet been saved, the <o>seq~</o> file is saved in the same folder as the Max application.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="seq~.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="phasor~" />
		<seealso name="techno~" />
	</seealsolist>
	<discussion>
		It is optimized for continuous ramp input, but any signal passing through any range of values will work. Sequence events can be recorded in real-time or inserted with the <m>add</m> message. <o>seq~</o> can contain any number of sequences, but only one at a time is active for playback and recording.
	</discussion>
	<misc name="Output">
		<entry name="any message">
			<description>
				Out left outlet: When playback is enabled with the <m>play 1</m> message, the <o>seq~</o> object outputs all events recorded at the time specified by the input signal.
			</description>
		</entry>
		<entry name="list">
			<description>
				Out right outlet: The dump message will cause the <o>seq~</o> object to output the contents of a specified sequence to be output in the form of a list consisting of an int which specifies the sequence number, a float which specifies the signal value associated with that point in time, and the int, float, symbol or list to be output at that time.
			</description>
		</entry>
	</misc>
</c74object>
