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.

424 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

power 10 the fundamental. Thus, the "signal" is 1 + 1/4 + 1/9 . ..<br />

+ 1/225 for the first 15 harmonics that lie within the range <strong>of</strong> the low-pass<br />

filter. Harmonics 16 through 34 do not contribute to the signal or the<br />

distortion, since they or their aliases are above 15 kHz in this example.<br />

Harmonics 35 to 65, 85 to 115, etc., contribute to the distortion. If the<br />

calculations are carried out, it is found that the signal power is 1.58 units,<br />

while the distortion due to the first-two groups <strong>of</strong>foldovers is 0.01717 unit<br />

giving a SiN ratio <strong>of</strong> about 20 dB. Actually, if the example frequencies were<br />

exact, the distortion frequencies would exactly overlap the signal frequencies<br />

and would not be heard. However, if the signal frequency is not a submultiple<br />

<strong>of</strong> the sample rate, then the distortion would be apparent.<br />

This does not seem to be very good and in fact does not sound all that<br />

good either. What's worse, a 2-kHz signal can be expected to be almost 6 dB<br />

worse, although lower frequencies can be expected to be better by about 6<br />

dBloctave <strong>of</strong> reduction. The square wave is about 2 dB better, but a<br />

rectangular waveform approaches 0 dB SiN as the width approaches zero.<br />

The triangle wave SiN ratio is an acceptable 54 dB, and the sine generates no<br />

alias distortion at all. In conclusion, the results are usable if high-amplitude,<br />

high-frequency sawtooth and rectangular waveforms are avoided.<br />

Besides restrictions in use, there are few options available for lowering<br />

the distortion figure. One thing that can be done is to generate the<br />

troublesome waves at a higher sample rate, pass rhem rhrough a digital lowpass<br />

filter operating at the higher rate, and then re-sample the filter output at<br />

the lower system sample rate. For example, the sawtooth might be generated<br />

at 400 ksls, which is eight times the system rate and then fed to a simple<br />

digital low-pass filter that cuts <strong>of</strong>f at 15 kHz. Only every eighth sample<br />

emerging from the filter would actually be used. With this setup, the SiN<br />

ratio for the I-kHz sawtooth would be improved to 38 dB. While the<br />

computation time necessary to do this in s<strong>of</strong>tware is much greater than that<br />

required for some <strong>of</strong> the more sophisticated tone generation techniques, it<br />

can be a viable hardware technique whereby simplicity <strong>of</strong> the algorithm <strong>of</strong>ten<br />

outweighs computation time considerations because the digital hardware is<br />

so fast.<br />

Table Lookup Method<br />

If direct computer synthesis is to live up to its promise <strong>of</strong> nearly infinite<br />

flexibility and very high sound quality, then better tone-generation techniques<br />

than the simulation <strong>of</strong> analog synthesizer oscillators will have to be<br />

used. One <strong>of</strong> these involves scanning <strong>of</strong> precomputed waveform tables. An<br />

important advantage is that the sample values stored in the table can in many<br />

instances be selected so that alias distortion is not a problem. Another is that<br />

microprocessors are far more efficient in looking up waveform samples than<br />

in computing them from scratch.

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

Saved successfully!

Ooh no, something went wrong!