home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l196 / 3.ddi / MUSIC.BA$ < prev    next >
Encoding:
Text File  |  1990-06-24  |  851 b   |  40 lines

  1. ' Turn on trapping of background music events:
  2. PLAY ON
  3.  
  4. ' Branch to the Refresh subroutine when there are fewer than
  5. ' two notes in the background music buffer:
  6. ON PLAY(2) GOSUB Refresh
  7.  
  8. PRINT "Press any key to start, q to end."
  9. Pause$ = INPUT$(1)
  10.  
  11. ' Select the background music option for PLAY:
  12. PLAY "MB"
  13.  
  14. ' Start playing the music, so notes will be put in the
  15. ' background music buffer:
  16. GOSUB Refresh
  17.  
  18. I = 0
  19.  
  20. DO
  21.  
  22.     ' Print the numbers from 0 to 10,000 over and over until
  23.     ' the user presses the "q" key. While this is happening,
  24.     ' the music will repeat in the background:
  25.     PRINT I
  26.     I = (I + 1) MOD 10001
  27. LOOP UNTIL INKEY$ = "q"
  28.  
  29. END
  30.  
  31. Refresh:
  32.  
  33.     ' Plays the opening motive of
  34.     ' Beethoven's Fifth Symphony:
  35.     Listen$ = "t180 o2 p2 p8 L8 GGG L2 E-"
  36.     Fate$   = "p24 p8 L8 FFF L2 D"
  37.     PLAY Listen$ + Fate$
  38.     RETURN
  39.  
  40.