LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting header and footer data from a .wav file

I am trying to extract from a standard .wav file the header and footer information.

 

I have been given a .wav file that originally was converted from an electrical signal (mVolts) to Pascal values (via mic sens. value) and was exported as a .wav file.

 

Now a .wav file swings between -1 and 1 thus there is some scaling information embedded inside the fle wich labview appears to chuck away using the std .wav file module.

 

Is there a load function that will let me see the .wav file on a byte for byte basis i.e "guts 'an all"?

 

Any help would be massively appreciated - the code could be very useful to many people.

 

I thank you again

 

Greg

0 Kudos
Message 1 of 10
(8,547 Views)

yes I think so. In the old sound system used in labview 7.x the wave file reader is more traditional. Lucky for you I posted it this week. Take a look here

http://forums.ni.com/ni/board/message?board.id=170&message.id=430979#M430979



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 10
(8,543 Views)
Thanks alot dude - I gotta be honest though I have no clue what to do with the DLL - I guess it's a library I can plonk in the add-ons directory?
0 Kudos
Message 3 of 10
(8,523 Views)

If you only are going to use the wav file reader you do not need the DLL. So you may drop it

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 10
(8,521 Views)
Right I was under the impression that when you use the .wav file reader labview chucks away the header information where the scaling factor is kept leaving you with just the time series? Is this not correct?
0 Kudos
Message 5 of 10
(8,509 Views)

You can find the complete specification for .WAV files here.  They are easy to parse.  A .WAV file is a subclass of a RIFF file, invented in the Windows 3.1 days to facilitate resource interchange between different OSes and computers.  You can find info on RIFF here.  It is also similar to TIFF, but that is another story...

 

That said, however, I cannot remember a scaling factor being in a .WAV file.  Your file may contain a custom tag, so it is worth a look.  Any good binary editor should be able to see it.

Message 6 of 10
(8,481 Views)

Thanks for the help guys - I opened it in a binary enditor and translated it to hex - the scale factor is a custom tag that I can extract and I now have a stream of Pascal values  ---> BLISS!!

 

 

 

Next question - is it possibe to load the wav in it's binary format into Labview so i can find this data automatically?

 

0 Kudos
Message 7 of 10
(8,473 Views)
Sure.  There is the Read Binary File function in the File I/O palette.
0 Kudos
Message 8 of 10
(8,456 Views)

G Heath wrote:

Next question - is it possibe to load the wav in it's binary format into Labview so i can find this data automatically?

 


You have the tool you need already. Just use the wav file reader I sent you. Remember that the number may be stored in a different endian than used by Labview



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 10
(8,450 Views)
Thanks again - I shall now investigate!
0 Kudos
Message 10 of 10
(8,445 Views)