Path: utzoo!attcan!uunet!cs.utexas.edu!rice!sun-spots-request From: jef@well.sf.ca.us (Jef Poskanzer) Newsgroups: comp.sys.sun Subject: Re: Description of SPARC soundfile format? Keywords: Source Message-ID: <3158@brazos.Rice.edu> Date: 21 Nov 89 11:30:13 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 26 Approved: Sun-Spots@rice.edu X-Refs: Original: v8n194, Replies: v8n198 X-Sun-Spots-Digest: Volume 8, Issue 202, message 1 of 17 }> 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@well.sf.ca.us {ucbvax, apple, hplabs}!well!jef %SYS-F-ACCVIO, Access violation