comparing values

alexandros's icon

Hi all,
Is there an object that can collect a number of values and then compare them in order to distinguish the highest one?
I want to record 2 seconds into a buffer with my guitar and then get the highest note that I played in those two seconds (I have a midi pickup on my guitar, just need the midi note number).

thanks in advance,
Alex

Amil Mille's icon

'zl group' object will make them into a list, and then use the 'maximum' object.

alexandros's icon

but I won't know the number of notes that will be played in advance (you see I will be improvising). 'zl group' needs to have the number of list items specified, so I'm not sure if it will really work...
thanks though.

Amil Mille's icon

i group things by making zl group really huge and then i send a bang when i collect all that i need. could trigger that bang with footpedalz or s'thing else.

mortimer59's icon

Maybe Lobjects from Peter Elsea like Lmax Lmin and L==

alexandros's icon

it kind of works, have to check it more thoroughly.
thanks

alexandros's icon

@ mortimer59, don't think so cause they compare and produce lists, while I want a single number.

alexandros's icon

@ Amil Mille, it does work, I just did a small mistake when I sent the previous answer. Thanks a lot.