The change object will watch an incoming signal and report a value of 1. when its value increases, a value of -1. when the signal decreases, or a value of 0. when there is no change.
Arguments
None.
Messages
float
input [float]
You can set the value stored with a float.
signal
Any signal to be watched for changed and unchanged values.
signal:
When the current sample is greater in value than the previous sample, change~ outputs a sample of 1. When the current sample is the same as the previous sample, change~ outputs a sample of 0. When the current sample is less than the previous sample, change~ outputs a sample of -1.
Examples
Detect whether a signal is increasing decreasing or remaining constant