EasyManua.ls Logo

Commodore Plus 4 - Page 120

Commodore Plus 4
234 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
This
program
plays
a
song
by
reading
a
list
of
DATA
statements.
The
DATA
statements
are
in
pairs
The
first
number
is
the
note
value
for
the
SOUND
command
and
the
second
number
is
the duration
for
the
SOUND
command
Row
Boat
10
VOL
8
20
DO
30
READ
X,
Y
40
SOUND
1.X.Y
45FORD=1
TO550:NEXT
50
LOOP
UNTIL
X=0
60
END
100
DATA
169
110
DATA
262
120
DATA
262
130
DATA
453
140
DATA
345
150
DATA
383
160
DATA
169
200
DATA
0,
0
45,
169,45,
169,
30
15,
345,45,345,30
345,30,
383,
15
596,45,453,45
169,45,453,30
This
loop
creates
a
brief
delay
between
notes
--
15,
60,
45,
15.
60
345,30,262,
15
This
program
plays
notes
going
up
and
down
scales
at
different
speeds,
and
displays
some
color
bars
along
with
Ihem.
10
VOL
8
20
DO
30D
=
INT(RND(0)
'5)-
2:
REM
DURATION
40S
=
INT(RND(0)
'300)-
700
:
REM
START
50R-INT(RND(0)'(1020
S)}:
REM
RANGE
60P-INT(RND(0)*30)-
5:
REM
STEP
70T
=
SGN(RND(l)
-
.5):
IF
T
=
0
THEN
70
80FORZ
=
STOS
+
T'RSTEPP^T
90
SOUND
l.Z.D
100Y
=
{ZAND15)
+
1:FORX-1TOD
110
PRINT
CHR$(18);:COLOR1.
Y:
PRINT'1
120
NEXT
X,Z
130
LOOP
-
these
REMark
state
ments
help
you
keep
track
of
which
line
does
what
_
leave
a
space
here

Other manuals for Commodore Plus 4

Related product manuals