0
$\begingroup$

I have an audio clip which can be found here or here. If you hear the audio clip you will notice that there are six times a kind of hit sound in the clip.

My questions are:

  1. How can I count these hit sounds (I should get six in this clip)?

  2. What is the best tool/software/app for this problem?

  3. Where can I find a good source that explains the theory behind this?

$\endgroup$

1 Answer 1

2
$\begingroup$

How can I count these hit sounds ( I should get six in this clip).

In this case you can simply rectify the signal (i.e. run it through an absolute function, then through a simple running average low pass filter and at the output of this add a threshold. Essentially, when the power of the input signal exceeds the threshold you will be receiving a pulse whose width is approximately equal to the duration of the "hit". Alternatively, you can do away with rectification and filtering and simply pass the whole thing via a threshold operator. That is, when the power of the input signal exceeds the threshold, you get a "pulse". In either way, count the "pulses" and you can count the number of "hits" that you have in that wave file.

What is the best tool/software/app for this problem.

This is not an incredibly challenging Digital Signal Processing task, so you could simply write a Python script that does it in 3-5 lines of code (I am not implying that Python is not capable of serious processing here). Alternatively, you could install something like scilab and again do it in 3-5 lines of code, using one of its toolboxes (or, this one).

Where can I find a good source that explains the theory behind this.

This "rectify and threshold" technique is a sort of a "standard" in counting pulses, alternatively, you might want to have a look at the moving average filter as an example of a sliding window technique where you process a long signal in small "frames" of samples. Other than this, this website has an extensive list of book references if you search for "books".

Hope this helps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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