dpwe's note:
At LabROSA, YIN is installed under ~drspeech. Use:
>> path(path,'/homes/drspeech/share/lib/matlab/local');
>> help yin
You can download YIN from the site of the author, Alain de Cheveigné,
by following the links in this message.
See README for copyright information.
YIN: fundamental frequency estimator
YIN estimates the fundamental frequency (F0) of an audio signal.
Features are:
- Reliability (based on tests, see reference below).
- Accuracy (subsample resolution).
- Wide search range (default is 30 Hz to sr/16, extensible up to sr/4, down to whatever).
- Good temporal resolution.
- Ease of use.
YIN operates on vectors or files.
If no output argment is specified, YIN
prints the F0 of the most cleanly periodic
part of the signal (in Hz and octaves/cents re 440 Hz), and
plots F0 as a function of time.
YIN outputs a vector of F0 estimates vs time, and a vector of estimates of the
aperiodic/total power ratio.
To work with files, YIN needs the 'sf' signal file handling utilities.
Run 'test' to check.
Type 'help yin' for a description of the parameters. Read the reference below and
the code to understand their meaning. In brief:
- To increase speed: increase 'hop', 'minf0' or 'dsratio'.
- To reduce memory needs: reduce 'bufsize', or increase 'hop', 'dsratio' or 'minf0'.
- To slightly increase reliability: reduce 'dsratio' or 'hop'.
- To slightly increase precision: reduce 'dsratio' or upsample.
- To improve temporal resolution: increase 'minf0', decrease 'hop'.
- To process lower F0s: reduce 'minf0'. Higher F0s: upsample and increase 'maxf0'.
- If YIN seems to fail: check that signal's F0 is between 'minf0' and 'maxf0'.
- To avoid subharmonic errors: increase 'thresh'. Harmonic/formant errors: reduce 'thresh'.
Parameter 'thresh' sets the proportion of aperiodic power that is
tolerated within a "periodic" signal. This may vary according to the application. For example
the response of a high-Q resonator excited by a pulse train may be seen either as a complex
tone with a strong formant and an F0 equal to that of the pulse train, or as an
amplitude modulated pure tone with an F0 equal to the resonant frequency.
Neither is more "correct" than the other. YIN needs to know what you want.
YIN is described in:
de Cheveigné, A., and Kawahara, H. (2002). "YIN, a fundamental frequency estimator
for speech and music," J. Acoust. Soc. Am., accepted for publication (pdf)
[Code is in this directory]
[Alain de Cheveigné]
[PCM]
[Ircam]
[CNRS]