I've refined procedures in pitch tracker [snac~] (based on Philip McLeod's Specially Normalized Autocorrelation function (SNAC)), and renamed the object in the honour of the great 19th century explorer in the world of sound and frequencies, Hermann Helmholtz. The guy who listened through resonators to isolate frequencies in a sound.
[helmholtz~] is by default deaf for noise, but hears periodic sound no matter how faint. As a result, analysis frames containing transients, note jumps, or other signal segments with low autocorrelation are ignored. It's better to have no pitch report than an erroneous pitch report. Pitch estimation is precise up to +/- 0.1 Hz.
While regular methods need at least two periods in the analysis frame for detection, [helmholtz~] can do with a minimum of 1.2 periods. As a result, a female voice can be pitch-tracked with a frame of 512 samples at SR 44100, that is ~11 milliseconds. For a male voice and most instruments, 1024 samples are sufficient, that is ~23 milliseconds.
Remember that a time domain method can not distinguish multiple pitches in a stream, so [helmholtz~] must be used with monophonic channels only.
The object uses 0.6% CPU time per instance on my 2GHz CPU, with default settings, no analysis overlap. Since it only needs fundamental frequencies, it can be used in downsampled time as well, for example with resampling factor 0.25. Then you can do four overlapping analyses for the price of one, making things smoother as you get analysis results at a faster rate. Don't forget to resize the analysis framesize accordingly, otherwise you get long latency times.
I've extensively tested [helmholtz~] with my voice and all sorts of sweeping and jumping test tones. It does not seem to make mistakes with these sources. That may be different for other instruments, I'm eager to hear comments.
Attached file helmholtz~.zip contains source code, makefile, 32 bit binaries for OSX, Windows and Linux, help file and test patches.
Thanks to elden, who posted so many useful links on pitch shifting and tracking on this forum. [helmholtz~] would not have existed without all the info's. Find Philip McLeod's thesis introducing the SNAC function here:
http://miracle.otago.ac.nz/postgrads/tartini/papers/Philip_McLeod_PhD.pdf
Katja
P.s. [snac~], the experimental predecessor of [helmholtz~], is now discontinued.
Edit: find the latest [helmholtz~] now on: