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

spike~

Report intervals of zero to non-zero transitions

Description

spike~ reports intervals of zero to non-zero transitions.

Arguments

Name Type Opt Description
refractory-period (milliseconds) int or float opt Sets the refractory period.

Messages

bang A bang will cause the object to restart the countdown of the refractory period from the time at which the bang was received.
signal In left inlet: A signal to be analyzed. The spike~ object analyzes an incoming signal and reports the interval, in milliseconds, between transitions between zero and non-zero signal values. You can specify a refractory period, which defines how soon after detecting a transition the spike~ object will report the next instance.

Information for box attributes common to all objects

Output

float: The interval, in milliseconds, since the last zero to non-zero signal transition has occurred (which includes the refractory period, if one is set).

Examples

spike~ reports how often a zero to non-zero transition occurs in its input signal

See Also

Name Description
change~ Report signal direction
edge~ Detect logical signal transitions
zerox~ Detect zero crossings