Measuring the average frequency of signals I have many signals/audio data of a hammer banging on a nail. As the nail gets deeper it seems obvious to me (just by hearing) that the pitch is higher at the end than at the beginning. I assume that the pitch gets higher with every bang. I want to be able to measure this.

So my question is how to I compute the frequency or average frequency of each bang, to be able to see this increase in pitch?

What I thought about doing was take the fourier transform of each bang and then take a weighted average. Like: (sum over (fourier coefficient index * amplitude of that coefficient)) / number of fourier coefficients.

But I am not seeing a clear rise in this value. Perhaps what I should care about just the fourier coefficeint with the largest amplitude?

What methods (if mine is not correct) to get the average frequency?
The weighted average "(sum over (fourier coefficient index * amplitude of that coefficient)) / number of fourier coefficients" does not seem very good as it will always give more weightage to the higher frequencies( because fourier coefficient index for higher frequencies will be higher) and the frequencies which you are looking for might be having low index. 

Better method could be to see which fourier coefficients have maximum values for each bang of hammer and corresponding to that you can find the major frequencies(band of frequency) for each bang. 

hope this helps.