LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a wave file from a 2-d clustered array?

I am trying to create a single wave file from 2 arrays(xpoints and y points) clustered together... is this possible? Would I have to interleave the arrays? I don't know much about wave files and their formats so any help would be good. Thanks!
0 Kudos
Message 1 of 5
(2,686 Views)
Are you talking about a .wav file that a sound card would be able to play or a file that contains a captured waveform from a daq device?
0 Kudos
Message 2 of 5
(2,686 Views)
Hi Dennis,
I am referring to a .wav file that a sound card can play so that on an oscilliscope, I would be able to see a pattern generated.
0 Kudos
Message 3 of 5
(2,686 Views)
There is a VI called Snd Write Wave File. You would provide your Y data to it. The inputs would be either mono 8 bit or 16 bit so you might have to convert a sgl/dbl array first. You would also have to derive the sample rate from the x array and provide that to function. If your original sample rate is not one of the supported sound card formats, then some interpolation might be required. Could you provide more details on your x and y arrays and how they were acquired in the first place?
0 Kudos
Message 4 of 5
(2,686 Views)
Hi Dennis,
I am attaching my .vi to this message... the arrays created outside of the for-loop are the x-values and y-values and the output is a spiral shape. I am trying to generate the same patterns as seen on the xy-graph in sound waves. Thanks again for your help.
0 Kudos
Message 5 of 5
(2,686 Views)