Re: PC speaker driver (fwd)

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Wed May 10 2000 - 16:04:53 EST


On Wed, 10 May 2000, David L. Nicol wrote:

> volodya@mindspring.com wrote:
>
> > Unlike sound cards that have from 256 to 65536 gradations (or
> > more) pc speaker has 2.
> >
> > Vladimir Dergachev
>
>
> But is it not possible to drive the speaker for a very very
> short period of time, emulating an amplitute gradation
> with pulse-width modulation?
>
>

Yes. And my very first Linux-box had that software (version 0.99). It
played music quite well right out of the tiny speaker.

When I got my first XT clone, one of the first things I did was
to make it 'talk'. There were no 'wav' files, I sampled a mike
preamp at 10 kHz, made an 8-bit A/D converter using the printer-port,
captured the resulting data into a file, then I could play it back
into the speaker by varying a 10kHz pulse-width from timer channel 2
(the one connected to the speaker). All the source-code and the
schematic was published on my BBS in the 80's.

Even though the distortion was probably greater than 10%, and the
10KHz rate with within audible range (the speaker becomes a LPF),
the voice sounded quite okay.

Now practically everybody has BOOM-BOX Audio boards. I still haven't
bought one.

Cheers,
Dick Johnson

Penguin : Linux version 2.3.41 on an i686 machine (800.63 BogoMips).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:16 EST