« Return to Thread: Playing several sounds together or one after another

Playing several sounds together or one after another

by chikitin :: Rate this Message:

Reply to Author | View in Thread

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?

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







 « Return to Thread: Playing several sounds together or one after another