
-----------------------------------
kokolovehuh
Mon May 26, 2008 7:53 pm

Adding Background Music
-----------------------------------
I have had a trouble recently in putting the background into my program, the file type is mp3/wav.
What I want to do is basically NOT to make the music like a block, which means the rest of the program runs after all the music,
and eventually the music is playing but the program is still running, kind of like a background

Can anybody help me out, please? :idea:

-----------------------------------
Hendo
Mon May 26, 2008 8:23 pm

RE:Adding Background Music
-----------------------------------
i havent done turing in a while but what you would want to do is make a process

so something like

process bgmusic
%code to play music here
end bgmusic


and then you play your music by calling your process:
fork bgmusic

my turing is really rusty so someone might have to clean that up

-----------------------------------
Insectoid
Mon May 26, 2008 8:31 pm

RE:Adding Background Music
-----------------------------------

process playmusic
     Music.Playfile ("song.mp3")
end playmusic
fork playmusic


don't use a wav file, they can't 'fork'. Only 1 wav can be played at a time i.e. calling another wav will cancel out your background.

-----------------------------------
Hendo
Mon May 26, 2008 8:35 pm

RE:Adding Background Music
-----------------------------------
yeah use mp3's for music and wavs for sound effects

-----------------------------------
kokolovehuh
Mon May 26, 2008 9:49 pm

Re: RE:Adding Background Music
-----------------------------------

process playmusic
     Music.Playfile ("song.mp3")
end playmusic
fork playmusic


don't use a wav file, they can't 'fork'. Only 1 wav can be played at a time i.e. calling another wav will cancel out your background.

ok, but then there is an error at the line  "Music.Playfile ("song.mp3")"

it says: 'Playfile is not in the export list of 'Music'

-----------------------------------
CodeMonkey2000
Mon May 26, 2008 10:00 pm

RE:Adding Background Music
-----------------------------------
It's Music.PlayFile ("song.mp3") . F is capital.

-----------------------------------
Insectoid
Tue May 27, 2008 9:19 am

RE:Adding Background Music
-----------------------------------
Oops...

The trick to making these things work is to swith out capitals until the word turns from blue to black.

-----------------------------------
Sean
Tue May 27, 2008 12:03 pm

Re: Adding Background Music
-----------------------------------
Or, if you can't seem to get it right. F10 it and search for it. You'll surely get it done faster that way then by capitalizing random letters.  :twisted:
