08-12-2009 05:16 AM
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
08-12-2009 05:33 AM
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
08-12-2009 07:03 AM
08-12-2009 07:24 AM
If you only are going to use the wav file reader you do not need the DLL. So you may drop it
08-12-2009 08:44 AM
08-13-2009 08:44 AM
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.
08-13-2009 09:21 AM
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?
08-13-2009 11:31 PM
08-14-2009 01:59 AM
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
08-14-2009 03:15 AM