Commodore 64 User Manual page 94

Hide thumbs Also See for 64:
Table of Contents

Advertisement

this works, look at Lines 85 and 90 in the musical scale program. In this
program, immediately after setting the frequency in Line 80, we set the
CONTROL SETTING for VOICE 1 in Line 85 by POKEing 54276,17. This
turned on the CONTROL for VOICE 1 and set it to a TRIANGLE
WAVEFORM (17). In Line 70 we POKE 54276,16, stopping the note. La-
ter, we changed the waveform start setting from 17 to 33 to create a
SAWTOOTH WAVEFORM and this gave the scale a "harpsichord" effect.
See how the CONTROL SETTING and WAVEFORM interact? Setting the
waveform is similar to setting the volume, except each voice has its own
setting and instead of POKEing volume levels we're defining waveforms.
Next, we'll look at another aspect of sound . . . the ADSR feature.
3. ATTACK/DECAY SETTING -As we mentioned before, the ADSR
CONTROL SETTING not only defines the waveform but it also activates
the ADSR , or ATTACK/ DECAY/SUSTAIN/ RELEASE feature of the COM-
MODORE 64. We'll begin by looking at the ATTACK/DECAY setting. The
following chart shows the various ATTACK and DECAY levels for each
voice. If you're not familiar with the concepts of sound attack and de-
cay, you might think of "attack" as the rate at which a note/sound arises
to its MAXIMUM VOLUME. The DECAY is the rate at which the note/
sound falls from its highest volume level back to the SUSTAIN level. The
following chart shows the ATTACK/DECAY setting for each voice, and the
numbers for each attack and decay setting. Note that YOU MUST
COMBINE ATTACK AND DECAY SETTINGS BY ADDING THEM UP AND
ENTERING THE TOTAL. For example, you can set a HIGH ATTACK rate
and a LOW DECAY rate by adding the high attack number (64) to the
low decay number (1). The total (65) will tell the computer to set the high
attack rate and low decay rate . You can also increase the attack rates
by adding them together (128 + 64 + 32 + 16 = MAX. ATTACK RATE
of 240).
ATTACK / DECAY RATE SETTINGS
ATTACK/ DECAY HIGH MEDIUM LOW LOWEST HIGH MED .
LOW LOWEST
SETTING ATTACK ATTACK ATTACK ATTACK DECAY DECAY DECAY DECAY
VOICE 1 54277
128
64
32
16
8
4
2
VOICE 2 54284
128
64
32
16
8
4
2
VOICE 3 54291
128
64
32
16
8
4
2
If you set an attack rate with no decay, the decay is automatically
zero, and vice-versa. For example, if you POKE 54277,64 you set a
medium attack rate with zero decay for VOICE 1. If you POKE 54277,66
you set a medium attack rate and a low decay rate (because 66=64+2
and sets BOTH settings). You can also add up several attack values, or
several decay values. For example, you can add a low attack (32) and a
84

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Commodore 64

Table of Contents