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

spike~ Reference

Report intervals of zero to non-zero transitions

spike~

Description

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

Examples

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

Arguments

refractory-period [int or float]

Optional
Unitsms

Sets the refractory period.

Attributes

Common Box Attributes

Messages

bang

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.

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

See Also

Name Description
change~
edge~
zerox~