thresh~
Description
Use the thresh~ object to detect signals which exceed a specified level.
Examples

Discussion
thresh~ initially outputs a signal of 0. It outputs a signal of 1 when the input is equal or greater than a set "high" threshold, until it goes below the reset or "low" 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.
Arguments
low/reset-threshold [float]
The first argument specifies the reset or low threshold level. If no argument is present, the reset level is
If only one argument is present, it specifies the reset level, and the set level is .
high/set-threshold [float]
The second argument specifies the set or high threshold level. If no argument is present, the set level is
.Attributes
Common Box Attributes
Messages
float
Arguments
In right inlet: Sets the upper ("set") threshold level for the input signal. When the input is equal to or greater than this value, thresh~ sends out a signal of .
signal
Output
signal
When a sample in the input signal is greater than or equal to the upper threshold level, the output is
. The output continues to be 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 until a sample in the input signal is less than the reset level.See Also
Name | Description |
---|---|
>~ | |
change~ | |
edge~ |