edge~

Detect logical signal transitions

Description

edge~ detects zero to non-zero (and vice versa) signal transitions and reports a bang out of one of its two outlets according to which direction the transition has occurred.

Arguments

None.

Messages

signal A signal that will change between zero and non-zero values, such as the output of a signal comparison operator.

Information for box attributes common to all objects

Output

bang: Out left outlet: Sent when the input signal changes from zero to non-zero. The minimum time between bang messages will not be shorter than the minimum scheduler interval, which is generally equal to the signal vector size, but may be larger if Scheduler in Audio Interrupt mode is not enabled.

Out right outlet: Sent when the input signal changes from non-zero to zero. The output will not happen more often than the time represented by the number of samples in the current input/output vector size.

Examples

Send a triggering Max message when a significant moment occurs in a signal

See Also

Name Description
change~ Report signal direction
thresh~ Detect signal above a set level
zerox~ Detect zero crossings