22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

564 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

Although the preceding windows are continuous with zero at both<br />

ends, there is a slope discontinuity at the ends. One window that provides for<br />

continuity <strong>of</strong> slope (and continuity for all derivatives as well) is the cosine be!!<br />

or hanning window. Actually, it is just the point-by-point square <strong>of</strong> the<br />

half-sine window but, due to a trig identity, is the same shape as a full cosine<br />

cycle shifted up to the axis and turned upside down. The response curve in<br />

Fig. 16-11D exhibits a double width central lobe and fitst sidelobe <strong>of</strong> - 32<br />

dB, which is still unacceptable, although the second and succeeding ones are<br />

fine.<br />

The last window shown is called a Hamming window and consists <strong>of</strong> a<br />

very judicious combination <strong>of</strong> a hanning and a rectangular window. Essentially<br />

the relative contributions are scaled so that the first sidelobes cancel<br />

and the rest partially cancel. The result is a curve with all sidelobes at -42<br />

dB or less, which is accomplished with a central lobe only twice as wide as<br />

the rectangular window. For most audio spectral/analysis work, this is the<br />

optimum window. For specialized applications such as signal detection in the<br />

presence <strong>of</strong> overpowering noise, other windows with sidelobes <strong>of</strong> -80 dB<br />

and better are available at the expense <strong>of</strong> an even wider central lobe.<br />

Performing the Analysis<br />

At this point, we are ready to outline the procedure necessary to go<br />

from an indefinite-length sample string to a sequence <strong>of</strong>spectral frames using<br />

the FFT. For illustration purposes, the example <strong>of</strong>a 20-ks/s sample rate, 512­<br />

point FFT, 39-Hzfrequency resolution, and 78-s/s spectral sample rate will<br />

be continued. The crux <strong>of</strong> the analysis procedure is how the continuous<br />

stream <strong>of</strong>samples will be broken up into 512 sampLe records for the FFT. One<br />

possibility is to simply take the 512 samples from the input, transform them,<br />

take the next 512, transform, etc. If this is done, windowing <strong>of</strong> the records<br />

may greatly attenuate or miss significant waveform detaiLs that occur when<br />

the window amplitude is near zero. Furthermore, only 39 spectrums wilL be<br />

computed per 20,000 samples (l sec).<br />

Overlap can be used to insure that all parts <strong>of</strong> the waveform are seen and<br />

increase the spectral sample rate as well. The general idea is the exact inverse<br />

<strong>of</strong> the method outlined in Chapter 13 in which direct FFT synthesis was<br />

discussed. For two-to-one overlap, one would only take 256 samples from the<br />

string for each spectral frame. The other 256 in the record would be left over<br />

from the previous frame. The process can be likened to a 512-sample shift<br />

register. Each frame time 256 new samples would be shifted in and the oLdest<br />

256 wouLd be shifted out and thrown away. Other overlap factors (which<br />

need not pe integers) for both higher- and lower-spectrum sample rates are<br />

possible simply by aLtering the number <strong>of</strong> samples shifted in.<br />

There are a couple <strong>of</strong> complications in the computation that can lead to<br />

a lot <strong>of</strong> partially redundant data arrays. When a window is applied to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!