LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview to output signals to 3 channels with a sound card

I am trying to use Labview 7.0 to output three signals (pure tones) to 3 separate speakers and I want to know if this is possible. I am using a Sound Blaster Live! 7.1 Sound Card and Windows 2000. Let me know if anyone can give me any help with this problem, it would be greatly appreciated. Thanks in advance.
0 Kudos
Message 1 of 6
(4,132 Views)
Hi P,

In LabVIEW 7.0 (and 7.1) we have sound output VIs to perform audio output through sound cards on your computer. Currently there is a limitation to these VIs of only being able to output sound through mono (1 channel) or stereo (2 channels) for a single sound card. This means that you could build 2 of your signals into a stereo waveform and output them through 1 sound card, but that still leaves you with 1 other channel that you would need to output through a different sound card (if you want to output the signals simultaneously). Another alternative would be to see if Sound Blaster Live! 7.1 has drivers (DLLs) or an ActiveX Object. If so, you could access the dll through LabVIEW using a Call Library Function Node or use the ActiveX Object in LabVIEW with the ActiveX palette to try to accomplish your task.

Just a heads up, I know that more and more customers have been asking for this functionality (more than 2 output channels) for their Audio applications. Because of this (and many other reasons), I know a lot of consideration has been given to renovating the Sound Input/Output functions (VIs) for a future version of LabVIEW.

Hope this helps,
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 6
(4,109 Views)
Thanks for the help but I have a few more questions. Could you please explain a little morea bout the dlls and the Active X and what exactly they would be able to do. Also, would it be possible to hook two sound cards up to one computer and have Labview simulateously send signals to both of them? Thanks in advance.
0 Kudos
Message 3 of 6
(4,106 Views)
Hi P,

Sound Blaster might create a DLL that can be used to communicate with the sound card. This is something that you would have to obtain from Sound Blaster, along with the information on the functions available and how to use them. I don't know if Sound Blaster has such a DLL, but it was just a thought. In LabVIEW there is a what is called a Call Library Function Node. This provides the ability to call functions in a DLL from within LabVIEW. Therefore, if Sound Blaster provides a DLL that has functions to accomplish what you are trying to achieve, then you could call (and pass data to and from) those functions from within LabVIEW.

The ActiveX concept is similar. You will have to see if Sound Blaster provides an ActiveX Object. If so, it is possible that you could communicate via ActiveX with some type of engine to control the sound card. You could do this from within LabVIEW, using the ActiveX functions. However, I would assume that the DLL approach is a more feasible one.

Hope this helps,
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 6
(4,080 Views)

Hi  Travis.

 

As you mensioned that In LabVIEW 7.0 (and 7.1) we have sound output VIs to perform audio output through sound cards on your computer. Currently there is a limitation to these VIs of only being able to output sound through mono (1 channel) or stereo (2 channels) for a single sound card, i would like to know how can i use the stereo input of my sound card, because i just can use the mono or mic input,

What vi can I use to consigure my sound card to be able to use line in input wich is stereo. I want to have two inputs with my sound card.

Best Regards

0 Kudos
Message 5 of 6
(3,933 Views)

Hi!

 

This isn't a limitation of LabVIEW in any way. Most likely you will have to configure your sound card to accept input from your Line In input rather than the mic input. After that you can easily configure a stereo acquisition from your Line In on your sound card.

Assuming you are using the default Windows drivers for your sound card, follow these steps to change the sound input from Mic to Line In:

Open up the Sounds and Audio Devices application. You can find this in the Windows Control Panel (let me know if you aren't using Windows), and there's usually an item in the taskbar that looks like a little speaker.

Select the Options menu and select Properties. From this dialog make sure you select the Recording option rather than the default Playback, so that you can adjust levels and make selections for inputs rather than outputs.

Once you exit the dialog you will now see your input selections. You should check Line In. This will automatically deselect your Mic input. Now you can use the same device number in LabVIEW (default is 0) and use SI Config to configure a stereo sound acquisition that will be routed from your Line In input on your sound card.

Hope this helps!

Message Edited by Jarrod S. on 01-05-2006 05:08 PM

Jarrod S.
National Instruments
0 Kudos
Message 6 of 6
(3,916 Views)