Filter out repetitions of a number
Name | Type | Opt | Description |
---|---|---|---|
initial-comparison-value | int or float | opt | Initial value for comparison to incoming numbers. If there is no argument, the initial value is | .
mode | symbol | opt | A second argument may be change to behave as if it had received a or message. Subsequent messages can change this behavior. | or , causing
int | input [int] |
The number is sent out the outlet only if it is different from the currently stored value. Replaces the stored value. |
float | input [float] |
The number is sent out the outlet only if it is different from the currently stored value. Replaces the stored value. |
mode | behavioral-flag (+ or -) [symbol] |
The word change to send a out its left outlet if the received number is greater than the previously received number. In this mode, change does nothing with any other input. The word , followed by a , causes change to send out a if the received number is less than the previously received number. In this mode, change does nothing with any other input. The word by itself returns change to its default mode of sending out received values that differ from the previously received input. | , followed by a , causes
set | comparison-number [list] |
The word | , followed by a number, replaces the stored value without triggering output.
Name | Description |
---|---|
peak | If a number is greater than previous numbers, output it |
togedge | Report zero/non-zero transitions |
trough | If a number is less than previous numbers, output it |
Max Basic Tutorial 15: Abstractions | Max Basic Tutorial 15: Abstractions |