# How to find the local maximum of a list [duplicate]

I have imported a wav sound that a = Import["sound.wav"]

and we know that soundStrength = a[[1]][[1]] is a list of sound strength at each sample point.

Now I have a sound file of a metal ball keeping falling onto ground and jumping up, the wave is like this

It actually is a series of Damped sine wave with their maximum decreasing too.

Now I want to find every collision point, that is the index of each local maximum (absolute value) of the list soundStrength.

The collision in the end phase may be very dense like this

As suggested, here is the wav file: https://www.dropbox.com/s/iht8fzsf3yvzwv6/temp.wav.

EDIT: This problem is not to simply find all local maximum value, but to find a maximum in a range. And the range varies(more specifically, the range is narrowing).

After using MaxDetect, we can get something. This is a general look at the points(after using MaxDetectonce):

And this is a view of endmost part:

Now the difficulty here is to find the highest points which belongs to its own region. Or we can say how to find the points which can form an envelope line of the graphic.

• I recommend that you post a list of example data or a file that can be downloaded such that other users can play around with it and develop solutions. – g3kk0 Mar 29 '14 at 18:32
• @g3kk0 I have upload the file onto dropbox, thank you for your suggestion! – Nepls Mar 30 '14 at 4:54

I suggest using the function MaxDetect. From the documentation you can directly see how it works. Here is a slightly modified example.
data = Table[Sin[0.1 \[Pi] n + 1.] + Sin[0.5 \[Pi] n + 2.1] +

ListPlot[MaxDetect[p, 5]]