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.

642 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

For example, amplitude envelope needs are <strong>of</strong>ten satisfied by the ADSR<br />

shape, which can be completely described by five parameters. It is the<br />

responsibility <strong>of</strong> a Level 2 routine to generate samples <strong>of</strong> the shape as needed,<br />

given the parameters, and then pass these samples as parameters to the Level<br />

1 routines. A different Level 2 routine may produce arbitrary contour shapes<br />

using a piecewise linear or curvilinear approximation. With such approximations,<br />

the higher-level routine specifies segment endpoints, the amount <strong>of</strong><br />

time spanned by the segment, and the segment shape (linear, concave,<br />

convex, etc.). Yet another might interpolate between tabulated samples <strong>of</strong> a<br />

shape that could be the result <strong>of</strong> a source-signal analysis, for example.<br />

Level 3 routines comprise the bulk <strong>of</strong> the coding in the system. Their<br />

job is to accept music language statements, which are character strings,<br />

extract the information contained in them (or flag an error if the statement is<br />

incomprehensible), and supply parameters to Levels 1 and 2 routines. It is<br />

also responsible for setting up waveform and envelope shape tables, if used,<br />

in response to voicing statements in the score. It is hard to pin down the<br />

exact rare <strong>of</strong> execution for a Level 3 routine, but it is generally at the rate that<br />

notes are played. This is <strong>of</strong>ten called the "syllabic rate" from the corresponding<br />

level in the hierarchy <strong>of</strong> routines that comprise a typical speech synthesis<br />

system.<br />

Level 4 programming is a superset <strong>of</strong> Level 3. In most musIc, there Is a<br />

considerable amount <strong>of</strong> repetition that when added to the many conventions<br />

<strong>of</strong> standard music notation results in a conventional score much shorrer than<br />

the corresponding computer score expressed as character strings. The concept<br />

<strong>of</strong> macroinstructions is useful in taking advantage <strong>of</strong> these properties <strong>of</strong> the<br />

score to reduce its size. Basically, a macroinstruction is a command to the<br />

maeroexpander (the Level 4 routine under consideration) to convert a<br />

statement such as "repeat the following three-note sequence eight times" into<br />

eight repetitions <strong>of</strong> the three-note statement, which are then interpreted by<br />

the Level 3 routine just as if the user had actually written the sequence eight<br />

times. Most macroexpanders allow loops, conditional tests, counters, and<br />

procedure calls (subroutines), suggesting their use as a composition tool as<br />

well.<br />

Even though they are not really part <strong>of</strong> the music s<strong>of</strong>tware system,<br />

operating system functions on LevelS have been included for completeness.<br />

These are the routines that allow the user to prepare arrd edit the score file,<br />

link and load the music system programs into memory, and control the<br />

reading <strong>of</strong> the score file and writing <strong>of</strong> the sample file in a delayed playback<br />

system. Depending on the installation, the operating system may range from<br />

a paper tape editor and loader to a full disk operating system. In a loosely<br />

structured music s<strong>of</strong>tware system, the operating system is vital in its role <strong>of</strong><br />

maintaining the data base.<br />

Implementation <strong>of</strong> the Leoels<br />

Current thinking in computer science dictates that each <strong>of</strong> these levels<br />

be independently implemented as a separate program and linked together

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

Saved successfully!

Ooh no, something went wrong!