From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Split audio into left and right channel.

I have a sine sweep which has to be played first in left earphones only and then repeat the same sweep for the right ears. How can I do that. I have added an image of my code. I did the way it was given in http://forums.ni.com/t5/LabVIEW/How-can-I-separate-Left-and-right-audio-channels-in-labview-8-5/td-p... but it does not work. Please help me as I am new to it.

0 Kudos
Message 1 of 5
(5,988 Views)

Hi,

 

please try the highlight mode (like you see in the screenshot) and see the dataflow. So you can find out where the problem is located.

If you have some error code, post it here and I can see what's the problem.

 

Best regards

Suse

______________________________
Certified LabVIEW Developer (CLD)
0 Kudos
Message 2 of 5
(5,885 Views)

@PG1985 wrote:

I have a sine sweep which has to be played first in left earphones only and then repeat the same sweep for the right ears. How can I do that. I have added an image of my code. I did the way it was given in http://forums.ni.com/t5/LabVIEW/How-can-I-separate-Left-and-right-audio-channels-in-labview-8-5/td-p... but it does not work. Please help me as I am new to it.


Hey again PG1985,

 

I've just had a quick play around with the sound functions and have built the basic VI below to demonstrate how to modulate sounds between different audio outputs for different left and right outputs. You'll see below in the VI Snippet that after initialising the sound output channels, all you need to do to vary the output sound is build together an array of two waveforms as your input to your sound task, this will differentiate between the Left and Right speakers for us. The waveform in array index [0] will go to the left speaker and the waveform in array index [1] will go to the right speaker. In the loop where I generate the sound, all I do is produce the waveforms and use the Build Array node to create an array of sounds, then use this as the input to my Sound Output Write. So, to eliminate sound to an individual speaker, all you need to do is set the amplitude of the input signal to 0.

 

In terms of your application, I suggest that whilst you are outputting the first sine sweep, output a Sine Waveform with an amplitude of 0 to the right headphone by building an array of the two and wiring it to the Sound Output Write, then doing the reverse for when you want to play the Sine Sweep in the right speaker.

 

Hope this is helpful, I had some good fun trying to get this to work! 

 

Audio_L_R.png


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 3 of 5
(5,851 Views)

hola a todos quiero graficar los canales R y L  de  audio de mi mydaq 

estoy utilizando un ipod 

graciAS A TODOS LOS K NO SE GUARDAN EL CONOCIMIENTO

Smiley Wink

0 Kudos
Message 4 of 5
(5,711 Views)

hello! I've seen you for an explanation of this problem,and i did it too,but i find some question in it;in this http://forums.ni.com/t5/LabVIEW/Split-audio-into-left-and-right-channel/td-p/1635312,i used the vi ,and did it as you say ,but When I send a signal to oscilloscope From the headphone(In order to verify the left and right channel output signal can be different, I will one sinusoidal waveform into a cosine waveform),but i But the oscilloscope display of the X, the Y signal is the same,so i cann't understand ,because You said 2 column signal automatically to the 2 channels, but it doesn't work ,please tell me how to do it ,thank you very much

0 Kudos
Message 5 of 5
(4,995 Views)