Re: .WAV file headers
- To: mathgroup at smc.vnet.net
- Subject: [mg52583] Re: .WAV file headers
- From: nospam nospam <nospam_please at nospam.com>
- Date: Fri, 3 Dec 2004 03:53:39 -0500 (EST)
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
John Reed wrote: > Is there a way to extract the information from wave file headers in > Mathematica? The header is the first 11 words of the wave file and consists > of 4 byte ASCII words and 4 byte integers encoded as ASCII strings. I need > the integers from header words 7 (samples/second), 9 (two 2 byte words, > bytes/sample and bits/sample) , and 11 (number of bytes in the file). > > John Reed > I think you can only get the Mathematica formated informatin itself of the header (i.e. not the header data as it is in the file) To see the header information, set the option PrintHeader to be True, like this: sound = ReadSoundFile["file.wav", PrintHeader -> True]; There might be a way to capture this output to a string, and then parse it to extract the info in a more usable way.