home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / music / exam01.dba next >
Encoding:
Text File  |  2000-04-09  |  1.1 KB  |  46 lines

  1. Rem * Title  : Load and Play Music
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem =============================================
  5. rem DARK BASIC EXAMPLE PROGRAM 1
  6. rem =============================================
  7. rem This program will load and play a music file
  8. rem ---------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. rem This command will load a midi music file into number one
  14. load music "music1.mid",1
  15. print "music file music1.mid loaded"
  16.  
  17. rem Play the music that was loaded into number one
  18. play music 1
  19.  
  20. rem Check is music number one is playing
  21. if music playing(1)=1
  22.     print "The music number one is playing"
  23. endif
  24.     
  25. rem Check is music playing been looped
  26. if music looping(1)=0
  27.     print "The music playing is not looping"
  28. else
  29.     print "The music playing is looping"
  30. endif
  31.  
  32. print
  33. print "press spacekey to quit"
  34.  
  35. rem Will wait for you to press any key
  36. suspend for key
  37.  
  38. rem Stop the music from playing
  39. stop music 1
  40.  
  41. rem Delete music from memory and free the music number used
  42. delete music 1
  43.  
  44. rem End the program
  45. end
  46.