Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I solve the problem of stuttering audio for the audio output on myDAQ?

I have an optical theramin circuit that produces a sine wave. For my labVIEW code, I obtained the frequency (by obtaining single tone information) and generate a sine wave with that frequency. However, when I output the wave to the analog audio output, I get some stuttering sounds that I do not know how to deal with. I'm currently reading continuously, 20k samples @ 40kHz for obtaining the signal from the theramin, and outputting 100 continuous samples. Any ideas what settings I should change to eliminate audio stutter on the output side?

0 Kudos
Message 1 of 5
(3,515 Views)

Hi symoyau,

 

Could you post your VI?

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,486 Views)

Here it is! optical theramin would be the main one. Auto Tune basically discretizes the frequency values so the output always produces notes that are in tune. Pitch Marker generates the discrete values of the frequencies.

Download All
0 Kudos
Message 3 of 5
(3,480 Views)

Hi symoyau,

 

I'm not entirely sure what is causing the behavior you are describing, but does appear that you could be changing output waveforms with each loop iteration and that you have regeneration enabled, so perhaps you are experiencing a phenomenon called glitching as described in the article below.

 

Glitching

http://zone.ni.com/reference/en-XX/help/370466W-01/mxcncpts/glitching/

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,460 Views)

Try starting with this:

Community:  Use AO to Output Delayed Version of AI in DAQmx

 

You'll have to make a few changes for myDAQ (particularly, you might not be able to synchronize the AO and AI as shown in the example), but this is the general form for generating an analog output based off of the result of the analog input.

 

After you have verified that you can output an unmofidifed copy of the analog input, insert your processing into the loop.  You'll need to pick a delay that is long enough to ensure no underflows (or come up with some sort of strategy for handling underflows like restarting the task with a longer delay).

 

 

Best Regards,

John Passiak
0 Kudos
Message 5 of 5
(3,413 Views)