Play different sounds

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Play different sounds

Post by JosepM » Wed Sep 21, 2011 4:00 pm

Hi,

I need join different sounds files and play it together. How can I do that?

Any experience?


Salut,
Josep

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Play different sounds

Post by Klaus » Wed Sep 21, 2011 4:34 pm

Hi Josep,

do you want to:
1. play them as ONE sound (one after another)?
2. play several sounds at the same time?


Best

Klaus

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Play different sounds

Post by JosepM » Wed Sep 21, 2011 11:53 pm

Hi Klaus,

I have some sound files and randomly I want join and play some of them, one after another, but without left any "blank" space between them. Must be hear a new sound from the product of the other sounds.

Salut,
Josep

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Play different sounds

Post by WaltBrown » Thu Sep 22, 2011 7:57 am

Josep,
If you have a list of sound file paths in gMyListOfSoundFiles, you could, say:

put true into tPlaySounds
send "playStopped" to this card

on playStopped
if tPlaySounds then play line random(the number of lines in gMyListOfSoundFiles) of gMyListOfSoundFiles
end playStopped

(This is pseudo code, I don't have any sound files to try it with).
Walt Brown
Omnis traductor traditor

Post Reply