MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: WAV Import[] and Integer16 Issue

  • To: mathgroup at
  • Subject: [mg115098] Re: WAV Import[] and Integer16 Issue
  • From: David Bailey <dave at>
  • Date: Thu, 30 Dec 2010 19:05:46 -0500 (EST)
  • References: <ifhqe4$km7$>

On 30/12/2010 11:29, telefunkenvf14 wrote:
> Group:
> (Version 8, Windows 7 64-bit)
> Consider the case of importing a 16-bit WAV file, with correctly
> formed header info.
> If I evaluate: Import["someAudio.wav", "AudioEncoding"], Mathematica
> tells me, as expected, that I'm dealing with AudioEncoding ->
> Integer16 data.
> Now, can anyone explain why Import["someAudio.wav", "Data"] would fail
> to return a list of integers?!? (returns a scaled float)
> Searching MathGroup lead me to ReadSoundFile["someAudio.wav"], a
> function contained the Audio package. (Note: I'm pretty sure you won't
> find this function anywhere in the documentation or Audio package
> tutorial, although Mathematica will spit out a usage message if asked). This
> function imported the 16-bit file exactly as it should have, as
> Integer16 data, and I was able to verify the header information by
> including the option PrintHeader->True.
> BinaryReadList["someAudio.wav, "Integer16"] also works as expected,
> but then one has to manually chop off the WAV header data. (not an
> easy task---as an example, different parts of the header use different
> endian formats.)
> Can anyone confirm the behavior when importing a 16-bit WAV file? Is
> this a bug or by design?
> -RG
I have always thought that that should document Import and Export 
separately for each data type. As it is, the documentation is incredibly 
vague, considering that this functionality is quite important, and 
clearly has consumed much effort within WRI.

David Bailey

  • Prev by Date: Re: syntax error in Mathematica 8
  • Next by Date: Re: texture for filling?
  • Previous by thread: WAV Import[] and Integer16 Issue
  • Next by thread: Re: WAV Import[] and Integer16 Issue