TGC Codebase Backup



Music loader/Player by Immense

5th Aug 2005 6:29
Summary

This program loads an file and plays it.



Description

This is a little piece of program that i use for my game.
It searches for a music + (music number) + .midi. So you'll need an music0.midi or music23.midi in your folder. max music files is 50.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                       do
      if music playing(1)=0
         load music "music +musicnr#+ .midi", 1
        
         if music exist(1)
            play music 1
         else
            if musicnr#=50
               musicnr#=0
            else
               musicnr#+1
            endif
         endif
      endif
   loop