Chapter
10
I
BASIC
Keywords
NOISE
Statement
NOISE
source, volume,d uratwn
Generates noise through
a
TV monitor’s speaker (external
speaker).
Source
is an integer in the range
0
to
7.
It selects the type
of
noise. If
source
is in the range
0
to
3,
periodic noise is selected.
If
source
is in the range
4
to
7,
white noise is selected.
Periodic
White
Frequency
0 4 35795451512
1 5 357954511824
2 6 357954512048
3 7
frequency
of
Voice
2
(see
Volume
is an integer in the range
0
to
15
where
0
is the quietest
and
15
is the loudest.
Duration
is a numeric expression in the range
0
to
65535.
It sets
the duration
of
the noise.
A
duration
of
18.2
equals
1
second.
You must execute a SOUND
ON
statement before using NOISE
or
BASIC
returns an “Illegal function call” error.
SOUND).
Sample Programs
10 SOUND ON
20
FOR
I
=
0 TO
7
30
NOISE
I,
15,
250
40
PLAY
I1
I,
II
I,
“V0”
50 NEXT
I
>
,
224