The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Windows WAV File Bug & Compiled File Routines
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Mark Evans

Posts: 63
Registered: 12/7/04
Windows WAV File Bug & Compiled File Routines
Posted: Oct 30, 1996 12:13 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'm very impressed by 3.0, but Mathematica is still a real bear when it comes
to working with data files. I think WRI should implement some compiled C code
to read and write the most common file formats that exist on PCs and Macs,
instead of forcing everyone to rely on Read[] and its family of functions.
Will anyone second the motion?

Here is the latest file reading bug: The package Miscellaneous`Audio` does not
read all Windows .WAV files correctly. It reads 8-bit files, albeit at a
snail's pace, but has problems reading 16-bit files. It will interpret the
header correctly, but then fail to read the actual data.

I had to truncate my 12.5 second, 44100 Hz, 16-bit mono file to 8 bits, and
then wait a long time, to get it into Mathematica. It took at least 60 seconds
on a P166 machine. By contrast, some of the freeware sound utilities that I
downloaded from the Internet take about a tenth of a second to read in this
same file.

Of course, the package does not offer a way to write .WAV files back to disk.
This omission is in itself a great deficiency.

If you look at the file-reading code in Audio.m you begin to understand why (1)
reading files into Mathematica is slow, and (2) error-prone. There are all
kinds of flips and flops relating to byte ordering, scaling and the like that
cry out for compiled routines instead of interpreted execution.

I love Mathematica, and yes it can do everything, but in cases like these I
request compiled code. I respect the work that has gone into many of these
file-reading utilities, and I am thankful for what I have; but it seems to me
that if the freebies I pull down from ftp sites can read and write .WAV files,
then a mammoth like Mathematica should be able to pull it off with ease.

Mark Evans

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.