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.

DIGITAL HARDWARE 603<br />

As an example, consider the synthesis <strong>of</strong> a tone having the exact harmonic<br />

makeup (chosen at random) listed in Table 17-1. For the sake <strong>of</strong><br />

argument, let's assume that only 64 words <strong>of</strong> memory (64 samples per cycle)<br />

are available and that each word is a paltry 6 bits long, which means that a<br />

6-bit DAC can be used. Also shown in Table 17-1 are the corresponding<br />

sample values to 16-bit (5-digit) accuracy and rounded to 6-bit accuracy. The<br />

final column shows the actual harmonic spectrum that would emerge from<br />

this low-budget tone generator.<br />

The first surprise is that the difference between desired and actual<br />

harmonic amplitudes expressed in decibels is not very great, at least for the<br />

significant high-amplitude ones. Lower-amplitude harmonics do suffer<br />

greater alteration but are more likely to be masked by the higher-amplitude<br />

harmonics. The real difference is that no harmonic can be entirely absent<br />

because <strong>of</strong> the quantization "noise." In actual use with a fairly "bright"<br />

harmonic spectrum, the approximation errors would be audible but would be<br />

characterized as a slight timbre alteration rather than distortion; much like<br />

the audible difference between two presumably excellent speaker systems <strong>of</strong><br />

different manufacture. The use <strong>of</strong> 8 bits and 256 steps for the waveform <strong>of</strong> a<br />

digital oscillator is therefore well justified.<br />

Although the alias frequencies are also harmonic, they should be filtered<br />

if a high-pitched "chime" effect is to be avoided. Unfortunately, the<br />

filter cut<strong>of</strong>f must track the tone frequency as it changes. This used to be an<br />

expensive proposition but ~ 2040 VCF driven by an 8-bit DAC connected to<br />

the frequency control word can now solve the problem for under $15. In<br />

many cases, it may be possible to omit the filter. For example, when using a<br />

256-entry waveform table, only fundamental frequencies below 150 Hz require<br />

filtering, since otherwise the alias frequencies are entirely beyond 20<br />

kHz. In fact, meilow tones containing few harmonics can be generated<br />

filter-free down to 80 Hz.<br />

A dedicated digital tone generator can, <strong>of</strong> course, be based on the<br />

constant sample rate approach too. The structure is basically the same as<br />

Figs. 17-9 and 17-'-10 except for the following:<br />

1. The master clock (sample rate) is much slower, such as 50 ks/s.<br />

2. The most significant bits <strong>of</strong> the accumulator divider will be actual<br />

register bits, since the slow clock eliminates the "jitter-filter"<br />

counter (the jitter now becomes interpolation error).<br />

3. The waveform memory will require more words (1,024) and more<br />

bits per word (10-12), since interpolation and quantization error<br />

will now be white noise instead <strong>of</strong> pure harmonic distortion.<br />

The constant sample rate tone generator is, in fact, a precise hardware<br />

implementation <strong>of</strong> the s<strong>of</strong>tware table-scanning technique described in<br />

Chapter 13. In exchange for additional hardware complexity, one has a<br />

structure that can use a fixed low-pass filter (probably no filter at all for 50-

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

Saved successfully!

Ooh no, something went wrong!