Dawn@4: Dawn@4: Dawn@4: YIN Dawn@4: Dawn@4: Dawn@4: Dawn@4: Dawn@4: See README for copyright information. Dawn@4: Dawn@4:
Dawn@4:

YIN: fundamental frequency estimator

Dawn@4:
Dawn@4: Dawn@4: YIN estimates the fundamental frequency (F0) of an audio signal. Dawn@4: Features are: Dawn@4: Dawn@4: Dawn@4: YIN operates on vectors or files. YIN outputs a structure containing a set Dawn@4: of four vectors: F0 vs time, two estimates of aperiodic/total power Dawn@4: (one gross estimate, one fine estimate), and a period-smoothed estimate Dawn@4: of instantaneous power. Dawn@4:

Dawn@4: If no output argment is specified, YIN Dawn@4: plots F0 as a function of time (in octaves re: 440 Hz), aperiodicity, and power. Dawn@4:

Dawn@4: In the F0 plot, samples in blue are reckoned reliable (aperiodicity2*threshold). Dawn@4: Dawn@4:

Dawn@4: Type 'help yin' for a description of the parameters. Read the reference below and Dawn@4: the code to understand their meaning. In brief: Dawn@4:

Dawn@4: Parameter 'thresh' sets the proportion of aperiodic power that is Dawn@4: tolerated within a "periodic" signal. This may vary according to the application. Dawn@4:

Dawn@4: For speech or musical instruments a value of 0.1 is usually adequate. Singing voice Dawn@4: may require a smaller value (as low as 0.001) if a harmonic is reinforced by a Dawn@4: sharp formant. Dawn@4:

Dawn@4: Some signals are inherently ambiguous. For example Dawn@4: the response of a high-Q resonator excited by a pulse train may be seen either as a complex Dawn@4: tone with an F0 equal to that of the pulse train, or as an Dawn@4: amplitude modulated pure tone with an F0 equal to the resonant frequency. Dawn@4: Neither is more "correct" than the other. To obtain the result Dawn@4: that you expect, you must set the threshold to an appropriate value: small for the Dawn@4: fundamental periodicity, large for the resonance periodicity. Dawn@4: Dawn@4:

Dawn@4: YIN is described in: Dawn@4:
Dawn@4: de Cheveigné, A., and Kawahara, H. (2002). "YIN, a fundamental frequency estimator Dawn@4: for speech and music," J. Acoust. Soc. Am., 111, 1917-1930. (pdf) Dawn@4: Dawn@4: Dawn@4:


Dawn@4: [Code is here] Dawn@4: [Alain de Cheveigné] Dawn@4: Dawn@4: Dawn@4: Dawn@4: Dawn@4: Dawn@4: Dawn@4: Dawn@4: Dawn@4: