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.

MUSIC SYNTHESIS SOFTWARE 643<br />

only for execution. In fact, each level should probably be broken down<br />

further into many subroutines. While this book is not the place to discuss<br />

modular and structured programming practices, it is dear that the major<br />

levels need not all be coded in the same programming language. In fact, the<br />

optimum balance between programming effort and music program speed<br />

requires that different languages be used on different levels.<br />

There is a little question that Levels 0 and 1 should be implemented in<br />

assembly language for the machine being used. The reason, <strong>of</strong> course, is that<br />

they execute at the sound sample rate <strong>of</strong> 8 ks/s to 50 ks/s. Furthermore, for<br />

almost any personal computer, fixed-point (integer) arithmetic must be used<br />

for the sample calculations. Most programmers are unfamiliar with the fine<br />

points <strong>of</strong> fixed-point computation, having been spoiled by the floating-point<br />

capabilities <strong>of</strong> large mainframe computers or high-level languages. Since<br />

integer computation is vital to acceptable speed with microcomputers, it will<br />

be discussed in detail later.<br />

In isolated instances, the lower-level routines have actually been implemented<br />

in the microcode <strong>of</strong>a microprogrammed minicomputer. This essentially<br />

means that new instructions are added to the computer's repertoire that<br />

facilitate sample computation. What is actually happening is that the internal<br />

machine registers and logical elements are being directly manipulated<br />

by the microcode at maximum speed without the overhead <strong>of</strong> reading instructions<br />

from main memory. Although two to three times faster,<br />

microprogramming is even more obscure and difficult than assembly programming.<br />

Also, only the larger minicomputers allow user microprogrammIng<br />

anyway.<br />

Dedicated hardware such as was discussed in the previous chapter can<br />

be thought <strong>of</strong> as replacing Level 1 routines. If the dedicated hardware is<br />

intelligent, Level 2 may also be replaced. In computer-controlled analog<br />

systems, voltage-controlled oscillators, amplifiers, and filters perform the<br />

functions <strong>of</strong> Level 1 routines, while envelope generators do the Level 2<br />

functions.<br />

High-Level Languages<br />

Level 3 routines are best implemented in a higher-level language,<br />

particularly in a delayed playback system. This level <strong>of</strong> the music system<br />

typically handles a relatively small volume <strong>of</strong> data but does a lot <strong>of</strong> character<br />

string scanning, data table maintenance, and decision making. Thus, only a<br />

small portion <strong>of</strong> the computational effort is spent in these routines, while a<br />

large portion <strong>of</strong> the programming effort is sunk into them. High-level<br />

languages tend to minimize the programming effort required while simultaneously<br />

making the programs easier to read and modify (if adequately<br />

commented). High-level languages for microcomputer systems almost invariably<br />

have features thar make it easy to link to assembly level routines.<br />

The natural question, <strong>of</strong> course, is: Which high-level language should<br />

be used in the upper levels <strong>of</strong> a music s<strong>of</strong>tware system? Like microprocessor

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

Saved successfully!

Ooh no, something went wrong!