LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate .wav files from sound pressure data

Hello Gurdas,

1+2) It depends on the player you use. If the player is displaying those data you can use this chunk. And the player will probably display the text each time it plays the wav.

3) How to write: Have a look at an wav file with a hex viewer/editor. So you easily can recognize the pattern: You have a type identifier ("chunk label"), followed by the size of the chunk (intel format, U32), followed by chunk data. To append a chunk: open wav file, append new chunk data to file, readjust file size.
Filesize is stored in byte 4-7 of a wave file, following the identifier RIFF (also Intel format; contains "data to follow" that is actual filesize-8 (RIFFxxxx)).
A wav file contains of:
RIFF   -   indentifier
xxxx   -   filesize-8
while (chunks)
  chunk type   -    identifier (like data, fact, labl)
  chunk size   -   size in bytes
  chunk data   -   data bytes
wend
That's what I mean easy to implement 🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 11 of 11
(696 Views)