

Welcome to the FANCY BEEPER.... your life will never be the same :-)

The FANCY BEEPER packet allows you to reroute all the sounds the builtin PC
squeeker normally emits, and to play back whatever sample you want at
whatever volume you want instead.

FIRST OF ALL: This software is extremely ALPHA. If you take a look at the
kernel patches, you'll find a number of comments that indicate that I don't
really know waht I am doing. This also hasn't been tried on more than one
linux machine yet (at the time of writing). It _does_ work reliably on my
machine, and has done so for quite several weeks. This doesn't mean it won't
eat up your diploma thesis or melt down your video card. I have no idea how
such things could happen, but I won't be responsible if Murphy has more
phantasy than me. You have been warned!

If you are still with me after that disclaimer, congratulations. So what 
do you do to get rid of the annoying "beep" of the PC squeeker?

First, you patch your kernel with the included patch. That will include the
kernel support for the FANCY BEEPER as well as module notification in your
kernel. If you don't want module notification, don't worry, everything is
properly "#ifdef"ed (I hope :-), so it won't hurt at all. Build your kernel
as usual, answering "y" to the question about the FANCY BEEPER (it will be
listed after the busmice).

Next, you should look for a sound you want to play back instead of a "beep".
Currently the software doesn't really support playing different sounds for
different events (though the kernel support is there), so you have to find
one that isn't too annoying, but also shouldn't be to easy to miss. I
personally use the included "ouch.au" taken from the xboing package. 
Try to cat your sound into /dev/audio. If it sounds well, go on to the next
step, otherwise try /dev/dsp. If /dev/dsp works, you have to edit beep.c,
and change where it is writing to.

Now you should create the beep device. Do

  mknod /dev/beep c 10 128

You might want to change the permissions to 600, so no unprivileged users
can steal your beep events. If you haven't booted your new kernel yet, do so
now. During bootup, you should see a line "Fancy beeper installed", just
after the serial ports have been initialized. From now on, the kernel will
try to speak to your beep daemon whenver it wants to beep.

It's time now to compile beep.c; You can always use the supplied binary, but
compiling everything you run as root is good habit. Now let's have a test
--- type

   ./beep /wherever/your/sound/is.au

Now switch to another VC (or another xterm), and make the sheel beep (a good
way to this is to hit backspace at the beginninng of the line). You should
hear your sound played through your soundcard. If not, try adjusting the
volume for the pcm channel (using some mixer utility). It should be fine,
though, as it worked some steps ago. If it doesn't work for any reason, try
to have a look at the kernel messages (usually in /usr/adm/messages), and
send me a bug report with as much info as you can gather.

If all went well, execute the "beepoff" shell script. It will gracefully
shut down the beep daemon. Hitting CTRL-C on it will _not_ bring it down
gracefully, so do use the supllied script. 

You now can make the fancy beeper a part of your standard configuration.
Simply copy all executables and your sound into a suitable place, and add a
line like

   /etc/beep /etc/sounds/ouch.au 2>&1 >/dev/null &

to your rc.local file. Next time you boot up, the fancy beeper will be
installed automatically.


A few more words of caution......

a) If you (like me) have your disks spin down when idle, you might encounter
   a serious delay between the time you make the thing beep and the playback of
   the sound --- this happens when your sound wasn't in the buffer cach
   anymore, and the disk has to spin up to reread it. Nothing you can do,
   sorry.

b) When you use the /dev/audio or /dev/dsp device for something else, you
   won't be able to hear any beeps. I am wondering whether there should be
   a default, squeeker BEEEEEP in this case --- mail me your opinions

c) The beeper daemon splits into two processes, so that it can playback the
   sound and listen to the kernel at the same time. In earlier versions,
   processes have sometimes gone wild and sucked up all CPU. This hasn't
   happened to me with this code yet, but if things become sluggish, check
   it out! Also, this splitting up makes it mandatory you use the supplied
   script to shut the beeper daemon down.

That's it --- good luck to you. I know it's still pretty rough, but as I had
promised this stuff about a month or so ago, I thought I'd rather use the
free evening and get it out there. There are a few things I'd like to do
"some day", but we all know when "some day" is..... So if you want anything
done, you have to

a) do it yourself (preferred solution, send me patches!)
b) fascinate me (which will get it done very quickly, at the expense
   of some other stuff, mainly studies)
c) bug me about it over and over again, till I simply give in to shut you
   up, or
d) bribe me into doing it (there is plush animals, there is chocolate, there
   is postcards from your home country.... you get the idea?)

At the moment, this thing actually does everything I wanted it to do when I
started. 


Send any comments, bug reports, death threats, winning lottery tickets and
beautyful women to

    Bernd Meyer    
    eMail: bernie@wombat.hanse.de   OR   bernies@umibox.hanse.de
    snail: Schafshagenberg 2, D-21077 Hamburg, Germany
     
The wombat address is the preferred one.

All that's left to say is "beep"^h^h^h^h^h^h"ouch" :-)

   Bernie

