Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Music file not playing
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
isaiahk9




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Asherel




PostPosted: 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.
isaiahk9




PostPosted: Fri May 09, 2008 8:08 pm   Post subject: RE:Music file not playing

Not any better . . .
TheGuardian001




PostPosted: 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.
Tony




PostPosted: 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")
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
isaiahk9




PostPosted: 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?
Asherel




PostPosted: 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?
jinjin




PostPosted: 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 ).
Sponsor
Sponsor
Sponsor
sponsor
isaiahk9




PostPosted: 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.
Tony




PostPosted: 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...
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
isaiahk9




PostPosted: 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.
rizzix




PostPosted: 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.
isaiahk9




PostPosted: 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?
Saad




PostPosted: 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
isaiahk9




PostPosted: 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?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 19 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: