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

681<br />

CALL LEVEL 1 TONE<br />

GENERATION ROUTINE<br />

USING WAVBCB AND<br />

AMP = EVTAMP.<br />

!TABLE LOOKUP OF<br />

ENVELOPE CURVE) ..<br />

CFVAL<br />

Fig. 18-16. Level 2 tone-control routine<br />

count milliseconds during each phase. The next four parameters give the<br />

duration for each phase. Two additional parameters give the sustain<br />

amplitude relative to the peak amplitude <strong>of</strong> the attack (remember that the<br />

ADSR shape overshoots the sustain level during attack) and the overall<br />

amplitude <strong>of</strong> the entire event.<br />

The remaining parameters are used to control waveform switching.<br />

Four parameters give waveform table addresses for each <strong>of</strong> the four envelope<br />

phases. Since sound control blocks must be created to generate sound, their<br />

addresses are stored in the event control block. The cross-fade value increases<br />

from 0 to 1.0 as the old waveform fades out and the new waveform fades in.<br />

The rate <strong>of</strong>fade is arbitrarily set to complete in one-quarter <strong>of</strong> the duration <strong>of</strong><br />

the current envelope segment. The cross-fade increment is computed at the<br />

beginning <strong>of</strong> an envelope segment such that this is true.

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

Saved successfully!

Ooh no, something went wrong!