I am trying to understand how the Goertzel algorithm can be useful. I know it provides efficient evaluation of individual terms of a DFT, and I read that it can be used for pitch detection by evaluating the DFT terms in individual bins. However, the absolute value of a certain frequency bin doesn't tell us much about the dominant pitch: We may be dealing with a weak signal at the right pitch, or a strong signal with interferences occupying that pitch frequency. So I think we also need to calculate the total signal power and then compare it with the power in particular bins for this algorithm to be any useful. So what is the best way of identifying whether or not a signal has a dominant pitch at a certain frequency?
-
$\begingroup$ well, if you need the information that Goertzel dedicatedly does not compute, then Goertzel is not the right tool – for your application. For other things than the very niceh application of "pitch detection", Goertzel is plenty useful! $\endgroup$– Marcus MüllerDec 23, 2022 at 17:51
1 Answer
The Goertzel algorithm is useful when simply determining if a specific frequency is present or not, or rather, what is the amplitude of that specific frequency.
To detect multiple frequencies, multiple instances of the Goertzel algorithm is needed, one detector per frequency you are interested in.
Typical example of using the Goertzel algorithm is DTMF tone detection. As the 8 frequencies are known, running 8 Goertzel detectors is much less demanding than running, say DFT or FFT.
For your question hoe to determine dominant frequency of a certain instrument playing arbitrary notes, Goertzel is not a good solution for it. Other than just taking a DFT or FFT, I don't know what to suggest.