Fast peak detect in file
Dear Max community !
It is possible to scan throw .wav file and get coordinates of maximum RMS power in it (peak?) ?
I've some skills in patching back in the days, and seems now Max can help again.
I'm cut lathe records by hands, so it will be useful to check file without hearing and reading RMS voltmeter data with such a big time loss...
Thanks for any tip !
Sergey
You can read a .wav file into a buffer~ and speed through a groove~ object at higher playback rate than standard 1.0. A waveform~ object can be a view to this buffer, so you can even position a selection just before and after the highest point to review the audio. The highest point being the max value read from a number~ object. I do hesitate to say this will be very precise. You could try it. In C++ such a thing would be quite trivial. In fact, I built a tool for work to check for the peaks and RMS values in files.
Good luck!
mxj buf.Op doesn't calculate the RMS but the maximum. You can edit the source as well so it might be a good starting point.
Come to think of it.... jit.buffer~ might also work.