Atari 65XE Owner's Manual page 72

Hide thumbs Also See for 65XE:
Table of Contents

Advertisement

NEW
10 REM * SOUND EFFECTS WITH FOR-NEXT LOOP
20 VOICE=0:PITCH=0:TONE=10:VOL=8
30 FOR PITCH=0 TO 255
40 SOUND VOICE,PITCH,TONE,VOL
50 NEXT PITCH
R U N
Varying the volume in a program produces a variety of sounds. Change
VOL = 8 to VOL = 0 and press
35 VOL=INT(RND(0)*16)
This line randomly selects a value between 0 and 15 for the volume
variable. Run the program to find out how randomly changing the
volume affects the sound.
Making Music
The SOUND command can produce musical tones as well. The follow-
ing scale includes musical notes and their pitch values:
Note
high C
B
A
G
F
E
D
C
B
A
G
F
E
D
middleC
Type and run the following program:
NEW
10 REM ** SIMPLE SONG
15 DIM PITCH$ (1)
20 VOICE=0:PITCH=0:TONE = 10:VOL = 8
30 REM ** C=121:D = 108:E=96:F=91
40 TRAP 300
50 PRINT "
"
. Then add the following line:
Pitch
29
31
35
40
45
47
53
60
64
72
81
91
96
108
121
67

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 65XE and is the answer not in the manual?

Table of Contents

Save PDF