<?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="delay~" module="msp" category="MSP Delays">
	<digest>
		Delay a signal
	</digest>
	<description>
		Use the <o>delay~</o> object to delay a signal by a certain amount of time. The delay time can be specified in samples (determined by the sampling rate), or using the Max <link name="maxtime" module="core" type="vignette">time format</link> syntax for tempo-relative values.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Delays
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				Input to be Delayed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="int/signal">
			<digest>
				Delay Time in Samples
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Delayed Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="maximum-delay-memory" optional="0" default="512" units="samples" type="int">
			<digest>
				Maximum delay time
			</digest>
			<description>
				Set maximum delay time in samples. This determines the amount of memory allocated for the delay line.
			</description>
		</objarg>
		<objarg name="initial-delay-time" optional="1" default="0" units="time-value" type="list">
			<digest>
				Initial delay time
			</digest>
			<description>
				Set the initial delay time. The delay time can be either a number which specifies time in samples (e.g. delay~ 44100 200) or a <link name="maxtime_syntax" module="core" type="vignette">notevalue</link> (e.g. delay~ 2000 2n).
			</description>
		</objarg>
		<objarg name="ramp-time" optional="1" default="0" units="time-value" type="int">
			<digest>
				Delay ramp time
			</digest>
			<description>
				Set the delay ramp time, in milliseconds. If the delay time is controlled using a float rather than a signal value, the delay time will be crossfaded.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="delay-time" optional="0" units="samples" type="int" />
			</arglist>
			<digest>
				Set delay time
			</digest>
			<description>
				In right inlet: set delay time. The delay time cannot be less than 0 (no delay) nor can it be greater than the maximum delay time.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="delay-time" optional="0" units="samples" type="float" />
			</arglist>
			<digest>
				Set delay time (converted to int)
			</digest>
			<description />
		</method>
		<method name="list">
			<arglist>
				<arg name="time/transport-settings" optional="0" units="time-value" type="list" />
			</arglist>
			<digest>
				Set delay time in a Max <link name="maxtime" module="core" type="vignette">time format</link>.
			</digest>
			<description />
		</method>
		<method name="anything">
			<arglist>
				<arg name="time/transport-settings" optional="0" units="time-value" type="list" />
			</arglist>
			<digest>
				Set delay time in a Max <link name="maxtime" module="core" type="vignette">time format</link>.
			</digest>
			<description />
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Zero the delay memory
			</digest>
			<description />
		</method>
		<method name="maxsize">
			<arglist>
				<arg name="maximum-delay-memory" optional="0" units="samples" type="int" />
			</arglist>
			<digest>
				Set maximum delay time
			</digest>
			<description />
		</method>
		<method name="ramp">
			<arglist>
				<arg name="ramp-time" optional="0" units="ms" type="float" />
			</arglist>
			<digest>
				Set the time to ramp to a new delay time
			</digest>
			<description />
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Signal to be delayed.
				<br />
				In right inlet: Set delay time. Signal-based delay uses interpolation, which introduces a one-sample delay.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="delay" get="1" set="1" type="atom" size="10">
			<digest>
				Delay time
			</digest>
			<description />
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Timing" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Delay Time" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="time" />
				<attribute name="units" get="1" set="1" type="atom" size="7" value="ms hh:mm:ss ticks bars.beats.units notevalues hz samples" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="delay~.png" caption="Delay signal for a specific number of samples, for echo or filtering effects" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="comb~" />
		<seealso name="tapin~" />
		<seealso name="tapout~" />
		<seealso name="mstosamps~" />
		<seealso name="sampstoms~" />
		<seealso name="pipe" />
		<seealso name="transport" />
	</seealsolist>
	<discussion>
		The differences between <o>delay~</o> and <o>tapin~</o>/ <o>tapout~</o> are as follows: First, delay times with <o>delay~</o> are specified in terms of samples rather than milliseconds, so they will change duration if the sampling rate changes. Second, the <o>delay~</o> object can reliably delay a signal a number of samples that is less than a vector size. Finally, unlike <o>tapin~</o> and <o>tapout~</o>, you cannot feed the output of <o>delay~</o> back to its input. If you wish to use feedback with short delays, consider using the <o>comb~</o> object. Note: While the <o>delay~</o> object lets you specify time in any of Max's standard <link name="maxtime" module="core" type="vignette">time formats</link>, the <m>interval</m> attribute argument should be used when specifying time in any other time unit besides milliseconds or notevalues (e.g. <m>delay 22050 @interval 11025 samples</m>).
		<br />
		<br />
		If notevalue, ticks, or bars.beats.units are specified for the delay interval, the object will not operate unless the transport is running.
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				The output consists of the input delayed by the specified number of samples.
			</description>
		</entry>
	</misc>
</c74object>
