SAMPLE SOUND EFFECTSTO TRY
The following programs may be added to almost any BASIC program.
They are included to give you some programming ideas and demon-
strate the Commodore 64's sound effect range.
Notice the programming shortcut we're using in line 10. We can
abbreviate those long cumbersome sound setting numbers by defining
them as easy-to-use letters (numeric variables). line 10 simply means
that these easy to remember LETTERScan be used instead of those long
numbers. Here, V = Volume, W=Waveform, A=Attack/Decay, H=High
Frequency (VOICE1), and L=Low Frequency (VOICEl). We then use these
letters instead of numbers in our program
. . . making our program
shorter, typing faster, and the sound settings easier to remember and
spot.
DOLL CRYING
10 V=54296:W=54276:A=54277: H=54273:L=54272
20 POKEY,15:POKEW,65:POKEA, 15
30 FORX= 200T05STEP-2: POKEH,40: POKEL,X:NEXT
40 FORX=150T05STEP-2:POKEH,40:POKEL,X:NEXT
50 POKEW,0
SHOOTINGSOUND. . . USINGVOICE1,NOISEWAVEFORM,FADING
VOLUME
10 V=54296:W=54276:A=54277:H =54273:L=54272
20 FORX= 15T00STEP-l:POKEV,X:POKEW, 129:POKEA,
15:POKEH,40:POKEL,200:NEXT
30 POKEW,0:POKEA,0
90