buffer~ sample position of max value

Jeff Merkel's icon

Hey all. I think I'm missing something easy, but I'm trying to find the sample position of the largest peak value in a buffer~. Specifically, I'm looking for the sample position of an impulse. I'm doing some localization by using time delay between mics and am looking for time differences between impulses. It seems like this should be relatively easy, but I'm missing something. Anyone have any ideas? Thanks so much!

Jeff

Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

one way is to use peek~ and uzi:

Jeff Merkel's icon

Wow! Thanks Terry. Works like a charm! I've never really worked with peek~. Very cool and very clever. Thanks so much!

Jeff