Atari 65XE Owner's Manual page 73

Hide thumbs Also See for 65XE:
Table of Contents

Advertisement

60 PRINT "NOTES FOR SIMPLE SONG"
65 FOR NOTE= 1 TO 8
70 R E A D PITCH
80 SOUND VOICE,PITCH,TONE,VOL
90 GOSUB 200
100 PRINT:PRINT PITCH$
110 FOR PAUSE=1 TO 500 : N E X T PAUSE
120 SOUND 0,0,0,0
130 NEXT NOTE
140 GOTO 300
150 REM ** DATA FOR NOTES
160 DATA 121,121,108,96,96,91,108,121
200 REM ** PRINT NOTES
210 IF PITCH=121 THEN PITCH$="C"
220 IF PITCH=108 THEN PITCH$="D"
230 IF PITCH=96 THEN PITCH$="E"
240 IF PITCH=91 THEN PITCH$="F"
250 RETURN
300 PRINT: PRINT "END OF SIMPLE SONG":END
RUN
The GOSUB-RETURN and READ-DATA commands allow the computer
to produce different notes by inserting a series of values for the
variable PITCH. GOSUB tells the computer to go to the "subroutine"
that starts at line 200 and continues to line 250; the RETURN com-
mand sends the computer back to the line immediately below the
GOSUB line. The READ command tells the computer to pick up an
item in the DATA line and insert it into the variable. The computer con-
tinues to loop through the program until all the values in the DATA line
have been used.
The program also uses a FOR-NEXT loop to determine how long the
notes last. Using different FOR-NEXT loops, try modifying the program
to produce whole notes, half notes, and other kinds of notes.
For more information about programming with sound, read some of
the books and magazines listed in the Resources section of this guide.
COLORFUL GRAPHICS
Your ATARI 65XE has 16 graphics modes encompassing 128 colors.
To get you started, this section presents 6 different modes and some
of the most essential graphics commands.
The following chart lists the 16 basic colors and their corresponding
number values. (The colors vary somewhat according to the adjust-
ment of the hue control on your television set.)
68

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