Computer Science Canada

Music file not playing

Author:  isaiahk9 [ Fri May 09, 2008 7:21 pm ]
Post subject:  Music file not playing

I made this very simple code to test some sound files I have :

loop
Music.PlayFile ("020-Teleport03.WAV")
end loop

. . . but the code doesn't work - the sound won't play. I cannot attach the sound file because compsci doesn't support MP3, WAV or MIDI. Any ideas why it doesn't work?
(The sound in particular is from RPG maker)


And, if there is no way to make it work, does anybody know where I could find a bunch of fantasy-sound effects (fire, explosions, lightning, swords)?
thanx,
isaiahk9

Author:  Asherel [ Fri May 09, 2008 7:58 pm ]
Post subject:  Re: Music file not playing

Turing:

process DoMusic
Music.PlayFile ("00-Teleport03.wav")
end DoMusic

fork DoMusic


Try this.

Author:  isaiahk9 [ Fri May 09, 2008 8:08 pm ]
Post subject:  RE:Music file not playing

Not any better . . .

Author:  TheGuardian001 [ Fri May 09, 2008 9:22 pm ]
Post subject:  Re: Music file not playing

well, for one, make sure the sound is in the right directory.
if it already is, try shortening the file name. I know that sounds pointless, but it's worked for me before.

Author:  Tony [ Fri May 09, 2008 10:56 pm ]
Post subject:  Re: Music file not playing

Asherel @ Fri May 09, 2008 7:58 pm wrote:
Turing:

process DoMusic
Music.PlayFile ("00-Teleport03.wav")
end DoMusic

fork DoMusic


A shortcut for this is simply Music.PlayFileReturn("00-Teleport03.wav")

Author:  isaiahk9 [ Sat May 10, 2008 7:21 am ]
Post subject:  RE:Music file not playing

Still doesn't work. Would the fact that it was exported out of RPG maker resource manager make a difference.
When exported, the sound files were originally going to be made .ogg files, but I just tacked on .wav to turn them into wav files. Would that make a difference?

Author:  Asherel [ Sat May 10, 2008 8:54 am ]
Post subject:  Re: Music file not playing

Is your music file in the same directory as the saved program is in?

Author:  jinjin [ Sat May 10, 2008 9:35 am ]
Post subject:  Re: RE:Music file not playing

isaiahk9 @ Sat May 10, 2008 7:21 am wrote:
Still doesn't work. Would the fact that it was exported out of RPG maker resource manager make a difference.
When exported, the sound files were originally going to be made .ogg files, but I just tacked on .wav to turn them into wav files. Would that make a difference?


Does it play properly as a wav on any standard media player you have (i.e. Windows Media Player)? If not, then it is certain that the data itself is corrupt. In that case, I would suggest you use an official ogg to mp3 converter (I don't know of any good ones in particular, but I'm sure you can find one with Google Smile ).

Author:  isaiahk9 [ Sat May 10, 2008 11:22 am ]
Post subject:  RE:Music file not playing

Yes, the file works wonderfully on when double-clicked ; it goes straight to windows media player and then it plays the file.

Author:  Tony [ Sat May 10, 2008 11:58 am ]
Post subject:  Re: RE:Music file not playing

isaiahk9 @ Sat May 10, 2008 7:21 am wrote:
When exported, the sound files were originally going to be made .ogg files, but I just tacked on .wav to turn them into wav files. Would that make a difference?


Doh! WTF? You can't possible be serious about this...

Author:  isaiahk9 [ Sat May 10, 2008 3:17 pm ]
Post subject:  RE:Music file not playing

What's wrong. When exported, the files were under the type All Files. When exported without changing anything, the files were ogg. But when .wav was added onto the name of the file, then they became wave files.

Author:  rizzix [ Sat May 10, 2008 3:21 pm ]
Post subject:  RE:Music file not playing

Changing the extension will not change the file type. It only changes the way the OS handles the file. I.e which program should open it etc.

Also some programs which are file-extension dependent will not function correctly if the file-types and extensions do not match.

Author:  isaiahk9 [ Sat May 10, 2008 4:28 pm ]
Post subject:  RE:Music file not playing

Uh, rizzix I think I actually changed the file type - right click, properties,
Type of file : Wave Sound
Opens with : Windows Media Player
Size : 27.0 KB (27,706 bytes)
Size on Disk : 28.0 KB (28,672 bytes)

And if I cannot use it in Turing, then any idea how I could get all the fantasy sound effects I need, or to convert the sounds to something Turing can handle?

Author:  Saad [ Sat May 10, 2008 4:33 pm ]
Post subject:  Re: RE:Music file not playing

isaiahk9 @ Sat May 10, 2008 4:28 pm wrote:
Uh, rizzix I think I actually changed the file type - right click, properties,
Type of file : Wave Sound
Opens with : Windows Media Player
Size : 27.0 KB (27,706 bytes)
Size on Disk : 28.0 KB (28,672 bytes)

And if I cannot use it in Turing, then any idea how I could get all the fantasy sound effects I need, or to convert the sounds to something Turing can handle?


No, you changed the file extension. The OS determines the type of the file from the extension

Author:  isaiahk9 [ Sat May 10, 2008 6:23 pm ]
Post subject:  RE:Music file not playing

OK . . .
So how do I check the file from that extension?
And is there any way to use it in Turing. I can not convert it, if only the file extension is WAV, b/c these had to be exported out of RPG maker - they came with it.
And again, if it is not possible to use these sound effects in Turing, does anyone know any of these types of sound effects :
Teleportation
Explosion
Cannon
Thunder/lightning
Animals
Monster roaring
Attacks (swords and bows)
Healing
Fire
Ice
Water
Earth
Wind
Dark (magic)
Light (magic)
PS - these sound effect came from Legend of Zelda ; Fallen Sage. Does anybody know where to get those sound effects if not from RPG maker?

Author:  Tony [ Sat May 10, 2008 9:08 pm ]
Post subject:  Re: RE:Music file not playing

isaiahk9 @ Sat May 10, 2008 4:28 pm wrote:
Uh, rizzix I think I actually changed the file type - right click, properties

And if you rename the file to be 00-Teleport03.exe, the OS will claim it to be of an "Executable" type and will try to run it as an application. Tell me if you think there's a flaw with this way of creating applications...

Author:  gitoxa [ Sat May 10, 2008 9:26 pm ]
Post subject:  Re: Music file not playing

You said it was exported out as .ogg? Google an audio editing program, such as Audacity, to convert the file to something else.

Author:  isaiahk9 [ Sun May 11, 2008 7:30 am ]
Post subject:  RE:Music file not playing

Tony - yeah I get it.
gitoxa - I used Audacity, and changed the file into a .wav, but it still won't play. . .

Author:  isaiahk9 [ Sun May 11, 2008 7:37 am ]
Post subject:  RE:Music file not playing

OK, thanks everyone, I finally found a way to play the sound effects in Turing. If anyone's curious, here's what I did :
Exported the files out of RPG Maker (there are ton of great sound effects)
Used Audacity audio converter and exported the files again as wav files. For some reason, they will only play if I rename them under shorter names - instead of "123-Thunder01" I renamed it "Thunder".
Thanks everybody for helping me with this problem (especially gitoxa!)


: