wavread() floats without clipping?

4 views (last 30 days)
Don Gateley
Don Gateley on 30 Jun 2014
Answered: Don Gateley on 30 Jun 2014
I am doing processing on 32 bit floating point audio that has intermediate results outside the +1 to -1 range. I can save it with wavwrite() at the full dynamic range of a float but wavread() clips it. Is there a way to make wavread() read IEEE 32 bit float wave files with the full dynamic range of the data type?
Thanks

Accepted Answer

Don Gateley
Don Gateley on 30 Jun 2014
Now, this is strange. After restarting Matlab, wavread() and wavwrite() are now symmetric and handle the full range of float values instead of clipping. It looks like I had some kind of weird modal problem that a restart fixed. Go figure.
Past experience (lots and lots of it) had led me to believe that was the case so I was extremely surprised at the clipping behavior I was seeing.

More Answers (1)

Image Analyst
Image Analyst on 30 Jun 2014
Probably not. If it must be in a .wav file format, why don't you just scale the signal to the required range before saving it? Or else if it doesn't need to be a wave file, then just save it as a .mat file and the numbers can be whatever you want.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!