.WAV files - problem reading them
- To: mathgroup at smc.vnet.net
- Subject: [mg9813] .WAV files - problem reading them
- From: Greg Alman <Greg.Alman at rollins.edu>
- Date: Fri, 28 Nov 1997 05:35:29 -0500
- Organization: Dept. of Physics, Rollins College, Florida, 32789
- Sender: owner-wri-mathgroup at wolfram.com
I'm using Mathematica 3.0 for Win95. I'm having trouble correctly reading WAVE files (e.g. chimes.wav, which is part of MS office97). Outside of Mathematica, my computer will play them fine. After loading the `audio` library, I read a file in Mathematica with chimes = ReadSoundfile["c:\\chimes.wav", PrinterHeader -> True]; When I play it and plot the record of amplitude vs. time with ListPlay[chimes, SampleRate -> 22050, PlayRange -> All] I do not see the correct time series nor do I hear the correct sound. Something about the read by Mathematica is taking the amplitudes, most of which should be near the middle of the [-32768, 32768] range, and converting them to numbers at the extreme ends of the range (i.e. concentrating them near -32768 and 32768]. The header info that comes up from ReadSoundfile[] tells me that chimes.wav contains 16 bit numbers, which I thought was supposed to be acceptable for ReadSoundfile[] to use. I've tried the obvious things like changing settings for the options PlayRange. I think the problem is with my understanding of the function ReadSoundfile[]. Are there options I need to set (or can set) that are not mentioned in the on-line help? By the way, ultimately I'd like to take the list created by ReadSoundfile and send it through various digital filters I am designing -- so I need the correct record of amplitude vs. time. Of course, it would be nice to listen to the final product... Thanks, Greg Alman Physics Dept. Rollins College
- Follow-Ups:
- Re: .WAV files - problem reading them
- From: Mark Evans <evans@gte.net>
- Re: .WAV files - problem reading them