Commodore 64 User Manual page 96

Hide thumbs Also See for 64:
Table of Contents

Advertisement

determine how long the note will be held at SUSTAIN volume before
being released. The following chart shows the numbers you have to
POKE to reach different SUSTAIN/RELEASE, rates.
SUSTAIN/ RELEASE RATE SETTINGS
SUSTAIN/
RELEASE HIGH MEDIUM LOW LOWEST HIGH MED .
LOW LOWEST
CONTROL SETTING SUSTAIN SUSTAIN SUSTAIN SUSTAIN RELEASE RELEASE RELEASE RELEASE
VOICE 1
54278
128
64
32
16
8
4
2
VOICE 2
54285
128
64
32
16
8
4
2
VOICE 3
54292
128
64
32
16
8
4
2
As an example, if you're using VOICEI, you can set a HIGH SUSTAIN
LEVEL by typing: POKE 54278,128 or you could combine a HIGH SUSTAIN
LEVEL with a LOW RELEASE RATE by adding 128 + 2 and then POKE
54278,130. Here's the same sample program we used in the ATTACK/
DECAY section above . . . with a SUSTAIN/RELEASE feature added.
Notice the difference in sounds.
5 FORL=54272T 054296: POKE L,0: NEXT
10 POKE54296,15
20 POKE54277,64
30 POKE54278,128 'E-
40 P0KE54273,17:P0KE54272,37 ^-
50 PRINT"HIT ANY KEY" <
60 GETK$:IFK$=" "THEN60 E
70 POKE54276,17:FORT=1T0200:NEXT
80 POKE54276,16:FORT=1TO50:NEXTf
90 GOTO60
,Duration the note plays.
Set volume at highest level.
Set Attack/Decay.
Set Sustain/ Release
POKE one note into VOICE I.
Screen message.
Check the keyboard.
Set VAoveform control (triangle).
Torn off settings.
Loop back and do it again.
In Line 30, we tell the computer to SUSTAIN the note at a HIGH SUS-
TAIN LEVEL (128 from chart above) . . . after which the tone is released
in Line 80. You can vary the duration of a note by changing the "count"
in Line 70. To see the effect of using the release function try changing
Line 30 to POKE54278,89 (SUSTAIN = 80, RELEASE = 9).
5. CHOOSING VOICES AND SETTING HIGH/LOW FREQUENCY
SOUND VALUES -Each individual note on the Commodore 64 requires
TWO SEPARATE POKE COMMANDS . . . one for HIGH FREQUENCY and
one for LOW FREQUENCY. The MUSICAL NOTE VALUE table in Appendix
M shows you the corresponding POKES you need to play any note in the
86

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Commodore 64

Table of Contents