<?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="thresh~" module="msp" category="MSP Analysis">
	<digest>
		Detect signal above a set level
	</digest>
	<description>
		Use the <o>thresh~</o> object to detect signals which exceed a specified level.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Analysis
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				(signal) Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal/float">
			<digest>
				(signal/float) Low Threshold
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="signal/float">
			<digest>
				(signal/float) High Threshold
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="low/reset-threshold" optional="0" type="float">
			<digest>
				Set the reset or low threshold level
			</digest>
			<description>
				The first argument specifies the reset or low threshold level. If no argument is present, the reset level is <m>0</m>.				<br />
				<br />
				If only one argument is present, it specifies the reset level, and the set level is <m>0</m>.
			</description>
		</objarg>
		<objarg name="high/set-threshold" optional="0" type="float">
			<digest>
				Set the set or high threshold level
			</digest>
			<description>
				The second argument specifies the set or high threshold level. If no argument is present, the set level is <m>0</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="float">
			<arglist>
				<arg name="reset/set-threshold" optional="0" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In middle inlet: Sets the lower (&quot;reset&quot;) threshold level for the input signal. When a sample in the input signal is greater than or equal to the upper (&quot;set&quot;) level, <o>thresh~</o> sends out a signal of <m>1</m> until a sample in the input signal is less than or equal to this reset level.
				<br />
				<br />
				In right inlet: Sets the upper (&quot;set&quot;) threshold level for the input signal. When the input is equal to or greater than this value, <o>thresh~</o> sends out a signal of <m>1</m>.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Signal for level detection
			</digest>
			<description>
				In left inlet: A signal whose level you want to detect.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="thresh~.png" caption="Detect when signal exceeds a certain level" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="&gt;~" />
		<seealso name="change~" />
		<seealso name="edge~" />
	</seealsolist>
	<discussion>
		<o>thresh~</o> initially outputs a signal of 0. It outputs a signal of 1 when the input is equal or greater than a set &quot;high&quot; threshold, until it goes below the reset or &quot;low&quot; threshold, at which point the 0 signal is output again. If the low and high thresholds are the same, a reset occurs when the signal is less than the threshold value. Otherwise, a reset occurs when the signal is less than or equal to the low threshold. The low and high thresholds can be specified as arguments, via floats in the middle and right inlets, or as signals in the middle and right inlets.
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				When a sample in the input signal is greater than or equal to the upper threshold level, the output is <m>1</m>. The output continues to be <m>1</m> until a sample in the input signal is equal to or less than the reset level. If the set level and the reset level are the same, the output is <m>1</m> until a sample in the input signal is less than the reset level.
			</description>
		</entry>
	</misc>
</c74object>
