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.

690 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

the next line, follow. Parameters probably should not be split across line<br />

boundaries (whether this is a requirement depends on the interpreter implementation),<br />

and besides, splitting makes the statement hard to read.<br />

Parameters that specify a duration are always in units <strong>of</strong> milliseconds.<br />

Parameters that specify an amplitude are in terms <strong>of</strong> percent. Depending on<br />

the parameter type, the values <strong>of</strong> related parameters may have to add up to<br />

100% or less. With other parameter types, the percentage figures merely<br />

establish ratios and can add up to any value, although individual parameters<br />

must be less than 100%. With these conventions for numerical parameters,<br />

integers can normally be used; however, a decimal point and fractional part<br />

can be tacked on for additional precision.<br />

Figure 18-21 shows an example voice statement and a list <strong>of</strong> the<br />

keyword parameters available. The number immediately following the<br />

VOICE keyword is the 10 number for the voice. Note statements using the<br />

voice will specify the 10 number. During the course <strong>of</strong> the music, a<br />

particular voice number may be redefined as <strong>of</strong>ten as desired. There is no<br />

restriction on the numbers that can be used.<br />

The AD, DO, and RD parameters are used to specify the durations, in<br />

milliseconds, <strong>of</strong> three phases <strong>of</strong> the ADSR envelope. The duration <strong>of</strong> the<br />

sustain phase depends on the note being played. The first letter identifies the<br />

envelope phase and the D is a mnemonic for duration. If a parameter is<br />

omitted, zero (actually 1 msec) is assumed. SA refers to sustain ampJiwde<br />

and gives the sustain level relative to the peak overshoot <strong>of</strong> the attack. Note<br />

that the percent figure refers to voltage amplitude; thus, a specification <strong>of</strong> 50<br />

would give a sustain level 6 dB below the attack peak. Omissi/on <strong>of</strong> this<br />

parameter gives a default <strong>of</strong> 100%.<br />

The voice amplitude (VA) parameter is very important. Its basic function<br />

is to specify the amplitude <strong>of</strong> the voice relative to that <strong>of</strong> other sounds.<br />

The importance is due to the requirement that the sum <strong>of</strong> all <strong>of</strong> the voice<br />

amplitudes <strong>of</strong> all simultaneous sounds must not exceed 100% if total freedom<br />

from overflow is desired. This means that if at some point in the musical<br />

score 15 simultaneous sounds have been built up, the VA parameters associated<br />

with each sound should not add up to more than 100%. Observing<br />

this rule will virtually guarantee (since the filtered nois() used in percussion<br />

instruments is random, it cannot be absolutely guaranteed) that overflow will<br />

not occur when the sounds are summed in the sample buffer. In most cases,<br />

with a lot <strong>of</strong> simultaneous sounds, the amplitude sum could substantially<br />

exceed 100% without undue risk <strong>of</strong> overflow because <strong>of</strong> the low probability<br />

<strong>of</strong> envelope and waveform peaks all coinciding at the same time.<br />

The remaining parameters define the four waveforms associated with<br />

the four envelope phases. These are organized into groups <strong>of</strong> parameters. A<br />

group starts with a keyword, such as AW for attack wave, followed by an<br />

equals sign, which signals that a group <strong>of</strong> parameters follows. Within the<br />

group may be several parameter subgroups, each <strong>of</strong> which corresponds to a

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

Saved successfully!

Ooh no, something went wrong!