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

Username:   Password: 
 RegisterRegister   
 music help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
4sak3nX




PostPosted: Wed May 05, 2010 9:36 am   Post subject: music help

Hey all

i am adding music into a game in turing. The song wont play but when i change the song it does. The sond that i want to play worrks in itunes.

the code is

Turing:

process startmusic
Music.PlayFile ("gamestart.mp3")
end start music

fork startmusic

%%% the rest of the code is as follows and is irrelavent.



I am using the latest version of turing (4.1.1)
the sound file is in the same folder as the save
i am unsure why it wont work.

Thanks for the help
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed May 05, 2010 10:44 am   Post subject: RE:music help

If this particular file plays elsewhere, and not with Turing, then there's some chance that it is encoded in a way that Turing can't figure out.

Try exporting it as a .wav file, and see if that works.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
hamid14




PostPosted: Wed May 05, 2010 11:06 am   Post subject: Re: music help

Maybe it's DRM protected and as Tony said, Turing cannot decode the protected mp3. If you purchased it from itunes, its 100% DRM protected. Confused
Tony




PostPosted: Wed May 05, 2010 12:49 pm   Post subject: Re: music help

hamid14 @ Wed May 05, 2010 11:06 am wrote:
If you purchased it from itunes, its 100% DRM protected. Confused

It's not 100%, as iTunes sells DRM-free tracks as well; though DRM is an example of why a file might be played in some players but not via others.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DtY




PostPosted: Wed May 05, 2010 2:48 pm   Post subject: Re: music help

Tony @ Wed May 05, 2010 12:49 pm wrote:
hamid14 @ Wed May 05, 2010 11:06 am wrote:
If you purchased it from itunes, its 100% DRM protected. Confused

It's not 100%, as iTunes sells DRM-free tracks as well; though DRM is an example of why a file might be played in some players but not via others.


iTunes has not sold any DRM protected music for a while, but if it's from iTunes, it wont be mp3 anyway.

On another note, does Turing even play mp3? I thought it would only play uncompressed wavs.
Insectoid




PostPosted: Wed May 05, 2010 2:51 pm   Post subject: RE:music help

It plays MP3s. Actually in my experience it's better to use them, as Turing refuses to play more than 1 WAV at a time. 4.0.9 did at least (the version my school used). I don't remember how 4.1 handles them.
TheGuardian001




PostPosted: Wed May 05, 2010 2:54 pm   Post subject: Re: music help

Turing will only play one of any file type at a time, not just wav. In fact, the Turing documentation specifies that one way to stop a sound from playing is by playing an empty file of the same file type.

And yeah, turing does support mp3, although the slightest error in the file will cause it to fail entirely.
Tony




PostPosted: Wed May 05, 2010 3:17 pm   Post subject: Re: music help

TheGuardian001 @ Wed May 05, 2010 2:54 pm wrote:
Turing will only play one of any file type at a time, not just wav.

That seems to be the documented way to play more than one sound clip in parallel -- WAV + MP3 + MIDI == 3 tracks at the same time.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
copthesaint




PostPosted: Wed May 05, 2010 7:00 pm   Post subject: Re: music help

4sak3nX @ Wed May 05, 2010 wrote:

Turing:

process startmusic
Music.PlayFile ("gamestart.mp3")
end start music

fork startmusic



Now I dont want to solve this problem so easily, but you have an end statement with the incorrect process name. If that still doesnt work, try running the music with windows XP, turing has some issues playing music on vista when the code is not compiled (generated stand alone program). Anyways if your using mac, Then I dont know what errors you will get, just make sure the music file is besides your program.

Tony @ Wed May 05, 2010 wrote:
TheGuardian001 @ Wed May 05, 2010 2:54 pm wrote:
Turing will only play one of any file type at a time, not just wav.

That seems to be the documented way to play more than one sound clip in parallel -- WAV + MP3 + MIDI == 3 tracks at the same time.


turing suggests wav for sound effects, midi for music, mp3 for either
TheGuardian001




PostPosted: Wed May 05, 2010 8:00 pm   Post subject: Re: music help

Sorry, could have been clearer with that.

Turing can only play one file of any one type at a time. The number of individual files that can be played is only limited by the number of extensions you use.
4sak3nX




PostPosted: Thu May 06, 2010 9:32 am   Post subject: RE:music help

thanks all for the help. Turns out i downloaded a file that when converted to wav it worked.

and the error in the code in the OP was an error in typeing by me. I was putting it in from another computer and the code was on my laptop. It was not the issue
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 1  [ 11 Posts ]
Jump to:   


Style:  
Search: