<?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="quickthresh" module="max" category="Lists, Timing">
	<digest>
		Fast chord detection
	</digest>
	<description>
		Combines numbers when they are received close together. <o>quickthresh</o> is a faster, low-latency alternative to <o>thresh</o> that is optimized for chord detection.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Lists
		</metadata>
		<metadata name="tag">
			Timing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Numbers to be Gathered Into list
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				First Arrival Threshold (ms.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Fudge Factor Threshold (ms.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="3" type="INLET_TYPE">
			<digest>
				Threshold Extension (ms.)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				List of Gathered Values
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="threshold" optional="1" units="ms" type="number">
			<digest>
				Base threshold
			</digest>
			<description>
				The base threshold time in milliseconds; all notes received within this time period The default value for the base threshold is 40 ms.
			</description>
		</objarg>
		<objarg name="fudge" optional="1" units="ms" type="number">
			<digest>
				Fudge factor
			</digest>
			<description>
				The &quot;fudge&quot; time in milliseconds - if any notes are played within this amount of time at the end of the base thresh time, the threshold is extended. If not provided, the default value is 10 ms.
			</description>
		</objarg>
		<objarg name="extension" optional="1" units="ms" type="number">
			<digest>
				Threshold extension
			</digest>
			<description>
				The thresh extension time in milliseconds. This is an additional time frame added to the first argument, if necessary, in order to capture additional notes (due to sloppy playing) into the list. The default value is 20 ms.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Reset and cause output
			</digest>
			<description>
				<m>bang</m> will reset <o>quickthresh</o> and output the notes in its buffer.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Receive value and store
			</digest>
			<description>
				The incoming values which appear within a certain time threshold are stored and output as a list. See the argument descriptions to learn how the time thresholding works.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Receive value and store
			</digest>
			<description>
				In left inlet: The incoming values which appear within a certain time threshold are stored and output as a list. See the arguments' descriptions to learn how the time thresholding works.
			</description>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="threshold" optional="0" units="ms" type="float" />
			</arglist>
			<digest>
				Set the base threshold time
			</digest>
			<description>
				In second inlet: Sets the millisecond value for the base thresh time. All values received in the left inlet within this time period are collected into a list.
			</description>
		</method>
		<method name="ft2">
			<arglist>
				<arg name="fudge" optional="0" units="ms" type="float" />
			</arglist>
			<digest>
				Set the fudge factor
			</digest>
			<description>
				In third inlet: Sets the &quot;fudge&quot; time in milliseconds. If there are any incoming values within this amount of time at the end of the base thresh time, the threshold is extended to allow more values to be added to the list.
			</description>
		</method>
		<method name="ft3">
			<arglist>
				<arg name="extension" optional="0" units="ms" type="float" />
			</arglist>
			<digest>
				Set the threshold extension
			</digest>
			<description>
				In fourth inlet: Sets the threshold extension in milliseconds. This is an extension of the base thresh time, which is used if values arrive in the object's inlet in the &quot;fudge&quot; time zone.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="threshold" optional="0" units="ms" type="int" />
			</arglist>
			<digest>
				Set the base threshold time
			</digest>
			<description>
				Sets the millisecond value for the base thresh time. All values received in the left inlet within this time period are collected into a list.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="fudge" optional="0" units="ms" type="int" />
			</arglist>
			<digest>
				Set the fudge factor
			</digest>
			<description>
				Sets the &quot;fudge&quot; time in milliseconds. If there are any incoming values within this amount of time at the end of the base thresh time, the threshold is extended to allow more values to be added to the list.
			</description>
		</method>
		<method name="in3">
			<arglist>
				<arg name="extension" optional="0" units="ms" type="int" />
			</arglist>
			<digest>
				Set the threshold extension
			</digest>
			<description>
				In fourth inlet: Sets the threshold extension in milliseconds. This is an extension of the base thresh time, which is used if values arrive in the object's inlet in the &quot;fudge&quot; time zone.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="threshold" optional="0" units="ms" type="int" />
				<arg name="fudge" optional="0" units="ms" type="int" />
				<arg name="extension" optional="0" units="ms" type="int" />
			</arglist>
			<digest>
				Set all threshold values
			</digest>
			<description>
				The word <m>set</m>, followed by three millisecond values, can be used to set the three threshold parameter values (base thresh time, &quot;fudge&quot; time and thresh extension).
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="quickthresh.png" caption="A comparison of quickthresh and thresh shows that quickthresh detects chords with lower, more constant, latency" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bondo" />
		<seealso name="buddy" />
		<seealso name="iter" />
		<seealso name="join" />
		<seealso name="pack" />
		<seealso name="thresh" />
	</seealsolist>
	<misc name="Output">
		<entry name="float">
			<description>
				When <o>quickthresh</o> has used up its threshold time, any incoming values that were played within the time threshold are output as a list.
			</description>
		</entry>
	</misc>
</c74object>
