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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

446 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

mere 28 instead <strong>of</strong> the original 256! Although it is not immediately apparent<br />

how the redundancies can be identified in a general algorithm, one can use<br />

matrix theory and trigonometric identities and derive the FFT algorithm<br />

from this rype <strong>of</strong> table.<br />

A completely different way to look at the redundancy involves the<br />

concept <strong>of</strong> decimation. As an example, consider a sample record with N<br />

samples where N is even. Using the SFT, one could perform N2 operations<br />

and wind up with the spectrum. Now consider splitting the record into two<br />

smaller records with NI2 samples in each such that the even numbered<br />

samples go to one record and the odd numbered ones to go the other. If an<br />

SFT is performed on each record, it will require N 2 /4 operations for a total <strong>of</strong><br />

only N 2 /2 operations. The trick is to combine the two resulting spectrums<br />

into one representing the true spectrum <strong>of</strong> the original record. This can be<br />

accomplished by duplicating the even sample spectrum <strong>of</strong>N14 harmonics and<br />

adding with a progressive phase shift the odd sample spectrum, also duplicated,<br />

to yield N12 harmonics total. The combination requires N extra<br />

multiplications and additions.<br />

If N is divisible by 4, the decimation operation could be repeated to<br />

give (our records <strong>of</strong> N14 samples each. The SFT can be performed on each,<br />

requiring only N 2 /4 operations, and the four resulting spectrums combined<br />

in two stages to form the final spectrum. In fact, if N is a power <strong>of</strong> two,<br />

decimation can be repeated until there are NI2 subrecords, each having only<br />

two samples as in Fig. 13-12. Note the resulting scrambled order <strong>of</strong> the<br />

samples. This is called bit-reversed order because ifthe binary representation <strong>of</strong><br />

the scrambled sample numbers is observed in a mirror, it will appear to be a<br />

simple ascending binary sequence.<br />

Since the discrete Fourier transform <strong>of</strong> two samples is trivial (the cosine<br />

component <strong>of</strong> the single harmonic is the sum <strong>of</strong> the sample values, while the<br />

sine component is the difference), most <strong>of</strong> the computation is combining the<br />

subspectra together in stages to form the final spectrum. The essence <strong>of</strong> the<br />

FFT, then, is complete decimation <strong>of</strong> the time samples followed by recombination<br />

<strong>of</strong> the frequency specrra to form the exact spectrum <strong>of</strong> the original<br />

sample set.<br />

Complex Arithmetic<br />

At this point in the description <strong>of</strong> the FFT we will be forced to commit<br />

a mathematical "copout" that is customary in such a discussion. In any case,<br />

it will not only simplify the discussion but will facilitate the development <strong>of</strong><br />

an FFT program. The first step is to treat each harmonic, which has a cosine<br />

and a sine component, as a single complex number. Although the cosine<br />

component is normally called the "real" part and the sine component the<br />

"imaginary" part, both are quite real as far as a physical waveform is concerned.<br />

Therefore, it is best to forget about "real" and "imaginary" and

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

Saved successfully!

Ooh no, something went wrong!