Commodore 64 User Manual page 95

Hide thumbs Also See for 64:
Table of Contents

Advertisement

medium attack (64) for a combined attack rate of 96, then add a
medium decay of 4 and . . . presto . . . POKE 54277,100.
At this point, a sample program will better illustrate the effect. Type
the word NEW, hit HIT M
-L and type in this program and RUN it:
5 FOR L=54272TO54296: POKE L , 0:NEXT(
10 PRINT "HIT ANY KEY" --
20 POKE54296,15 <
30 POKE54277,64 <
40 P0KE54273 , 17:P0KE54272,37 E
60 GETK$ : IFK$=""THEN60 <-
70 POKE54276,17:FORT =1 T0200:NEXT
80 POKE54276,16:FORT =1T050:NEXT <
90 GOTO2O E
Duration the note plays.
Screen message.
Set volume at highest level.
Set Attack/Decay.
Poke one note into VOICE 1.
Check the keyboard.
Set Vhvefonn control (triangle).
Turn off settings.
Loop back and do it again.
Here, we're using VOICE 1 to create one note at a time . . . with a
MEDIUM ATTACK RATE and ZERO DECAY. The key is Line 40. POKEing the
ATTACK/ DECAY setting with the number 64 activates a MEDIUM attack
rate . The result sounds like someone bouncing a ball in an oil drum.
Now for the fun part. Hit the
type the word LIST and hit
key to stop the program, then
®r
^ID . Now type this line and hit
(the new line 40 automatically replaces the old line 40):
40 POKE 54277,190
Type the word RUN and hit to see how it sounds. What we've
done here is combine several attack and decay settings. The settings
are: HIGH ATTACK ( 128) + LOW ATTACK ( 32) + LOWEST ATTACK (16)
+ HIGH DECAY (8) + MEDIUM DECAY (4) + LOW DECAY (2) = 190.
This effect sounds like a sound an oboe or other "reedy" instrument
might make. If you'd like to experiment, try changing the waveform and
attack/decay numbers in the musical scale example to see how an
"oboe" sounds. Thus . . . you can see that changing the attack/decay
rates can be used to create different types of sound effects.
4. SUSTAIN/RELEASE SETTING -Like Attack/Decay, the SUSTAIN/
RELEASE setting is activated by the ADSR/WAVEFORM Control. SUSTAIN/
RELEASE lets you "extend" (SUSTAIN) a portion of a particular sound, like
the "sustain pedal" on a piano or organ which lets you prolong a note.
Any note or sound can be sustained at any one of 16 levels. The
SUSTAIN/RELEASE Setting may be used with a FOR . . . NEXT loop to
85

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Commodore 64

Table of Contents