<?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="sflist~" module="msp" category="MSP I/O">
	<digest>
		Store audio file cues
	</digest>
	<description>
		<o>sflist~</o> stores a list of preloaded cues for sound files that can be accessed by multiple <o>sfplay~</o> objects. Each <o>sflist~</o> object has a unique name that <o>sfplay~</o> objects use to refer to its cues. Defining a cue is the same for <o>sflist~</o> as for <o>sfplay~</o>. You can preload cues for <o>sflist~</o> without the audio being on.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP I/O
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				open Opens File, preload Defines Cue
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Cue Reporting
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="object-name" optional="0" type="symbol">
			<digest>
				Name the <o>sflist~</o>.
			</digest>
			<description>
				Names the <o>sflist~</o>. <o>sfplay~</o> objects use this name to refer to cues stored inside the object.
			</description>
		</objarg>
		<objarg name="buffer-size" optional="1" type="int">
			<digest>
				Set buffer size
			</digest>
			<description>
				Sets the buffer size used to preload audio files. The default and minimum is 16384. Preloaded buffers are 4 times the buffer size per channel of the audio file.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="clear">
			<arglist>
				<arg name="cue-numbers" optional="0" type="list" />
			</arglist>
			<digest>
				Clear all defined cues
			</digest>
			<description>
				The word <m>clear with</m> no arguments clears all defined cues. After a <m>clear</m> message is received, only the number <m>1</m> will play anything (assuming there's an open file). The word <m>clear</m> followed by one or more cue numbers removes them from the <o>sflist~</o> object's cue list.
			</description>
		</method>
		<method name="embed">
			<arglist>
				<arg name="saving-preference-flag" optional="0" type="int" />
			</arglist>
			<digest>
				Toggle saving cues/filename with the patcher file
			</digest>
			<description>
				The message <m>embed</m>, followed by any non-zero integer, causes <o>sflist~</o> to save all of its defined cues and the name of the current open file when the patcher file is saved. The message <m>embed</m>  <m>0</m> keeps <o>sflist~</o> from saving this information when the patcher is saved. By default, the current file name and the cue information is not saved in <o>sflist~</o> when the patcher is saved. If an <o>sflist~</o> object is saved with stored cues, they will all be preloaded when the patcher containing the object is loaded.
			</description>
		</method>
		<method name="fclose">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Close a file and remove all cues
			</digest>
			<description>
				The word <m>fclose</m>, followed by the name of an open file, closes the file and removes all cues associated with it. The word <m>fclose</m> by itself closes the current file.
			</description>
		</method>
		<method name="open">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Open a file
			</digest>
			<description>
				The word <m>open</m>, followed by the name of an AIFF, WAV, or NeXT/Sun audio file, opens the file if it is located in Max's search path. Without a filename, <m>open</m> brings up a standard open file dialog allowing you to choose a file. When a file is opened, its beginning is read into memory, and until another file is opened, playing from the beginning the file is defined as cue <m>1</m>. Subsequent cues can be defined referring to this file using the <m>preload</m> message without a filename argument. When the <m>open</m> message is received, the previous current file, if any, remains open and can be referred to by name when defining a cue with the <m>preload</m> message. If any cues were defined that used the previous current file, they are still valid even if the file is no longer current.
			</description>
		</method>
		<method name="openraw">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="preload">
			<arglist>
				<arg name="cue-number" optional="0" type="int" />
				<arg name="filename" optional="0" type="symbol" />
				<arg name="start-time" optional="0" units="ms" type="int" />
				<arg name="end-time" optional="0" units="ms" type="int" />
				<arg name="directional-flag" optional="0" type="int" />
				<arg name="playback-speed" optional="0" type="float" />
			</arglist>
			<digest>
				Define a cue
			</digest>
			<description>
				Defines a cue, an integer greater than or equal to 2, to refer to a specific region of a file. When that cue number is subsequently received by an <o>sfplay~</o> object that is set to use cues from the <o>sflist~</o> object, the specified region of the file is played by <o>sfplay~</o>. Cue number 1 is always the beginning of the current file - the file last opened with the <m>open</m> message - and cannot be modified with the <m>preload</m> message.
				<br />
				<br />
				There are a number of forms for the <m>preload</m> message. The word <m>preload</m> is followed by an obligatory cue number between 2 and 32767. If the cue number is followed by a filename - a file that is currently open or one that is in Max's search path - that cue number will henceforth play the specified file. Note that a file need not have been explicitly opened with the <m>open</m> message in order to be used in a cue. If no filename is specified, the currently open file is used.
				<br />
				<br />
				After the optional filename, an optional start time in milliseconds can be specified. If no start time is specified, the beginning of the file is used as the cue start point. After the start time, an end time in milliseconds can be specified. If no end time is specified, or the end time is <m>0</m>, the cue will play to the end of the file. If the end time is less than the start time, the cue is defined but will not play. Eventually it may be possible to define cues that play in reverse.
				<br />
				<br />
				After the start and/or end time arguments, a optional directional buffer flag is used to enable reverse playback of stored cues. Setting this flag to 1 enables reverse cue playback. The default setting is <m>0</m> (bidirectional buffering off).
				<br />
				<br />
				A final optional argument is used to set the playback speed. A float value sets the playback speed for an <o>sfplay~</o> object relative to the object's global playback speed -- set by the <m>speed</m> message. The default value is <m>1</m>.				<br />
				<br />
				Each cue that is defined requires approximately 40K of memory per <o>sfplay~</o> channel at the default buffer size (40320), with bidirectional buffering turned off. With bidirectional buffering turned on, the amount of memory per cue is doubled.
			</description>
		</method>
		<method name="print">
			<arglist />
			<digest>
				Print a list of all current cues
			</digest>
			<description>
				Prints a list of all the currently defined cues.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Name
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Name" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="sflist~.png" caption="Store a global list of cues that can be used by one or more sfplay~ objects" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="buffer~" />
		<seealso name="groove~" />
		<seealso name="play~" />
		<seealso name="sfinfo~" />
		<seealso name="sfplay~" />
		<seealso name="sfrecord~" />
		<seealso name="07_samplingchapter06" module="msp" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="Cues">
			<description>
				Cues are stored within the object for reference by other soundfile objects. A listing of internally stored cues is sent out its outlet with the <m>cuedump</m> message.
			</description>
		</entry>
	</misc>
</c74object>
