Charlie Veniot 25th September 2022 at 1:31am
1 REM ** Random Music **
2 ' GW-BASIC Made Easy, Chapter 7. File: GWME0702.BAS 10 CLS : KEY OFF
20 RANDOMIZE TIMER 'Scramble the RND function
30 PRINT "Random music. Press ESC to stop."
40 WHILE INKEY$ <> CHR$(27)
50 frequency = 2000 * RND + 37 'Random between 37 & 2037
60 duration =1 '1 tick, about 1/18 second
70 SOUND frequency, duration
80 WEND