compare 4 numbers output bang for highest

F_Dos's icon

How can I compare 4 income numbers that constantly changing and output a bang if 1 of the 4 numbers had the highest value for more then 2 seconds?
so if input number 2 is the highest number for 2 seconds then output a bang to outlet 2

how can I do so?

Pedro Santos's icon

I think using lists instead of comparing individual numbers with each other is the way to go. The code is also much more scalable, if we need to compare dozens or hundreds of them.

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