Codebox Operators thresh

thresh

Detect input above a certain level

new thresh()

Methods

next(x, lowThresh, highThresh): out1

Arguments

NameTypeDefaultDescription
xnumber
lowThreshnumber
highThreshnumber1

Returns

NameTypeDescription
out1number

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).

reset(): void