LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with outputting sound to speakers from array

Hey

 

First a little background on big picture (might be irrelevant) : I am recording signals from a rat's sciatic nerve using a multiplexer with 32 electrodes. These are then demultiplexed and filtered and inputted into an array with 32 rows. 

 

What I am trying to do: While recording from the electrodes, I want to be able to choose a specific channel (currently using the index array function) and play that signal through the speakers in real time. The issue is after I index the array, I try to use the play waveform vi and it gives me an error saying "LabVIEW:  (Hex 0x12C3) The sound driver or card does not support the desired operation." So I looked online and read that I should try and use the Generate Waveform function but that also gave me the same error. Any thoughts? 

The file is too large for me to attach so I just attached a screenshot for now.

 

Thank you very much

 

0 Kudos
Message 1 of 10
(3,708 Views)

Hi,

 

You configured an time interval (dt) of '2E-6' in the "Build Waveform" VI., which seems to be too high for your output device. When you double-click on the sound-output VI, you can see the maximum rates your output device supports.

 

Try using smaller values, or better: Use thResample Waveform VI with an acceptable 'dt' to resample your waveform before it is wired to the output.

 

Regards,

  Michael

__________________________________
Certified LabVIEW Associate Developer
Message 2 of 10
(3,669 Views)

I am actually running into the same sound card error. However, my sampling frequency is 1000Hz. and I am inputting a real time domain signal (EMG signal). So I am connecting a constant "0.001" [1/1000] to my dt of my build waveform. What can I do differently for the audio to be generated? 

 

Specs of my output device:
Min Sample Rate (Hz) = 100
Max Sample Rate (Hz) = 200000
Resolution (bit) = 16
#Channels = 2

 

Thanks for the help. 

0 Kudos
Message 3 of 10
(3,595 Views)

hiba.nzm, 

If you could provide a screenshot of your block diagram that would be helpful. 

 

Regards,

 

Corey C.

Applications Engineer

National Instruments 

0 Kudos
Message 4 of 10
(3,561 Views)

Here is my program. I have red circled the part of the program which is responsible for the sound. 
Basically two steps.
1) Take real-time data input into a build waveform with constant value of dt. 
2) Connect build waveform output into play waveform vi. 

Thanks For helping!

0 Kudos
Message 5 of 10
(3,545 Views)

is your problem has been resolved by changing the value of dt ? what are setting you made in the play waveform vi parameters settings ?

0 Kudos
Message 6 of 10
(3,521 Views)

Shouldn't my dt be inverse of my sampling rate? I tried a random value, it still didn't work. I have specificed above the parameters that the vi is set to. Its automatic and not manully set. 

0 Kudos
Message 7 of 10
(3,497 Views)

as far as my undersatnding , dt - sampling rate relation is dt=1/fs

0 Kudos
Message 8 of 10
(3,487 Views)
Yes. I also mentioned that above.
0 Kudos
Message 9 of 10
(3,480 Views)

i have just made and test this vi on pc. my device specs are

 

min sample rate   8000

max                      48000

resolution              16 bit

channels                2

 

it is running. i attach the snapshoty also. if not running on your pc then must some prob on sound side

Download All
0 Kudos
Message 10 of 10
(3,475 Views)