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? ![Idea Idea](http://compsci.ca/v3/images/smiles/icon_idea.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Hendo
![](http://compsci.ca/v3/uploads/user_avatars/1049240745485a9912c2ba0.jpg)
|
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 |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
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. |
|
|
|
|
![](images/spacer.gif) |
Hendo
![](http://compsci.ca/v3/uploads/user_avatars/1049240745485a9912c2ba0.jpg)
|
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 |
|
|
|
|
![](images/spacer.gif) |
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' |
|
|
|
|
![](images/spacer.gif) |
CodeMonkey2000
|
Posted: Mon May 26, 2008 10:00 pm Post subject: RE:Adding Background Music |
|
|
It's Music.PlayFile ("song.mp3") . F is capital. |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
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. |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
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. ![Twisted Evil Twisted Evil](http://compsci.ca/v3/images/smiles/icon_twisted.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
|