<?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="mc.what~" module="" category="Multichannel">
	<digest>
		Generate Impulses for a List of Audio Values (multichannel)
	</digest>
	<description>
		The <o>what~</o> object generates an impulse -- a signal value of 1 for one sample -- when its input signal crosses a value threshold. The object accepts a list of threshold values and will generate impulses for all of them. Connect a <o>phasor~</o> to <o>what~</o> to create a repeating rhythm. For example, when sending in a list of <m>0 0.25 0.5 and 0.75</m>, <o>what~</o> will output an impulse four times for each <o>phasor~</o> ramp.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				Input
			</digest>
			<description>
				A signal containing or ramping through values you want to detect
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Impulse if Values Detect, 0 Otherwise
			</digest>
			<description>
				<o>what</o> outputs 0 until it detects a matching value in its input, then it outputs 1 for one sample.
			</description>
		</outlet>
		<outlet id="1" type="int">
			<digest>
				Index of Matched Item
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="values" type="list" optional="1">
			<digest>
				One or more values to detect
			</digest>
			<description>
				If one or more values are arguments to <o>what~</o> they define the initial list of values.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				Define a single value
			</digest>
			<description>
				An <m>int</m> sets a single value to detect, replacing any existing values.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="ARG_NAME_0" type="float" optional="0" />
			</arglist>
			<digest>
				Define a single value
			</digest>
			<description>
				An <m>float</m> sets a single value to detect, replacing any existing values.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Define values to detect
			</digest>
			<description>
				<m>list</m> sets the new values to detect, replacing any existing values. A list message is alternative to setting the <at>matches</at> attribute. If <at>syncupdate</at> is enabled, the new values are not used until the input phasor resets.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Clear list of values
			</digest>
			<description>
				The <m>clear</m> message removes all values that have been added to the what~ object. If <at>syncupdate</at> is enabled, the values are not cleared until the input phasor resets.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Input Signal
			</digest>
			<description>
				The input signal used for theshold analysis, usually a <o>phasor</o>, though any signal can be used.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="matches" get="1" set="1" type="atom" size="1">
			<digest>
				List of Values to Detect
			</digest>
			<description>
				Sets the values to detect
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="List of Values to Detect" />
			</attributelist>
		</attribute>
		<attribute name="syncupdate" get="1" set="1" type="int" size="1">
			<digest>
				Sync Value Changes
			</digest>
			<description>
				When <at>syncupdate</at> is enabled, messages to change the values to detect do not take effect until the input phasor resets. A <i>reset</i> is defined as a direction reversal in the signal.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Sync Value Changes" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="triggermode" get="1" set="1" type="int" size="1">
			<digest>
				Trigger Mode
			</digest>
			<description>
				Determines how <o>what~</o> matches values in the signal input.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="2" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="4">
					<enumlist>
						<enum name="Ascending">
							<digest>
								Detect value in an ascending ramp
							</digest>
							<description>
								The previous sample must be less than or equal to the target and the current sample must be greater than the target.
							</description>
						</enum>
						<enum name="Descending">
							<digest>
								Detect value in an descending ramp
							</digest>
							<description>
								The previous sample must be greater than or equal to the target and the current sample must be less than the target.
							</description>
						</enum>
						<enum name="Ascending or Descending">
							<digest>
								Detect value in an asecending or descending ramp
							</digest>
							<description>
								The value is detected if either the ascending or descending condition is true. This mode is useful for detecting ramps in phasors with either positive and negative frequencies.
							</description>
						</enum>
						<enum name="Equals">
							<digest>
								Detect exact value
							</digest>
							<description>
								The value is detected if it is exactly equal to the current sample. This mode is not recommend for phasor ramps since it is unlikely the ramp will output a sample exactly equal to any particular value.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Trigger Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="click~" />
		<seealso name="edge~" />
		<seealso name="delta~" />
		<seealso name="phasor~" />
		<seealso name="sah~" />
		<seealso name="stash~" />
		<seealso name="where~" />
	</seealsolist>
	<discussion>
		The <o>what~</o> object is sample-accurate when Scheduler in Audio Interrupt is enabled. More details <link module="core" name="audio_sampleaccurate" type="vignette">here</link>.
	</discussion>
	<mcwrapper>
		<mcwrappermethod name="applymessages" />
		<mcwrappermethod name="applynvalues" />
		<mcwrappermethod name="applyvalues" />
		<mcwrappermethod name="decide" />
		<mcwrappermethod name="deviate" />
		<mcwrappermethod name="ease.in_back" />
		<mcwrappermethod name="ease.in_bounce" />
		<mcwrappermethod name="ease.in_circular" />
		<mcwrappermethod name="ease.in_cubic" />
		<mcwrappermethod name="ease.in_elastic" />
		<mcwrappermethod name="ease.in_exponential" />
		<mcwrappermethod name="ease.in_out_back" />
		<mcwrappermethod name="ease.in_out_bounce" />
		<mcwrappermethod name="ease.in_out_circular" />
		<mcwrappermethod name="ease.in_out_cubic" />
		<mcwrappermethod name="ease.in_out_elastic" />
		<mcwrappermethod name="ease.in_out_exponential" />
		<mcwrappermethod name="ease.in_out_quadratic" />
		<mcwrappermethod name="ease.in_out_quartic" />
		<mcwrappermethod name="ease.in_out_quintic" />
		<mcwrappermethod name="ease.in_out_sine" />
		<mcwrappermethod name="ease.in_quadratic" />
		<mcwrappermethod name="ease.in_quartic" />
		<mcwrappermethod name="ease.in_quintic" />
		<mcwrappermethod name="ease.in_sine" />
		<mcwrappermethod name="ease.linear" />
		<mcwrappermethod name="ease.out_back" />
		<mcwrappermethod name="ease.out_bounce" />
		<mcwrappermethod name="ease.out_circular" />
		<mcwrappermethod name="ease.out_cubic" />
		<mcwrappermethod name="ease.out_elastic" />
		<mcwrappermethod name="ease.out_quadratic" />
		<mcwrappermethod name="ease.out_quartic" />
		<mcwrappermethod name="ease.out_quintic" />
		<mcwrappermethod name="ease.out_sine" />
		<mcwrappermethod name="exponential" />
		<mcwrappermethod name="generate" />
		<mcwrappermethod name="harmonic" />
		<mcwrappermethod name="increment" />
		<mcwrappermethod name="randomrange" />
		<mcwrappermethod name="replicatenvalues" />
		<mcwrappermethod name="replicatevalues" />
		<mcwrappermethod name="scaledexponential" />
		<mcwrappermethod name="setvalue" />
		<mcwrappermethod name="setvaluerange" />
		<mcwrappermethod name="smoothstep" />
		<mcwrappermethod name="spread" />
		<mcwrappermethod name="spreadexclusive" />
		<mcwrappermethod name="spreadincludefirst" />
		<mcwrappermethod name="spreadincludesecond" />
		<mcwrappermethod name="spreadinclusive" />
		<mcwrappermethod name="subharmonic" />
		<mcwrapperattr name="busymapname" />
		<mcwrapperattr name="bz" />
		<mcwrapperattr name="bzname" />
		<mcwrapperattr name="chans" />
		<mcwrapperattr name="fun" />
		<mcwrapperattr name="initialvalues" />
		<mcwrapperattr name="op" />
		<mcwrapperattr name="target" />
		<mcwrapperattr name="usebusymap" />
		<mcwrapperattr name="values" />
		<mcwrapperattr name="voiceprob" />
		<mcwrapperattr name="zero" />
	</mcwrapper>
</c74object>
