' SOUND-1.BAS
' This program demonstrates the SOUND statement.

CLS

INPUT "Please enter an octave value (1-7):  ", octave%

' play one octave

FOR i% = 1 TO 8
    READ note%                           ' read frequency of note
    note% = note% * (2 ^ octave%)        ' raise note to desired octave
    SOUND note%, 12                      ' play note
NEXT i%

' frequencies of the major notes in the second octave

DATA 65, 73, 82, 87, 98, 110, 123, 131

