A newer version of Max is available. Click here to access the latest version of this document.

zerox~

Detect zero crossings

Description

zerox~ functions as a zero-crossing counter or transient detector.

Arguments

Name Type Opt Description
output-volume (0.0 through 1.0) float opt Sets the output volume for the click sent out the right outlet. Volume values are in the range 0.0-1.0. The default value is 1.0.

Messages

set output-volume (0.0 through 1.0) [float]
In left inlet: The word set, followed by a floating-point number in the range 0.0-1.0, sets the volume of the click (impulse) sent out the right outlet. The default value is 1.0.
signal In left inlet: A signal to be analyzed.

Information for box attributes common to all objects

Output

signal: Out left outlet: A signal whose value corresponds to the number of zero-crossings per signal vector which were detected during the period of the last signal vector.

Out right outlet: A click (impulse) whose volume is set by argument or by the set message is sent out the right outlet whenever a zero-crossing is detected.

Examples

Use zerox~ to count zero-crossings on an input signal

See Also

Name Description
change~ Report signal direction
edge~ Detect logical signal transitions
spike~ Report intervals of zero to non-zero transitions