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

Username:   Password: 
 RegisterRegister   
 Multiple Sounds at the same time
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
solinent




PostPosted: Mon Dec 17, 2007 5:10 pm   Post subject: Multiple Sounds at the same time

I understand that it is impossible to play more than one sound at the same time with Music.PlayFile, unless they are different types (midi, wav, or cd), but is there a workaround?


Details that probably do not matter:
I can code in other languages, but this is for a culminating (final project) in turing, so it won't work as such.

Right now, you'd have to use a combination of Midi and wav. However, I don't know how to generate a midi file (I could do this, but would prefer a more elegant solution), and I have the wav files. I have to play two at the same time, for sure. The game I am making is space invaders, so I can't have static bg music, as it increases as the speed increases.

I have to use Turing 4.0 I believe, but I don't think he'd get angry if I used Turing 4.1, as that's the freely available one.

The only things I could think of is to call a seperate program that plays files (which may not be allowed), or just live with sounds truncating other sounds (which sucks, by the way).

Thanks
Sponsor
Sponsor
Sponsor
sponsor
Ultrahex




PostPosted: Thu Dec 20, 2007 11:13 am   Post subject: Re: Multiple Sounds at the same time

Convert using something like dBpoweramp, or another alternative.... the only other thing you could do is write a library (i believe it is C that Turing is Programmed in). And import it in... but it seems like a much waste of your time so it would be in your better interest i think just to change the audio type.
isaiahk9




PostPosted: Wed May 07, 2008 7:22 pm   Post subject: RE:Multiple Sounds at the same time

why don't you go like this :
process sound1
Music.PlayFile ("sound1.MIDI")
end sound1

process sound2
Music.PlayFile ("sound2.WAV")
end sound2

fork sound1
fork sound2


A lot of people don't like processes, but I've never run into any problems with them.
CodeMonkey2000




PostPosted: Wed May 07, 2008 8:56 pm   Post subject: RE:Multiple Sounds at the same time

Processes are fine for music, but for anything else it's bad. Processes are bad because it messes up your program flow, and because process aren't well implemented in Turing.
r691175002




PostPosted: Wed May 07, 2008 9:02 pm   Post subject: Re: Multiple Sounds at the same time

In this case I would suggest threads/processes however always remember that as soon as multiple threads are playing with the same data things get complicated.
CreatedByGabe




PostPosted: Fri Jun 05, 2015 10:14 pm   Post subject: RE:Multiple Sounds at the same time

Like said above, You can just make them processes so they can "Process at the same time!"



P.S I understand that under my name says that I'm A newbe its becasue it's this account!
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  [ 6 Posts ]
Jump to:   


Style:  
Search: