LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does inputting an array of waveforms with the Play Waveform express vi work?

I'm trying to use this VI to inject a tone (1k/2k/etc) via the PC Audio card, and successfully use it for 1 tone.  But I need the ability to inject 2 tones at the same time.  The vi states that it will inject one waveform per channel, but I haven't been able to get the 2nd tone to work.  Is it possible?  I'm using a stereo adapter and have a speaker wired to each channel.
0 Kudos
Message 1 of 7
(3,334 Views)
Hi ricky
 
How are you separating your signals and do you know if your sound card can support multiple channels. Had you considered adding the waveforms of your tones before entering it into the Play Waveform VI or is it particularly the stereo nature that you are looking for.
 
Is there a chance that you can attach your code so I can take a look and make some suggestions?
 
Thanks
 
 
 
 
Graham Green
Software Product Marketing
NI | Emerson
0 Kudos
Message 2 of 7
(3,325 Views)
I'm using a 1/8" Stereo plug connected to my headphone jack.  When I check in the express vi options, it has 2 channels listed (1 device), and this seemed to be an easy application to use multiple tones.  Basically I need the ability to inject 2 different tones (one 1k tone, and one 2k tone) on 2 different devices, and I also have a DAQ USB-6009 connected, but it doesn't have the ability to output a waveform.
 
thanks for the help!
-Ricky
0 Kudos
Message 3 of 7
(3,321 Views)
It seems that the LV sound output VI's are seeing the soundcard as one channel. You could try two soundcards or using a different sound api.
Regards,
André (CLA, CLED)
0 Kudos
Message 4 of 7
(3,306 Views)
Sometimes a 10 minute edit time is too short.Smiley Sad

One other option I thought of is to create your own wav-files. It's a documented binary format.

See e.g.: http://ccrma.stanford.edu/courses/422/projects/WaveFormat/ as a starting point. (I don't say its easy, but its a way. Smiley Wink
Regards,
André (CLA, CLED)
0 Kudos
Message 5 of 7
(3,304 Views)

I'm going to add another sound card to the setup, it's a cheap solution to my problem.  Thanks for all the help.

Regards,
Ricky

0 Kudos
Message 6 of 7
(3,299 Views)
That sounds cool, two sound cards should do the trick.
 
I notice in your code that you are playing the sound waves at the same time on top of each other In the forem of your data aray. Is there a difference between this and adding them together then playing the resultant waveform.
 
This is just realy for interest but take a look at the below I've been playing with, would I be right in saying it does exactly the same as the one you wrote above?
 
Thanks
Graham Green
Software Product Marketing
NI | Emerson
0 Kudos
Message 7 of 7
(3,289 Views)