|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Playing several sounds together or one after anotherHi,
Assume we have three sound define in a node as follows; local sound1= sound '.../sound1.ogg" local sound2= sound '.../sound2.ogg" local sound3= sound '.../sound3.ogg" 1. How is that possible to play all the sounds: sound1, sound2, and sound 3 together? sound {sound1,sound2,sound3}. sound1:play() sound2:play() sound3:play() Is this code right? 2. How can I play one sound after another, like a play list? should we use the pipmak schedule to trigger say sound2 after sound 1 is played? and if so, how do you define the interval for the pipmak.schedule? do we do trial and error or there is a way to calculate accuratly when pipmak must tringer sound 2!!! I tried to give the exact length ( in miliseconds) in the interval schedule, but it plays sound2 very early and it overlaps with sound1. Any hlep would be grealty appreciated. cs |
|
|
Re: Playing several songs together or one after anotherchikitin wrote:
> Hi, Assume we have three sound define in a node as follows; local > sound1= sound '.../sound1.ogg" local sound2= sound '.../sound2.ogg" > local sound3= sound '.../sound3.ogg" 1. How is that possible to play all > the sounds: sound1, sound2, and sound 3 together? This code doesn't > work: sound {sound1,sound2,sound3}. Is this code right? sound1:play() > sound2:play() sound3:play() Yes, that should work. It might not be accurate enough if you require the sounds to overlap exactly, but I'd expect the differences to be on the order of microseconds. > 2. How can I play one sound after another, like a play list? should we > use the pipmak schedule to trigger say sound2 after sound 1 is played? Yes, exactly. Unfortunately, this is not accurate enough for seamless concatenation of the sounds - you'll have an unpredictable gap of several milliseconds. Seamless concatenation is just not possible at the moment. > and if so, how do you define the interval for the pipmak.schedule? In the current development version of Pipmak, sounds have a duration() method that you can use for that purpose. In Pipmak 0.2.7, your only option is determining the duration of your sounds beforehand and hardcoding it in your script. > I tried to give the exact length ( in miliseconds) in the interval > schedule, but it plays sound2 very early and it overlaps with sound1. pipmak.schedule() takes seconds, not milliseconds. -Christian PS: If you intend to continue to post on this mailing list, you're invited to subscribe. The advantage for you is that your posts appear on the list immediately, and the advantage for me is that I don't have to approve all of your posts manually (the moderation requirement for non-subscribers is just to keep the spam out). You can turn off e-mail delivery in your subscription options if you prefer to read the list on Nabble. ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Pipmak-Users mailing list Pipmak-Users@... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
| Free embeddable forum powered by Nabble | Forum Help |