Debian Codegraph @

docs/manual/LPC__To_Spectrum__slice____.html

raw
1 <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2 <title>LPC: To Spectrum (slice)...</title>
3 <style>
4 td { padding-left: 5pt; padding-right: 5pt; }
5 th { padding-left: 5pt; padding-right: 5pt; }
6 code { white-space: pre-wrap; }
7 dd { white-space: pre-wrap; }
8 </style>
9 </head><body bgcolor="#FFFFFF">
10
11 <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
12 LPC: To Spectrum (slice)...
13 </b></font></table></table>
14 <p>You can choose this command after selecting 1 or more <a href="LPC.html">LPC</a> objects.</p>
15 <h2>Settings</h2>
16 <dl>
17 <dt><b>Time (s)</b>
18 <dd>the time at which the Spectrum should be calculated.</dd>
19 <dt><b>Minimum frequency resolution (Hz)</b>
20 <dd>successive frequencies in the <a href="Spectrum.html">Spectrum</a> will be maximally this distance apart.</dd>
21 <dt><b>Bandwidth reduction (Hz)</b>
22 <dd>formants with small bandwidths show up very well as peaks in the spectrum because the poles lie close to the contour along which the spectrum is computed (the unit circle in the z-plane). Peak enhancement can be realized by computing the spectrum in the z-plane along a contour of radius <i>r</i> = exp (&#8211; <i>&#960;</i> &#183; <i>bandwidthReduction</i> / <i>samplingFrequency</i>). This technique is also called off-axis spectrum computation. Negative values evaluate the spectrum on a contour <i>outside</i> the unit circle and therefore result in a flattened spectrum.</dd>
23 <dt><b>De-emphasis frequency (Hz)</b>
24 <dd>Performs de-emphasis when frequency is in the interval (0, <a href="Nyquist_frequency.html">Nyquist frequency</a>)</dd>
25 </dl>
26 <h2>Algorithm</h2>
27 <p>The Spectrum at time <i>t</i> will be calculated from the <i>nearest</i> LPC frame according to:</p>
28 <table width="100%" style="white-space:pre-wrap"><tr><td align=middle>Spectrum (<i>f</i>) = &#8730;(<i>gain</i>&#183;<i>T</i>/<i>df</i>) / (1 + &#8721;<sub><i>k</i>=1..<i>numberOfCoefficients</i></sub> <i>a</i><sub><i>k</i></sub><i>z</i><sup>&#8211;<i>k</i></sup>),</table>
29 <p>where <i>T</i> is the sampling period and <i>z</i> = exp (&#8211;2 <i>&#960;</i> <i>i</i> <i>f</i> <i>T</i>) and <i>df</i> is the distance in Hz between two successive components in the Spectrum.</p>
30 <dl>
31 <dd style="position:relative;padding-left:1em;text-indent:-2em">1. Allocate a large enough buffer [1..<i>nfft</i>] to perform an FFT analysis.</dd>
32 <dd style="position:relative;padding-left:1em;text-indent:-2em">2. Make the first value of the buffer 1 and copy the prediction coefficients <b>a</b> into the buffer. This results in buffer values: (1, <i>a</i><sub>1</sub>, ..., <i>a</i><sub><i>numberOfCoefficients</i></sub>, 0, ..., 0).</dd>
33 <dd style="position:relative;padding-left:1em;text-indent:-2em">3. If <b>De-emphasis frequency</b> is in the interval (0, <i>nyquistFrequency</i>) then "multiply" the buffer with (1 - <i>b</i> <i>z</i><sup>&#8211;1</sup>), where <i>b</i> = exp (&#8211; <i>&#960;</i> <i>deEmphasisFrequency</i> <i>T</i>). This results in buffer values: (1, <i>a</i><sub>1</sub>&#8211;<i>b</i>, <i>a</i><sub>2</sub>&#8211;<i>b</i>&#183;<i>a</i><sub>1</sub>, ..., <i>a</i><sub><i>numberOfCoefficients</i></sub>&#8211;<i>b</i>&#183;<i>a</i><sub><i>numberOfCoefficients</i>&#8211;1</sub>, &#8211;<i>b</i>&#183;<i>a</i><sub><i>numberOfCoefficients</i></sub>, 0, ..., 0). Note that the number of values in the buffer that differ from 0 has increased by one.</dd>
34 <dd style="position:relative;padding-left:1em;text-indent:-2em">4. If <b>Bandwidth reduction</b> is greater than 0 then multiply corresponding values in the buffer by <i>g</i><sup><i>i</i>&#8211;1</sup> where <i>g</i> = exp (2<i>&#960;</i> <i>bandwidthReduction</i> <i>T</i> / <i>nfft</i>), and <i>i</i> is the position index in the buffer. <i>i</i> runs from 1 to <i>numberOfCoefficients</i>+1+<i>t</i>, where <i>t</i> equals 1 when de-emphasis was performed, else 0.</dd>
35 <dd style="position:relative;padding-left:1em;text-indent:-2em">5. Calculate the FFT spectrum of the buffer with the coefficients. This results in complex amplitudes (<i>a</i><sub><i>j</i></sub>,<i>b</i><sub><i>j</i></sub>), <i>j</i>=1..<i>nfft</i>/2+1.</dd>
36 <dd style="position:relative;padding-left:1em;text-indent:-2em">6. Calculate the LPC Spectrum by taking the inverse of the FFT spectrum, i.e., each complex amplitude becomes (<i>a</i><sub><i>j</i></sub>,<i>b</i><sub><i>j</i></sub>)<sup>&#8211;1</sup> = (<i>a</i><sub><i>j</i></sub>,&#8211;<i>b</i><sub><i>j</i></sub>) / (<i>a</i><sub><i>j</i></sub><sup>2</sup> + <i>b</i><sub><i>j</i></sub><sup>2</sup>)</dd>
37 <dd style="position:relative;padding-left:1em;text-indent:-2em">7. Multiply all values with the scale factor &#8730;(<i>gain</i>&#183;<i>T</i>/<i>df</i>).</dd>
38 </dl>
39 <h3>Links to this page</h3>
40 <ul>
41 <li><a href="LPC__To_Spectrogram___.html">LPC: To Spectrogram...</a>
42 </ul>
43 <hr>
44 <address>
45 <p>© djmw 20071120</p>
46 </address>
47 </body>
48 </html>