Dawn@4
|
1 <html>
|
Dawn@4
|
2 <head>
|
Dawn@4
|
3 <title> YIN </title>
|
Dawn@4
|
4 </head>
|
Dawn@4
|
5
|
Dawn@4
|
6 <body>
|
Dawn@4
|
7
|
Dawn@4
|
8 See README for copyright information.
|
Dawn@4
|
9
|
Dawn@4
|
10 <hr>
|
Dawn@4
|
11 <h2> YIN: fundamental frequency estimator </h2>
|
Dawn@4
|
12 <hr>
|
Dawn@4
|
13
|
Dawn@4
|
14 YIN estimates the fundamental frequency (F0) of an audio signal.
|
Dawn@4
|
15 Features are:
|
Dawn@4
|
16 <ul>
|
Dawn@4
|
17 <li> Reliability (based on tests, see reference below).
|
Dawn@4
|
18 <li> Accuracy (subsample resolution).
|
Dawn@4
|
19 <li> Wide search range (default is 30 Hz - sr/4).
|
Dawn@4
|
20 <li> Good temporal resolution.
|
Dawn@4
|
21 <li> Ease of use.
|
Dawn@4
|
22 </ul>
|
Dawn@4
|
23
|
Dawn@4
|
24 YIN operates on vectors or files. YIN outputs a structure containing a set
|
Dawn@4
|
25 of four vectors: F0 vs time, two estimates of aperiodic/total power
|
Dawn@4
|
26 (one gross estimate, one fine estimate), and a period-smoothed estimate
|
Dawn@4
|
27 of instantaneous power.
|
Dawn@4
|
28 <p>
|
Dawn@4
|
29 If no output argment is specified, YIN
|
Dawn@4
|
30 plots F0 as a function of time (in octaves re: 440 Hz), aperiodicity, and power.
|
Dawn@4
|
31 <p>
|
Dawn@4
|
32 In the F0 plot, samples in blue are reckoned reliable (aperiodicity<threshold),
|
Dawn@4
|
33 green are intermediate (aperiodicity<2*threshold), and
|
Dawn@4
|
34 yellow unreliable (aperiodicity>2*threshold).
|
Dawn@4
|
35
|
Dawn@4
|
36 <p>
|
Dawn@4
|
37 Type 'help yin' for a description of the parameters. Read the reference below and
|
Dawn@4
|
38 the code to understand their meaning. In brief:
|
Dawn@4
|
39 <ul>
|
Dawn@4
|
40 <li> To increase speed: increase 'hop' or 'minf0'.
|
Dawn@4
|
41 <li> To reduce memory needs: reduce 'bufsize', or increase 'hop' or 'minf0'.
|
Dawn@4
|
42 <li> To slightly increase reliability: reduce 'hop'.
|
Dawn@4
|
43 <li> To slightly increase precision: upsample before processing.
|
Dawn@4
|
44 <li> To improve temporal resolution: increase 'minf0', decrease 'hop'.
|
Dawn@4
|
45 <li> To process lower F0s: reduce 'minf0'. Higher F0s: upsample and increase 'maxf0'.
|
Dawn@4
|
46 <li> To avoid subharmonic errors: increase 'thresh'.
|
Dawn@4
|
47 <li> To avoid harmonic/formant errors: reduce 'thresh'.
|
Dawn@4
|
48 <li> Make sure that the range [minf0 maxf0] includes the expected f0.
|
Dawn@4
|
49 </ul>
|
Dawn@4
|
50 Parameter 'thresh' sets the proportion of aperiodic power that is
|
Dawn@4
|
51 tolerated within a "periodic" signal. This may vary according to the application.
|
Dawn@4
|
52 <p>
|
Dawn@4
|
53 For speech or musical instruments a value of 0.1 is usually adequate. Singing voice
|
Dawn@4
|
54 may require a smaller value (as low as 0.001) if a harmonic is reinforced by a
|
Dawn@4
|
55 sharp formant.
|
Dawn@4
|
56 <p>
|
Dawn@4
|
57 Some signals are inherently ambiguous. For example
|
Dawn@4
|
58 the response of a high-Q resonator excited by a pulse train may be seen either as a complex
|
Dawn@4
|
59 tone with an F0 equal to that of the pulse train, or as an
|
Dawn@4
|
60 amplitude modulated pure tone with an F0 equal to the resonant frequency.
|
Dawn@4
|
61 Neither is more "correct" than the other. To obtain the result
|
Dawn@4
|
62 that you expect, you must set the threshold to an appropriate value: small for the
|
Dawn@4
|
63 fundamental periodicity, large for the resonance periodicity.
|
Dawn@4
|
64
|
Dawn@4
|
65 <p>
|
Dawn@4
|
66 YIN is described in:
|
Dawn@4
|
67 <br></tt>
|
Dawn@4
|
68 de Cheveigné, A., and Kawahara, H. (2002). "YIN, a fundamental frequency estimator
|
Dawn@4
|
69 for speech and music," J. Acoust. Soc. Am., 111, 1917-1930. (<a href=
|
Dawn@4
|
70 "http://www.ircam.fr/pcm/cheveign/ps/yin.pdf">pdf</a>)
|
Dawn@4
|
71 </tt>
|
Dawn@4
|
72
|
Dawn@4
|
73 <hr>
|
Dawn@4
|
74 [Code is <a href="http://www.ircam.fr/pcm/cheveign/sw/yin.zip">here</a>]
|
Dawn@4
|
75 [<a href="http://www.ircam.fr/pcm/cheveign">Alain de Cheveigné</a>]
|
Dawn@4
|
76
|
Dawn@4
|
77
|
Dawn@4
|
78
|
Dawn@4
|
79
|
Dawn@4
|
80
|
Dawn@4
|
81 </body>
|
Dawn@4
|
82 </html>
|
Dawn@4
|
83
|
Dawn@4
|
84
|