Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: Soundfiles Message-ID: <1451@toaster.SFSU.EDU> Date: 31 Mar 91 04:54:11 GMT References: <17776@sdcc6.ucsd.edu> <1991Mar26.004133.4930@unx2.ucc.okstate.edu> Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Organization: San Francisco State University Lines: 42 In article <1991Mar26.004133.4930@unx2.ucc.okstate.edu> minich@unx2.ucc.okstate.edu (Robert Minich) writes: >How about a reference that explains mulaw encoding for those of use >without these info sources. Mu-law encoding is a form of nonuniform companding used for digitized voice in U.S. telephony. 8 bit mu-law provides a small-signal S/N ratio and dynamic range roughly equivalent to a 12-bit linear representation--thus it can be thought of as a data compression technique. [In practice, it *is* losing information (and the difference between the original and the encoded version is digital noise); it's designed to get 50% more "value" out of a communications channel without sacrificing too much speech intelligibility. It's not something you'd want to use for arbitrary audio.] One property is does share with compressed data is that "you can't do anything useful with it" without expanding it first. mu-law converts normalized real amplitudes according to input: 0 <= |x| <= 1 log ( 1 + {mu} |x| ) y = -------------------- log ( 1 + {mu} ) parameter {mu} = 255 [8-bit mu-law is a fixed-point representation, and something I read suggests that it may actually be a 15-segment linear approximation to the above. I confess to not quite doing my homework on this one; I need to track down a copy of CCITT Recommendation G.711 next.] Anyway, since mu-law quantization levels are more closely spaced at low amplitudes, their S/N ratio improves, while higher amplitudes tend to mask quantization noise. Low frequencies with changing amplitudes would have the most perceptible problems, but the nominal bandpass filtering used with 8KHz sampling attenuates frequencies below 300Hz ... so we stay out of trouble. -=EPS=-