BASIC FUNCTIONS SECTION 5.20
SOUND
5.20,5 Function SOUND generates a note of a specified frequency and length.
Syntax SOUND pitch,duration.
Example SOUND 121,530
Remark
VER.V09F
This will produce a middle 'C' note for one second.
The following program will play a short tune:
10 FOR I:1 TO 20
20 SOUND 52,1233/I
30 SOUND 46,1394/I
40 SOUND 59,1086/I
50 SOUND 121,530/I
60 SOUND 80,1202/I
70 FOR J:I TO 16
80 NEXT
J
90 NEXT I
99 END
Pitch and duration must be in the range 1 - 65,534,
A higher value for pitch will produce a lower note.
A higher value for duration will increase the length of the
note.
The formula, 64130/pitch, can be used to find the required
'duration' parameter to play a note of a specified pitch
for one second,
See section 9.12, FOUR OCTAVE SOUND RANGE, for parameters
to generate specific notes of required frequency,
PAGE 5 - 130