Nth had maximum value?

iratinhk's icon

Dear Maxers,

I'm trying to map some fft data to MIDI and need two values from a list; the
maximum value in that list (easy enough with [maximum]) AND the position in
the list that had that value (should be easy enough but I'm not getting it).
Any ideas on how to do this?

Many thanks,

Christopher

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


volker böhm's icon

hi christopher,
[Ltop] from peter elsea's Lobjects does exactly that.
one possible "native" max solution is below.
hth,
volker.

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

iratinhk's icon

hi volker,

many thanks for this and the [Ltop]!

christopher