Xref: utzoo comp.sys.ibm.pc:52368 rec.games.programmer:1938 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!vsi1!zorch!xanthian From: xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) Newsgroups: comp.sys.ibm.pc,rec.games.programmer Subject: Re: Quality of PC sampled sound Keywords: samples, sound, IBM-PC, Amiga Message-ID: <1990Jun12.110644.1214@zorch.SF-Bay.ORG> Date: 12 Jun 90 11:06:44 GMT References: <1990Jun7.173911.424@cbnews.att.com> <1207@metaphor.Metaphor.COM> Distribution: na Organization: SF Bay Public-Access Unix Lines: 42 In article <1207@metaphor.Metaphor.COM> djh@dragon.metaphor.com (Dallas J. Hodgson) writes: > >I recently wrote a few support routines for reproducing sampled sound on the >PC. I used a Mimetics digitizer to capture the samples (8-bit, around 14KHz) >into an Amiga, and compressed the bits like so: > > for each byte that exceeds the 0 crossing, output a "1" bit > else output a "0" bit. > >This stream of bits would get bit-packed into a byte stream, translated into >"C" source, (a large static array) and subsequently shifted out into the >speaker port of a PS/2. My player looks like this: > [omitted] > >My question is this : Why does it sound so poor? Compared to some other PC >sampled sound, the distortion is really bad; a very audible aliasing-screech >overtone is present on top of the sample regardless of anything I try. > [He reaches back 23 years to a class in radio theory...] If I understand what you've done, it is the equivalent of class C clipping: you've amplified your signal to infinity, then lopped it off into a square wave. In so doing, you've introduced a lot of high frequencies that weren't in the original, and lost a lot of what was carried in the shape of the wave you squared off. I do _not_ know how to do this, or how it interacts with th PC's fairly modest sound reproduction capabilities, but perhaps you need a conversion where the _density_ of 1 bits is proportional to the height (from a negative minimum) of the wave, rather than just letting the zero crossing act as a switch. I.e., at the most negative part of the curve, you convert to all zeros, at the zero crossing you have "01010101..." and at the most posittive part of the curve, you have all ones. Might not work, depends on the physical play mechanism. Kent, the man from xanth. -- in the distance a roasted cave newt screamed in agony -- Andrew Palfreyman