LPC: To Spectrum (slice)...


You can choose this command after selecting 1 or more LPC objects.
Settings

Time (s)

the time at which the Spectrum should be calculated.

Minimum frequency resolution (Hz)

successive frequencies in the Spectrum will be maximally this distance apart.

Bandwidth reduction (Hz)

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 zplane). Peak enhancement can be realized by computing the spectrum in the zplane along a contour of radius r = exp (– π · bandwidthReduction / samplingFrequency). This technique is also called offaxis spectrum computation. Negative values evaluate the spectrum on a contour outside the unit circle and therefore result in a flattened spectrum.

Deemphasis frequency (Hz)

Performs deemphasis when frequency is in the interval (0, Nyquist frequency)
Algorithm
The Spectrum at time t will be calculated from the nearest LPC frame according to:
Spectrum (f) = √(gain·T/df) / (1 + ∑_{k=1..numberOfCoefficients} a_{k}z^{–k}), 
where T is the sampling period and z = exp (–2 π i f T) and df is the distance in Hz between two successive components in the Spectrum.

1. Allocate a large enough buffer [1..nfft] to perform an FFT analysis.

2. Make the first value of the buffer 1 and copy the prediction coefficients a into the buffer. This results in buffer values: (1, a_{1}, ..., a_{numberOfCoefficients}, 0, ..., 0).

3. If Deemphasis frequency is in the interval (0, nyquistFrequency) then "multiply" the buffer with (1  b z^{–1}), where b = exp (– π deEmphasisFrequency T). This results in buffer values: (1, a_{1}–b, a_{2}–b·a_{1}, ..., a_{numberOfCoefficients}–b·a_{numberOfCoefficients–1}, –b·a_{numberOfCoefficients}, 0, ..., 0). Note that the number of values in the buffer that differ from 0 has increased by one.

4. If Bandwidth reduction is greater than 0 then multiply corresponding values in the buffer by g^{i–1} where g = exp (2π bandwidthReduction T / nfft), and i is the position index in the buffer. i runs from 1 to numberOfCoefficients+1+t, where t equals 1 when deemphasis was performed, else 0.

5. Calculate the FFT spectrum of the buffer with the coefficients. This results in complex amplitudes (a_{j},b_{j}), j=1..nfft/2+1.

6. Calculate the LPC Spectrum by taking the inverse of the FFT spectrum, i.e., each complex amplitude becomes (a_{j},b_{j})^{–1} = (a_{j},–b_{j}) / (a_{j}^{2} + b_{j}^{2})

7. Multiply all values with the scale factor √(gain·T/df).
Links to this page
© djmw 20071120