Detecting peaks in a list of numbers

Omer Haber's icon

Hello,

  • I have a dynamic list (made from a calculation that outputs integers constantly)

  • From this list I'd like to detect whenever there is a sharp increase or decrease in the integers coming through over a certain period of time.

  • So something like running an average of the integers over a certain period of time, all along when recieving these integers, as long as they are kept within a normalised average then track&hold (gate) is open, and whenever the integers exceed this average, or exceed a range of integers, gate is closed.

I'd appreciate any help

Thanks!

double_UG's icon

zl.stream zl.median mean

Max Patch
Copy patch and select New From Clipboard in Max.