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.

646 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

Even when floating-point hardware or subroutines are available, rheir speed is<br />

likely to be substantially less. The techniques <strong>of</strong> fixed-point computation are<br />

rapidly becoming an obscure art, however. In the next few pages these will be<br />

described to the depth necessary for use in digital signal-processing<br />

applications. Reasonable familiarity with the binary number system will be<br />

assumed. If the reader lacks such knowledge, introductory chapters <strong>of</strong> nearly<br />

any book on microprocessor programming can provide the background.<br />

Adequately illustrating such a discussion requires an example microprocessor.<br />

Although Chapter 5 strongly suggested that the 68000 or other<br />

16-bit machine should be used for direct synthesis applications, we will be<br />

using the 6502 microprocessor here for illustration. Such a choice can be<br />

rationalized in a couple <strong>of</strong> ways. First, programming just about any other<br />

choice would be easier, since the 6502 does not have hardware multiply or<br />

divide or even double byte add and subtract. Thus, understanding the given<br />

examples implemented on a 6502 will make similar implementation on a<br />

better machine seem simple in comparison. Another reason is that the 6502<br />

is the basis <strong>of</strong> a great number <strong>of</strong> very inexpensive microcomputer systems.<br />

Later, the FFT subroutine presented in BASIC in Chapter 13 will be<br />

translated into 68000 assembly language to illustrate how integer arithmetic<br />

can be used in that type <strong>of</strong>algorithm on a processor that has better arithmetic<br />

capability.<br />

The examples would not be very interesting unless actual synthesis and<br />

analysis experiments can be performed. A-to-D and D-to-A boards are<br />

available for most microcomputers, although they are seldom optimized for<br />

audio applications. Micro Technology Unlimited, however, has audio DAC<br />

and ADC systems at both the 8- and 16-bit levels that can be easily interfaced<br />

to most computers. The 8-bit units are designed for 8-1O-ks/s sample rates<br />

and already have the necessary filters included. While these are definitely not<br />

hi-fi, they are indeed capable <strong>of</strong> illustrating all <strong>of</strong> the synthesis, modification,<br />

and analysis techniques described in previous chapters. Most experimentation<br />

will require a large memory buffer to hold a few seconds <strong>of</strong><br />

sampled sound, although some real-time operations are possible. A 32K<br />

memory, for example, will hold 3-4 sec <strong>of</strong> sound at the sample rate for which<br />

these boards were designed. The 16-bit units, however, are truly hi-fi and<br />

include their own 32K sample buffer to simplify I/O programming as well as<br />

stereo and plug-in filter features. Of course, any <strong>of</strong> the circuits given in<br />

Chapters 7 and 12 can be used to build an audio DAC or ADC at considerable<br />

savings over commercial units.<br />

Properties <strong>of</strong>Binary Arithmetic<br />

Before plunging into programming examples, it is wise to review the<br />

characteristics <strong>of</strong> binary ari thmetic that are important to signal processing.<br />

We will be dealing with two fundamentally different kinds <strong>of</strong> numbers,

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

Saved successfully!

Ooh no, something went wrong!