Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a long recording of a train (here is a small sample) there are a number of clicks as the wheels go over joins in the tracks. I would like to detect the location of these.

Looking at the waveform: enter image description here

There appear to be 8-10 clicks. Some are close together.

I can see that they appear as regions of sustained high amplitude. Is there a filter I could cross-correlate this with that would pick them out or is there another better method?

share|improve this question
It looks like your recording is clipped (exceeds maximum allowable amplitude during recording). It will be difficult to do anything useful with unless the "click" that you are looking for coincide with the clip pointes – Hilmar Feb 27 '13 at 17:21
Look at them with a spectral view and you should see bright vertical lines for each click – endolith Feb 27 '13 at 17:31
up vote 5 down vote accepted

Use an onset detector - a classic method is described in Duxbury's paper "A combined phase and amplitude based approach to onset detection for audio segmentation". If you want a ready to use solution, you can use Sonic Visualizer / Sonic annotator, which can export onset positions as a text file.

It works well for your example, with only one false positive - which could be easily discarded by adding an additional threshold on the onset detection detection function (second curve) value.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.