Author |
Message |
NE0
|
Posted: Fri Jun 02, 2006 3:51 pm Post subject: (No subject) |
|
|
i know this might not be the right place to ask but is there a way ( i've already searched ) to load the music files on a loading screen or at another time in my game because i have my music file in a process statement but it has to load the music file before i start to play my game creating atleast a 10 second wait and the music file isnt really that big but im running it of a floopy (i have to because im switching computers alot). if there is a way can you guys help me?
regards NE0 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: Fri Jun 02, 2006 3:58 pm Post subject: (No subject) |
|
|
I would suspect that this is directly a result of using a floppy. Simply paste its contents onto the harddrive of whatever PC you're at and work from
there. Don't forget to resave after.
If this doesn't work, repost this question in [Turing Help] and attach some code as well so we get a better idea of your situation.
Also, if you're using a process, you might want to look into Music.PlayFileReturn() instead, since that will make your life easier. |
|
|
|
|
|
little_guy9
|
Posted: Mon Apr 16, 2007 12:21 am Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
Would there be some coding that could replace Music.PlayFileLoop, for those of us who don't have that version? |
|
|
|
|
|
Clayton
|
Posted: Mon Apr 16, 2007 10:04 am Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
This sort of question would've been better suited to be posted in [Turing Help]. However, it's here now so I'll answer it.
Seeing as you don't have Music.PlayFileLoop() at your disposal, you simply need to loop within a process and have a (global) variable to keep track of whether or not to keep playing or not. This would be accompanied by a Music.Stop() in your mainline that will trigger your boolean to be false, thus exiting your process. |
|
|
|
|
|
MichaelM
|
Posted: Fri Jan 25, 2008 4:46 pm Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
I was just reading this topic and I thought this link might be helpful for anyone trying to program some music by frequency:
http://www.phy.mtu.edu/~suits/notefreqs.html
Note you'd have to round the frequencies off. |
|
|
|
|
|
faulkner16
|
Posted: Thu Feb 21, 2008 6:39 pm Post subject: RE:[Tutorial]How to use sound and music in Turing |
|
|
what is the A with the ^ over it? |
|
|
|
|
|
harishmabish
|
Posted: Sat Mar 29, 2008 5:19 pm Post subject: RE:[Tutorial]How to use sound and music in Turing |
|
|
do wav and other sound type files work better than mp3? because i encoded in mp3, and the sounds seem delayed, so are other formats faster? |
|
|
|
|
|
angelsz
|
Posted: Tue May 20, 2008 12:10 am Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
How does Music.Soundoff work ? o.o
if i have ..
Music.PlayFile ("abc.mp3")
code code code
delay (1000)
Music.SoundOff
it continues to play.. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Tue May 20, 2008 12:59 am Post subject: RE:[Tutorial]How to use sound and music in Turing |
|
|
You should probably notice that none of your "code code code" executes while the sound file is playing. You likely meant to use Music.PlayFileReturn() |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
angelsz
|
Posted: Tue May 20, 2008 7:50 am Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
oh okay thanks o.o |
|
|
|
|
|
mrt2323
|
Posted: Wed Apr 01, 2009 11:32 pm Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
So umm playing mp.3 files in the background? how do u do that? plz and thank you |
|
|
|
|
|
Krocker
|
Posted: Sat Dec 04, 2010 8:32 am Post subject: RE:[Tutorial]How to use sound and music in Turing |
|
|
hey guys, i dont get what the fork command is for. whats does it do? Also, how do u stop the music when there is an input.
ex
in name = john
then
% End the music%
blah blah
end if
any one? |
|
|
|
|
|
Insectoid
|
Posted: Sat Dec 04, 2010 6:26 pm Post subject: RE:[Tutorial]How to use sound and music in Turing |
|
|
Fork executes a process that runs side-by-side with the rest of your program. More recent versions of Turing have the function Music.PlayFileLoop() built in, so there is no need to use processes or fork() anymore.
Music.PlayFileLoop() will play loop a sound file while allowing the rest of your program to execute. Music.PlayFileStop() will halt the sound. |
|
|
|
|
|
Dragon20942
|
Posted: Sun Jan 02, 2011 1:23 pm Post subject: Re: [Tutorial]How to use sound and music in Turing |
|
|
My music creates a lot of lag in the program. Is there any way to eliminate that? Even something like this:
code: |
process moo
loop
Music.PlayFile("something.mid")
end loop
end moo
View.Set ("offscreenonly")
loop
fork moo
drawfillbox (0,0,maxx,maxy,Rand.Int (0,255))
View.Update
end loop
|
completely wrecks my program. |
|
|
|
|
|
Insectoid
|
Posted: Sun Jan 02, 2011 1:27 pm Post subject: RE:[Tutorial]How to use sound and music in Turing |
|
|
You're calling fork in a loop, so every time your program iterates it creates a new instance of moo. With potentially thousands of instances running at a time, this is going to lag.
Try putting the fork call outside the loop. |
|
|
|
|
|
|