<?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="qlim" module="max" category="Timing">
	<digest>
		Queue-based message limiter
	</digest>
	<description>
		Slows down throughput of messages. Limiting is based on a minimum amount of time between passed message.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Timing
		</metadata>
		<metadata name="tag">
			Timing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Incoming Continuous Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Sets Output Interval to Send Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Speed-limited Output of Incoming Values
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="minimum" optional="0" units="ms" type="int">
			<digest>
				Minimum pass time
			</digest>
			<description>
				The minimum amount of time between successive outputs. Time can be specified in any of the time formats used in Max. If there is no argument, the minimum time is 0 milliseconds.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Pass input if minimum time was met
			</digest>
			<description>
				Performs the same function as an <m>anything</m> message applied to the passing of <m>bang</m> messages.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="number" optional="0" type="int" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Equivalent to <m>anything</m>.				<br />
				In right inlet: The number is stored as the minimum amount of time, in milliseconds, between successive outputs.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="number" optional="0" type="float" />
			</arglist>
			<digest>
				Pass input if minimum time was met
			</digest>
			<description>
				In left inlet: Equivalent to <m>anything</m>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="list items" optional="0" type="list" />
			</arglist>
			<digest>
				Pass input if minimum time was met
			</digest>
			<description>
				In left inlet: Equivalent to <m>anything</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="anything" optional="0" type="list" />
			</arglist>
			<digest>
				Pass input if minimum time was met
			</digest>
			<description>
				In left inlet: Any number, bang, or message is passed out the outlet, provided that a certain minimum time has elapsed since the previous output. Otherwise, the message is held until that amount of time has passed (or until it is overwritten by another incoming message).
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="defer" get="1" set="1" type="float" size="1">
			<digest>
				Defer flag
			</digest>
			<description>
				Turn this on to send output in the low-priority queue.
			</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="Defer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
				<attribute name="timeobj" get="1" set="1" type="atom" size="1" value="threshold" />
			</attributelist>
		</attribute>
		<attribute name="quantize" get="1" set="1" type="atom" size="10">
			<digest>
				Quantization value
			</digest>
			<description>
				Send output only on the specified time-boundary if appropriate. This is achieved by making internal adjustments to the times used for sending output. The quantization can be specified in the following <link name="maxtime" module="core" type="vignette">time formats</link>: bars.beats.units, ticks or note values.
			</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="Quantization" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="time" />
				<attribute name="units" get="1" set="1" type="atom" size="3" value="ticks bars.beats.units notevalues" />
			</attributelist>
		</attribute>
		<attribute name="threshold" get="1" set="1" type="atom" size="10">
			<digest>
				Time Threshold
			</digest>
			<description>
				Sets the time threshold. The threshold can be specified in the following <link name="maxtime" module="core" type="vignette">time formats</link>: bars.beats.units, ticks or note values.
			</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="Time Threshold" />
				<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="qlim.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="speedlim" />
	</seealsolist>
	<discussion>
		The <o>qlim</o> object is similar to a combination of the <o>speedlim</o> and the Jitter <o>jit.qball</o> object. In Jitter, most execution take places in the low priority queue to prevent drawing to the screen at interrupt. The <o>speedlim</o> object unfortunately places messages back in the scheduler for execution, and thus may result in a crash when used to temporally downsample streams of Jitter matrices if Overdrive is turned on. The <o>qlim</o> object is an interrupt safe replacement for this and other tasks.
	</discussion>
</c74object>
