LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I separate Left and right audio channels in labview 8.5 tia sal22

How can I separate Left and right audio channels in labview 8.5 tia sal22

 

Greetings All

 

I have a working Labview vi that converts a math formula to an audio signal.  I would like to have the right and left audio channels playing different math audio signals is this possible?

 

Example

Right channel -> plays the audio signal created by a math formula

Left channel -> plays the audio signal created by another math formula with adjustable phase control

 

I’ve included a VI with a working audio and math formula but I’m not sure how to separate the left and right channels.

 

I’m using labview 8.5

 

I looked up a similar question on the support board and it said” use an instance of the the Sound Output Write that has a 1D waveform data type input (i.e.  Sound Output Write (DBL)). Each element in the array would correspond to a channel.”

 

But I’m not exactly sure what he meant.  I’m using a formula to generate the wave file

 

Tia sal22

0 Kudos
Message 1 of 11
(8,361 Views)
You've got a single math formula. If you would create another audio signal, convert that to a waveform, and use the Build Array function, you would have a waveform array with 2 elements in it - a left channel and a right channel.
0 Kudos
Message 2 of 11
(8,358 Views)

>You've got a single math formula. If you would create another audio signal, convert that to a waveform, and use the Build >Array function, you would have a waveform array with 2 elements in it - a left channel and a right channel.

 

Can you point me to an example?

 

Thanks for such a quick response 🙂

0 Kudos
Message 3 of 11
(8,353 Views)

I don't understand what kind of example you want. You originally stated that you were going to create:

 

Right channel -> plays the audio signal created by a math formula

Left channel -> plays the audio signal created by another math formula with adjustable phase control

 

You have not done this. You only created a single channel with your single math forumula. If you had 'another math formula' like you stated and created the waveform data type like you already did for the first channel, all that you would need is the Build Array function.

0 Kudos
Message 4 of 11
(8,339 Views)
Yes, Dennis has answered your question. You need a build array function to mix left and right channles. I think the attached figure is helpful for you.
0 Kudos
Message 5 of 11
(8,314 Views)

Their must be some type of misunderstanding I'm not trying to mix the two mathscript signals together I'm trying to have them play separately on the left and right mono channels.  see example below

seperate right and left speaker channels

 

Does this make sense?  I'm trying to increase the number of output analog signals I can use by separating the stereo channels into a one right and one left mono channel.  So instead of just being able to use one stereo channel I can use 2 mono channels (the right channel and the left channel)  Sorry if this wasn't clear before

 

tia sal22 

0 Kudos
Message 6 of 11
(8,276 Views)

There is no 'mixing' if you create a 1D array from two separate formulas. If you add a second formula and build an array as shown, you would have a left and right channel. Have you even added a second formula to your VI and tried what has been suggested?

0 Kudos
Message 7 of 11
(8,273 Views)

Sorry it took so long to get back.  Here's the new VI with it splitting out the left and right channels. 

I'm using a Gigaport HD 8 output usb audio device but I'm experience clicks and pops.  I increase the buffers

but I still get the clicks and pops.  I know gigaport HD can use ASIO drivers which most likely would solve the problem but one needs to code in C for this which I'm not proficient in.  Can someone recommend a work around to prevent this clicks and pops, can I somehow change my VI to fix this? Does anyone have a VI that will allow access to the ASIO latency properties?

 

I'm using labview 8.5

And a gigaport HD which is a USB audio device which outputs 8 analog signals (it is ASIO compatible)

 

tia sal22

0 Kudos
Message 8 of 11
(8,133 Views)
Here's an image of the vi
0 Kudos
Message 9 of 11
(8,123 Views)
I think the problem is that the labview sound system driver is very simple. The sound output memory is a simple buffer only. Not implemented as a FIFO or circular buffer. Therefore it is not possible to make a continuous wave by writing segments of waveforms. It will always be some glitches in the waveform. That is the popping sound you hear.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 10 of 11
(8,095 Views)