LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save waveform signal to .wav format

I am having difficulties saving a simple Sine wave to .wav format.  Does anyone have experience with this?   I just want to create a sine wave using simulate signal at a specific frequency and amplitude and save it as a .wav.  I tried using the Sound File Write vi and that doesn't seem to work.

 

Thank-you for any help.

 

0 Kudos
Message 1 of 11
(6,536 Views)

Check out this example here.

 

The file download is messed up I think, but if you manually change the filetype to ".vi" it will open.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 11
(6,523 Views)

I am not sure why it is not working for you. Please post some code.

 

Spoiler
Wave File.png

CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 3 of 11
(6,510 Views)

Here is my attempt at save the sine wave file as a wav file.

0 Kudos
Message 4 of 11
(6,501 Views)
  • Create a filepath for the file that you're creating. You haven't set any path.
  • Use the Open and Close subVIs from the same palette as the Write.
  • Make sure the file type is ".wav"

 

WAV.PNG

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 11
(6,492 Views)

Thank-you!  I made these changes (attached) and still get the same error.

 

 

 

 

 

0 Kudos
Message 6 of 11
(6,469 Views)

This is the first time you've mentioned an error. What error?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 7 of 11
(6,459 Views)

If you run it there is an error:

 

-4824

 

error.jpg

 

0 Kudos
Message 8 of 11
(6,455 Views)

This isn't necessarily a warning, it's just letting you know that your data was out of range for a wav file, so it had to clip it.

 

Your waveform data must fit within the -1 to 1 range.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 9 of 11
(6,445 Views)
Can you please look at the spoiler section in my first post

CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 10 of 11
(6,438 Views)