2
$\begingroup$

I am playing around with FFT and cant seem to get the expected results. I have a sound clip that i recorded from a mic placed on an analogue clock. So it has a sound every second.

[wave,fs]=wavread('clock.wav');
t=0:1/fs:(length(wave)-1)/fs;
plot(t,wave);
n=length(wave)-1;                                             
f=0:fs/n:fs;
wavefft=abs(fft(wave));
plot(f,wavefft);

This is the code that i am using. And here are the results.

I should be seeing a huge spike at 1hz but i am not.

The FFT followed by the sound wave.

This is the FFT

And this is the sound wave

$\endgroup$
  • $\begingroup$ have you shifted it by using fftshift? $\endgroup$ – Rizias Feb 6 '14 at 11:56
2
$\begingroup$

The energy in the ticks is distributed to higher frequencies, too. The base frequency probably is not very strong. You might be looking for broadband signals. I would try to take a time difference of amplitudes. Ticks will have steep temporal edges.

$\endgroup$
2
$\begingroup$

Since you are looking for a low frequency periodicity in the amplitude envelope of your sound clip, and not the tone waveform or pitch, you might try squaring or taking the absolute value of your signal before applying the fft, and then ignoring higher frequency bins in the result (similar to a cheap AM demodulator).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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