06-30-2010 08:46 AM
Hi Guys
I am trying to use the sound card as a cheap and nasty oscilloscope. What is the best way to scale a chart or a graph and implement a trigger to get a nice stable waveform? Currently I have combined the two examples, the continuous sound input.vi and generate sound.vi and have got a stereo sound cable connected between the microphone and the headphone jack for testing purposes.
Any help is greatly appreciated.
Cheers
07-01-2010 08:29 AM
I would recommend you use a producer/consumer architecture and stream data from your sound card constantly. Use the Trigger and Gate Express VI to select a subsample of the data stream for triggering (or you can roll your own) and display. For a full application similar to what you are attempting to write, check out this musical instrument tuner. Note that the code has a bug. The buffer size for the acquisition needs to be doubled in the initialization to prevent overflow errors.
07-02-2010 07:38 AM
Thanks for your help I will try and upload my code once I have a simple example working.
Cheers