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

Username:   Password: 
 RegisterRegister   
 Playing a midi file in the background and having it loop
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
PHP God




PostPosted: Mon May 26, 2003 5:17 pm   Post subject: Playing a midi file in the background and having it loop

I am making a game, and I made some midi files for it. How can I make the music loop continuosly throughout, while allowing the user to toggle it.
Sponsor
Sponsor
Sponsor
sponsor
Asok




PostPosted: Mon May 26, 2003 5:19 pm   Post subject: (No subject)

put it into a process. fork the process on command from the user.
PHP God




PostPosted: Mon May 26, 2003 5:21 pm   Post subject: (No subject)

what is a process and how the hell do I fork (total noob)
Catalyst




PostPosted: Mon May 26, 2003 5:22 pm   Post subject: (No subject)

code:
process play
Music.PlayFile ("blah.midi")
end play

fork play

loop
%%blah
end loop

Solo




PostPosted: Mon May 26, 2003 5:33 pm   Post subject: To keep it playing.

Catalyst wrote:
code:
process play
     loop % add this loop if you want it to keep playing
          Music.PlayFile ("blah.midi")
     end loop
end play

fork play

loop
%%blah
end loop

PHP God




PostPosted: Mon May 26, 2003 7:19 pm   Post subject: (No subject)

wow, I'll never forget that one, can anyone tell me what page of the manual that stuff is on?
PHP God




PostPosted: Mon May 26, 2003 7:43 pm   Post subject: (No subject)

code:

process music
 Music.PlayFile ("intro.mp3")
 loop
 Music.PlayFile ("loop.mp3")
 end loop
end music


thats a code i wrote, so to start the music i just have to go

code:

fork music


??? It doesn't work.
void




PostPosted: Mon May 26, 2003 8:49 pm   Post subject: (No subject)

code:

process bg_sound
loop
Music.PlayFile("yourfile.wma")
end loop
end bg_sound

fork bg_sound

it prolly din work because turing doesnt read MP3 files..only wma...or something like that...im not sure...i've never used songs in my proggiez
Sponsor
Sponsor
Sponsor
sponsor
Solo




PostPosted: Mon May 26, 2003 9:11 pm   Post subject: Waves.

I know wave files are huge, but they are what turing reads the best, i suggest using them.
krishon




PostPosted: Mon May 26, 2003 9:28 pm   Post subject: (No subject)

but u know turing can play mp3 rite, but only the newer one can, 4.04b
void




PostPosted: Mon May 26, 2003 9:54 pm   Post subject: (No subject)

nice avatar krishon....and yes the 4.04b and 4.04c play mp3...but all others dont
PHP God




PostPosted: Thu May 29, 2003 5:45 am   Post subject: (No subject)

is there anywhere I can get a free version or a BETA of 4? I'm runnin on 3.
Dan




PostPosted: Thu May 29, 2003 10:18 pm   Post subject: (No subject)

we cant relay give you a driect link or tom west will try and shut us down but...

*cough* turing subsmions *cough*

i am shure you may get your hands on a copy.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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  [ 13 Posts ]
Jump to:   


Style:  
Search: