Send Bang when when maximum value is reached.

A Stepper-Motor controller sends out the position eg. 856. If the motor stops and turns around in the other direction it goes 855,854 and so on..
I want MAX to BANG if the maximum is reached (here: 856).

If you know the peak value you’re looking for, you can use sel or >= or peak or past. If you’re just looking at a stream of data coming in in real time and you don’t know what value you’re looking for, then you can only report that a peak has occurred after the peak has been reached, once the input value has started to decrease. This abstraction does that.

<code>

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.