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 693<br />

though it is not producing an audible sound. Again, exceptional condition<br />

testing is probably necessary to eliminate the effects <strong>of</strong> this kind <strong>of</strong> error. The<br />

testing can be relatively infrequent, however.<br />

Control Statements<br />

The basic level <strong>of</strong> NOTRAN has very few control statements. Many<br />

more would undoubtedly be added if the language is extended via a macroprocessor.<br />

One <strong>of</strong> the basic control statements is the TEMPO statement. The<br />

TEMPO statement essentially specifies a correspondence between musical<br />

time in terms <strong>of</strong> quarter notes, etc., and real time. The statement format is<br />

simply the keyword TEMPO followed by a valid duration specification (see<br />

the section on note statements), an equals sign, and a number specifying the<br />

number <strong>of</strong> milliseconds assigned to that duration. An example statement is:<br />

TEMPO Q=350<br />

where Q refers to a quarter nate and the 350 specifies that the quarter note<br />

has a duration <strong>of</strong> 350 msec. If the time signature (which does not need to<br />

be specified) is 4/4, then this cOtresponds to a metronome marking <strong>of</strong> 170<br />

beats/min.<br />

The only other control statements are START and STOP. These<br />

keywords require no parameters and are merely used to skip over code while<br />

the score is "debugged." Sound generation is started when a START statement<br />

is encountered and suspended when a STOP statement is seen. With<br />

sound generation suspended, statements are interpreted and thrown away at<br />

great speed, thus allowing rapid syntax checking or skipping <strong>of</strong> sections<br />

known to be correct.<br />

Comment lines may be inserted simply by making the first character on<br />

the line an *. The interpreter then ignores the remainder <strong>of</strong> the line and goes<br />

ro the next.<br />

Note that there are no jump or repeat statements and no provisions for<br />

subroutines (refrains) in the basic language. A little thought will reveal that<br />

if these are implemented in the Level 3 interpreter that the entire NOTRAN<br />

score would have ro be in memory at once. During actual sound synthesis<br />

much, if not most, <strong>of</strong> memory will be needed for waveform tables, control<br />

blocks, and sample buffers. Although the text could be kept on disk and<br />

randomly accessed in response ro a jump or refrain statement, such a facility<br />

is beyond many microcomputer operating systems. In any case, these functions<br />

will be left to a higher-level macroprocessor that has all <strong>of</strong> memory<br />

available when run.<br />

Note Statements<br />

Note statements are the only ones that actually produce sound and take<br />

real time to execute. Whereas the other statements all began with a keyword,

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

Saved successfully!

Ooh no, something went wrong!