Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: PIT on Mon 27/11/2006 22:54:58

Title: MIDI Files
Post by: PIT on Mon 27/11/2006 22:54:58
I'm confused with my game MIDI files.
Sometimes they won't play.
It is named MUSIC1 and my game says PlayMusic(1);
but it still wont play
Does anyone else have this problem?
And could someone help me?
Title: Re: MIDI Files
Post by: Ishmael on Wed 29/11/2006 13:04:07
Where did you put the file? Are you sure the filename is 'music1.mid' and not just 'music1'? Made sure you haven't disabled the midi device in the game setup?
Title: Re: MIDI Files
Post by: Gilbert on Wed 29/11/2006 13:14:29
Or even, make sure that it's not called music1.mid.mid, which can be a common mistake for people keeping the stupid "hide known extensions" option checked in explorer.
Title: Re: MIDI Files
Post by: Joe on Wed 29/11/2006 18:17:53
Or maybe your computer MIDI volume is set to "0"

More details here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=28307.0)
Title: Re: MIDI Files
Post by: PIT on Wed 29/11/2006 23:51:59
As I said:

Quote from: PIT on Mon 27/11/2006 22:54:58
Sometimes they won't play.

emphisis on 'Sometimes'
Title: Re: MIDI Files
Post by: on Thu 30/11/2006 00:09:56
PlayMusic(1);

Some tips:
- You may need to make sure you music file is called music01.mid, music02 - the "0" could be important
- You need to make sure your filename is all in lower case
- You need to make sure there isn't an MP3 of the same name (i.e. music1.mp3)
- You'll need to make sure the file extension (mid) is in LOWERCASE and NOT in uppercase. Music1.MID could cause problems, whereas Music1.mid will not

The fact you're emphasising "sometimes" means it's a problem related to your machine. I don't think anyone else has these problems, I certainly never have and I've used MIDI in AGS games for years.
Title: Re: MIDI Files
Post by: PIT on Thu 30/11/2006 00:32:06
I tried all those tactics, and it still won't play.
All my volumes are turned up all the way, my speakers are at ther max, (every little sound hurts my ears) and still the won't work.

What does this mean?:

Quote from: Ishmael on Wed 29/11/2006 13:04:07
Made sure you haven't disabled the midi device in the game setup?
Title: Re: MIDI Files
Post by: Khris on Thu 30/11/2006 08:28:55
About that "sometimes":

Do you mean that sometimes 1 will play, sometimes not?
Or do you mean that e.g. 2 plays fine, but 1 doesn't?

IIRC, somebody else has experienced this; the solution was a corrupted midi-file.
Title: Re: MIDI Files
Post by: PIT on Thu 30/11/2006 23:57:59
Yeah Sometime 1 will play sometimes not.
My midi file is not corrupt, it plays in Quicktime and Windoes Media Player.