Currently our software is detecting tones using FFT and checking if there is only a single peak in frequency spectrum. Our software needs to know what kind of input it is before taking action. So we differentiate the case when tone is fed as input or if the input is music.

However we are trying to reduce the MIPS and wondering if there is any other better ways to detect tones.

I found correlation with previous data can be used but again don't know the right method to do it. Is there any better method?

  • $\begingroup$ By MIPS, do you mean the computational complexity of your algorithm? $\endgroup$
    – MBaz
    Dec 4 '15 at 1:18
  • $\begingroup$ @MBaz: edited question. $\endgroup$ Dec 4 '15 at 1:19
  • $\begingroup$ If you will describe in more details the two types of signals you are trying to differentiate we might be able to help you. What you mean by single peak? Are two peaks regarded as the other case? What is the closest distance between the case of two peaks (or more than one peak?... What length of FFT you use? Do you really need this length? $\endgroup$
    – Moti
    Dec 4 '15 at 7:10
  • $\begingroup$ @Moti Currently we just detect sine or any tone by doing FFT. As FFT is nlogn complexity we just want to see if there is any other method we can possibly use to differentiate tone vs music. We just want to differentiate if the input is tone or music. $\endgroup$ Dec 4 '15 at 7:18
  • $\begingroup$ As an alternative to Olli's answer, take a look at: en.wikipedia.org/wiki/Goertzel_algorithm $\endgroup$
    – MBaz
    Dec 4 '15 at 18:18

Assuming that the tones are sufficiently sinusoidal, here's a possible scheme, with a bandpass filter being controlled by a frequency estimator:


If the tunable bandpass filter's output is at about the same power as the input signal, then the input consists mainly of a sinusoidal tone. It is perfectly fine if the frequency estimator is a simple one that only gives a meaningful output for the tone to be detected.

  • $\begingroup$ That looks like a perfectly good idea. No idea why it was down voted. $\endgroup$
    – Hilmar
    Dec 4 '15 at 10:27
  • $\begingroup$ It is far from perfect, because it is a general theoretical response and it might be even wrong. What is the block of "estimate frequency"? An FFT? This is not a response to the question. $\endgroup$
    – Moti
    Dec 4 '15 at 21:26
  • $\begingroup$ "estimate frequency" might be for example a zero crossing detector, returning the reciprocal of the interval between the same-way-going zero crossings $\endgroup$ Dec 4 '15 at 23:27

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.