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.

612 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

2. Amplitude is independently adjustable.<br />

3. Phase is independently adjustable.<br />

4. Amplitude and phase may be updated at any time without glitching<br />

the output.<br />

5. Fundamental frequency is controlled by a single 20-bit word.<br />

6. The output is a 16-bit word at 62.5 ksls sample rate.<br />

Much <strong>of</strong> the basic structure and organization <strong>of</strong> the previous multiplexed<br />

oscillator will be retained. Thus, the Fourier series is evaluated via "brute<br />

force" in which each harmonic is individually computed, scaled, and<br />

summed. Although a computation time savings <strong>of</strong> 1O-to-1 is theoretically<br />

possible through use <strong>of</strong> the FFT, the computation logic would be much more<br />

complex. Also, as was seen in Chapter 13, FFT so/nthesis <strong>of</strong> arbitrary frequencies<br />

(which is necessary in a fixed sample rate implementation) is even<br />

more complex. Another advantage <strong>of</strong> brute-force evaluation is that amplitude<br />

and phase changes take effect immediately, between samples, rather than<br />

between FFT records.<br />

Hardware Structure<br />

Following the same development as before, Fig. 17-16 shows the<br />

conceptual block diagtam <strong>of</strong> a single harmonic channel without multiplexing.<br />

The first obvious feature is that three control variables are involved:<br />

frequency, amplitude, and phase. Another feature is the inclusion <strong>of</strong> two<br />

multiplier blocks, one for multiplying the frequency parameter by the harmonic<br />

number and the other for multiplying the sine table content by the<br />

amplitude variable. Phase control is implemented by adding the phase shift<br />

parameter to the accumulator contents in a separate phase adder before feeding<br />

it to the sine table. Finally, we have a harmonic accumulator, which sums the<br />

output <strong>of</strong> this channel with that <strong>of</strong> the other harmonic channels to provide<br />

the fina.l output, which is then sent to the DAC.<br />

Before continuing further, a few things should be said about the word<br />

lengths <strong>of</strong> the various blocks. When the 20-bit frequency control word is<br />

multiplied by the 6-bit harmonic number, a 26-bit product is expected.<br />

However, in order to use the same accumulator frequency generator and<br />

sample rate as before, only the low order 20 bits <strong>of</strong> the product are used.<br />

Thus, product overflow is possible when high fundamental frequencies are<br />

used. While this may seem to be an operational restriction, a little thought<br />

will reveal that product overflow is indicative <strong>of</strong>serious alias distortion in the<br />

tone anyway. When using the tone generator, the amplitudes <strong>of</strong> all harmonics<br />

that exceed 31 kHz will have to be made zero. The word lengths in<br />

the sine lookup blocks are 10 bits, the same as before. When 64 individual<br />

sine waves are added up, the result is a 16-bit final output word.<br />

Let's now look at these blocks and see how they would be implemented<br />

in the multiplexed case. Since there are 64 harmonics, the amplitudes and

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

Saved successfully!

Ooh no, something went wrong!