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.

MUSIC SYNTHESIS SOFTWARE 691<br />

harmonic. The subgroup starts with the keyletter H (harmonic) immediately<br />

followed by a number defining the harmonic number. Commas then separate<br />

the parameters in the subgroup. The first parameter after the harmonic<br />

number is amplitude (in percent) and the second is phase in units <strong>of</strong> 211"/100<br />

(thus, 50 specifies 180°,25=90°, etc.). The last parameter in a subgroup is<br />

followed with a semicolon if any more subgroups or groups follow; otherwise,<br />

the end <strong>of</strong> the statement is assumed. If the phase parameter is omitted,<br />

a random-number generator determines the phase, and, if the amplitude<br />

parameter is omitted, a 100% amplitude is assumed. Omitted harmonics, <strong>of</strong><br />

course, have zero amplitude. The amplitude percentages in a waveform<br />

specification simply indicate relative harmonic amplitudes; there is no restriction<br />

on their sum, since the waveform will be scaled after it is computed.<br />

DW, SW, and RWare similarly used to specify groups <strong>of</strong> parameters for the<br />

other three waveforms. If a waveform is not defined for an envelope phase,<br />

the waveform <strong>of</strong> the previous segment will be used, which saves space in the<br />

waveform table area <strong>of</strong> memory. The attack segment must have a waveform<br />

specified.<br />

PRCUS Statement<br />

The PRCUS statement, which is detailed in Fig. 18-22, defines the<br />

sound <strong>of</strong> a percussion instrument. The ID number and duration and<br />

amplitude parameters closely parallel those <strong>of</strong> the voice statement. Since a<br />

two-phase envelope is used, only the AD and RD parameters are needed.<br />

The use <strong>of</strong> filtered noise in the percussion sound model creates some<br />

interesting problems in specifying the amplitude <strong>of</strong> the filtered noise. The<br />

worst problem is that the parameters specified for the filter will greatly<br />

influence the perceived as well as actual amplitude <strong>of</strong> the filtered noise.<br />

Although the interpreter could look at the filter bandwidth and adjust the<br />

amplitude parameter, the correction will be inaccurate if the bandwidth<br />

changes during the sound. For simplicity, the noise amplitude parameter<br />

should simply be passed through with any necessary correction supplied by<br />

the user. Another problem with filtered noise is the fact that its peak<br />

amplitude cannot be predicted with certainty even if uniformly distributed<br />

noise samples are used. Nevertheless, this will seldom cause a problem unless<br />

the noise filter bandwidth is quite small and the percussive voice amplitude<br />

is a sizable portion <strong>of</strong> the DAC's range. If a problem is encountered, it would<br />

be easy to incorporate a test in the percussion sound generation routine to<br />

clip excessively large filtered noise samples.<br />

The noise filter mode parameter is different because it uses mnemonics<br />

for its value. While convenient for the user, mode numbers could be used<br />

just as well to simplify the interpreter program. Parameter transitions are<br />

specified by giving two numbers separated by commas, the first <strong>of</strong> which is<br />

the initial value <strong>of</strong> the parameter and the second is the final value. The

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

Saved successfully!

Ooh no, something went wrong!