LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to play multiple sound file at once in LabVIEW?

Hi I'm creating a labview project and currently having trouble with "play sound file". I created boolean buttons. Each buttons play different sound file. The problem is that when I press two buttons at once it only chooses one button to play one sound file. Im using LabVIEW 2012 in developing this project.

0 Kudos
Message 1 of 2
(2,565 Views)

Remember IBM's Motto?  THINK.

 

What characterizes a "sound"?  What dimensions does it have?  At one level, it is "amplitude as a function of time", and when you "play" a sound (digitally), you are driving a speaker at some frequency (44 KHz?) with a waveform.

 

What do you think needs to happen when you play two sounds?  If you have two machines and two sets of speakers, you could try to "synchronize" them so that they both start playing their (unique, different) sounds at precisely the same time ...

 

With a single machine and a single speaker, can you think what you might do to get the two (digitally-represented) sounds to play at the same time?  [There are some complications that can arise, but this is basically a very simple question ...].

 

Bob Schor

 

P.S. -- I confess I created the above response without looking at your code.  I've now looked, and have a suggestion to make.  I assume you wrote a single "Push Button, Play Sound File" routine and got it to work.  If you want to have multiple buttons, choose the "logical next case", namely two buttons -- don't jump to 12 buttons all at once!

 

Here's another thing to think (oooh, that troublesome word, again) about.  Suppose I had two players with the same song on each of them, each with a button to play the sound.  How do I push the two buttons at the same time, particularly if it involves my finger actually trying to push two buttons at once?  Can you imagine that there may be a few milliseconds difference between them, and with sounds having frequencies in the tens-of-kHz range, this may cause some "clashing" of the not-quite-simultaneous waveforms?

0 Kudos
Message 2 of 2
(2,516 Views)