oplbeep is a simple, two-part hack I threw together to change the
normal PC beep sound to something more tolerable.  The first part of
the hack is a kernel patch to provide hooks into the console beeper.
The second part is a loadable module that uses those hooks to replace
the standard beeper with a chime from a Yamaha FM synthesizer.  Part
one is nice, clean, and portable.  Part two is awful -- it operates
directly on the synthesizer, running roughshod over anything else that
might be trying to use the chip.  (I guess that could be construed as
a feature: since it diddles the chip directly, you don't even have to
have the sound driver in the kernel.)  Also, it doesn't check to see
what kind of synth you have, or if there's even one there at all.

To use this, apply oplbeep.kernel-patch (the diffs are against the
1.1.75 source tree, but will probably work on earlier or later
kernels), rebuild the kernel, install it and reboot.  Then, build the
loadable module, Beep.o, and install it with the command:

		insmod Beep.o OPL3_PORT=your-FM-synthesizer-port-address

You can get the address of the synth from the boot-up messages if the
sound driver is included in the kernel.  If you see a line like this:

		snd1 <Yamaha 2-OP FM> at 0x388 irq 0 drq 0

the beeper should work, and your address is 0x388.  (This address, by
the way, is the one that my computer uses, and is therefore the
default port used if you don't specify something else in the insmod
command line.)

After you load the module, do something that normally causes the
machine to beep.  If you get a new sound, and like it, you're all set.
If you get no sound, or you don't like it, you can unload the module
(rmmod Beep) and everything will be back to normal.

Eventually I'll probably make a nicer loadable module -- not only does
this one frob the hardware directly, it also ignores the beep
frequency and duration parameters.  And, of course, all you people
without Yamaha synthesizers are SOL.  I'd really like to do something
that can play samples, beep in different voices, and so on, but there
are several problems that I don't have good answers for yet.

Anyway, enjoy the program, and let me know whether it works for you.

5-Jan-95
dave madden <dhm@vheissu.net.dcl.co.jp>
