thresh Reference

Detect input above a certain level

thresh

Examples

Arguments

lowThresh [number]

Optional

The threshold below which the object will reset and output a value of 0.

highThresh [number]

Optional

The threshold above which the object will output a value of 1.

Inlets

x [number]

The input float used for threshold comparisons.

lowThresh [number]

The threshold below which the object will reset and output a value of 0.

highThresh [number]

The threshold above which the object will output a value of 1.

Outlets

out1 [number]

Outputs a 0 until the high threshold has been met and a 1 whenever the high threshold has been exceeded and not yet reset (meaning the incoming value has not yet dipped below the low threshold).

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

hot [bool] (default: false)

Trigger computation on all inlets.

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

highThresh [number]

The threshold above which the object will output a value of 1.

lowThresh [number]

The threshold below which the object will reset and output a value of 0.

reset [bang] (default: 0)

Banging this attribute will reset the object to its default state.

x [number]

The input float used for threshold comparisons.

See Also

Name Description
thresh~ Detect signal above a set level
thresh~ Detect input above a certain level
adsr~ Attack-Decay-Sustain-Release envelope generator
change Filter out repetitions
edge~ detect logical signal transitions
silencedetector~ Outputs a bang if a signal buffer of silence is detected after a note off