LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I save a waveform as a *playable* .wav file? (LV 6i)

What series of I/O file saving .vi's do I need to save a general waveform as a .wav file (ie- i want to be able to use a general wave file player to output the file with the waveform)?
0 Kudos
Message 1 of 2
(2,895 Views)
Hi,
Your Waveform has time and data information. You should unbundle it (Get Waveform Components) and use the data array as an input for the Snd Write Wave File.vi (Functions>Graphics&Sound>Sound>Sound File). The 'sound format' input refers to the sampling rate of your waveform, which will tipically be 8000,11025,22050,44100 Hz.

The file is in a PC wave file (.wav) format and can be read by the Snd Read Wave File VI or other applications.

A good example to look at is: Help>Examples>(Directory Structure)Sound>sndExample.llb>Simple Audio Player.vi. There you'll find everything: since how to store and play music, since how to code and decode wav files.

Regards,
Guillermo
Message 2 of 2
(2,895 Views)