Description of SPARC soundfile format?

Jef Poskanzer jef at well.sf.ca.us
Tue Nov 21 22:30:13 AEST 1989


}> They are clearly non-ascii files (as an examination of the sample file
}> 'sample.au' reveals), but are the values long floats, or what?
}
}No, they're just bytes.  They're represented slightly strangely: a byte
}with value n in the file means 384-n if n > 128, otherwise it means n.

Not really.  That's good enough to graph the general shape of the
waveform, which is what the sound demo uses it for.  But if you tried to
use that conversion to actually generate a waveform you would get garbage.
The actual format is a little more complicated -- it's an eight-bit
floating-point number.  One bit of sign, three bits of exponent, and four
bits of mantissa.

I have posted some simple SPARC sound tools to alt.sources, since it looks
like no one else has done so.  They include filters to convert between
this format, called u-law (pronounced "mu-law"), and linear.  Of course,
by the time this message appears in comp.sys.sun, the sound tools will
have expired on most systems (average expire time is 7 days).  Hopefully
most comp.sys.sun readers also read alt.sys.sun, where this announcement
appeared in a timely fashion.  --- Jef

[[Ed's Note: Just out of spite, I'm going to make sure this goes out 
today (11/22) :) That's pretty harsh commentary up there :( -bdg]]

  Jef Poskanzer  jef at well.sf.ca.us  {ucbvax, apple, hplabs}!well!jef
                    %SYS-F-ACCVIO, Access violation



More information about the Comp.sys.sun mailing list