Forums

Pitch detection algorithm

Started by Erik July 2, 2005
Hello!

I'm trying to develop an application whose primary purpose is to detect 
which tone the user is singing (real time) using frequency analysis, and I 
wonder which algorithm to use. I analyze samples of approx 1/10 sec. I first 
tried using fourier transform, but since the frequencies are spread out 
evenly up to the Nyquist frequency, the resolution is way too bad (approx 3 
Hz). I need at least .1Hz, preferrably .01 Hz or better (.03 Hz is one cent 
in the vicinity of low A, 55Hz). I then tried the Chirp-Z transform in a 
2-pass process where the first pass finds the approximate peak and the 
second pass zooms in around that peak to find a more exact value, but it's 
considerably more expensive and references to it on the web are very rare, 
leading me to believe that its not commonly used. Also, the peak is quite 
wide, even for my tuning fork. I do apply a Hanning window before the 
analysis.

Can anyone point me in the right direction? 


Erik wrote:
> Hello! > > I'm trying to develop an application whose primary purpose is to detect > which tone the user is singing (real time) using frequency analysis, and I > wonder which algorithm to use. I analyze samples of approx 1/10 sec. I first > tried using fourier transform, but since the frequencies are spread out > evenly up to the Nyquist frequency, the resolution is way too bad (approx 3 > Hz). I need at least .1Hz, preferrably .01 Hz or better (.03 Hz is one cent > in the vicinity of low A, 55Hz). I then tried the Chirp-Z transform in a > 2-pass process where the first pass finds the approximate peak and the > second pass zooms in around that peak to find a more exact value, but it's > considerably more expensive and references to it on the web are very rare, > leading me to believe that its not commonly used. Also, the peak is quite > wide, even for my tuning fork. I do apply a Hanning window before the > analysis. > > Can anyone point me in the right direction?
It is a humorous truism among voice instructors that "vibrato should not exceed the minor third". Is there a singer anywhere who can hold a tone to within a third of a cent long enough for the actual frequency to be measured? Even a flautist? I suggest that you think about what you want to do as well as how to do it. See if http://www.numerix-dsp.com/zoomfft.html helps. The longer a signal is sampled, the finer the frequency resolution you get. the frequency resolution is approximately the reciprocal of the measurement interval. The signal's appearing to be substantially broader than that indicates that it has sidebands from amplitude or frequency variations. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Hi Erik,

"Erik" <no@spam.com> wrote in message 
news:Ootxe.28389$d5.181486@newsb.telia.net...
> I'm trying to develop an application whose primary purpose is to detect > which tone the user is singing (real time) using frequency analysis, and I > wonder which algorithm to use. [...]
Get "A high resolution fundamental frequency determination based on phase changes in the Fourier transform", which describes what I believe is the standard way to accomplish this. You can get it from Judith Brown's home page here: (there's also a link to the djvu plugin which you will have to install to see it). http://www.wellesley.edu/Physics/brown/jbrown.html -- Matt
Thanx!

If the algorithm is as good as it appears to be in that paper, it's just 
what I was looking for.

> Hi Erik, > > "Erik" <no@spam.com> wrote in message > news:Ootxe.28389$d5.181486@newsb.telia.net... >> I'm trying to develop an application whose primary purpose is to detect >> which tone the user is singing (real time) using frequency analysis, and >> I wonder which algorithm to use. [...] > > Get "A high resolution fundamental frequency determination based on phase > changes in the Fourier transform", which > describes what I believe is the standard way to accomplish this. > > You can get it from Judith Brown's home page here: (there's also a link > to > the djvu plugin which you will have to install to see it). > > http://www.wellesley.edu/Physics/brown/jbrown.html > > -- > Matt > >