07-09-2013 04:25 PM
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?
07-10-2013 02:37 PM
Hi symoyau,
Could you post your VI?
07-10-2013 03:47 PM
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.
07-11-2013 07:24 PM
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.
http://zone.ni.com/reference/en-XX/help/370466W-01/mxcncpts/glitching/
07-16-2013 04:51 PM - edited 07-16-2013 04:54 PM
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,