Author |
Message |
kokolovehuh
|
Posted: Mon May 26, 2008 7:53 pm Post subject: 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?  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Hendo

|
Posted: Mon May 26, 2008 8:23 pm Post subject: 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
code: | process bgmusic
%code to play music here
end bgmusic
|
and then you play your music by calling your process:
my turing is really rusty so someone might have to clean that up |
|
|
|
|
 |
Insectoid

|
Posted: Mon May 26, 2008 8:31 pm Post subject: RE:Adding Background Music |
|
|
code: |
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

|
Posted: Mon May 26, 2008 8:35 pm Post subject: RE:Adding Background Music |
|
|
yeah use mp3's for music and wavs for sound effects |
|
|
|
|
 |
kokolovehuh
|
Posted: Mon May 26, 2008 9:49 pm Post subject: Re: RE:Adding Background Music |
|
|
insectoid @ Mon May 26, 2008 8:31 pm wrote: code: |
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
|
Posted: Mon May 26, 2008 10:00 pm Post subject: RE:Adding Background Music |
|
|
It's Music.PlayFile ("song.mp3") . F is capital. |
|
|
|
|
 |
Insectoid

|
Posted: Tue May 27, 2008 9:19 am Post subject: 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

|
Posted: Tue May 27, 2008 12:03 pm Post subject: 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.  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
|