Interesting Behavior from Grub, How to Make it Beep

Martin McCormick martin at
Thu Dec 21 15:14:37 UTC 2006

Lars =?iso-8859-1?Q?Bj=F8rndal?= writes:
> Interesting! Could you please tell us how you set up your system as a tape
> recorder? Is the features available from the console? Which software
> are you using, and so on...?

	I am not doing anything
terribly unique.  What I meant really is that I am using that
system in place of buying a nice tape recorder like I might have
done twenty or thirty years ago.

	You need to know which sound system your computer uses
and then enable ALSA in your kernel.  The idea is to only build
the modules you need to support ALSA which stands for Advanced
Linux Sound Architecture because including stuff that isn't on
your computer will waste memory and maybe cause the system to
hang while it looks for things that aren't there.

	Once you get alsa working, you can then install various
sound utilities such as the alsa utilities like aplay and
arecord, a mp3 player like mpg123 and mplayer to listen to
streaming audio.

	You will also want amixer to control the settings on
your sound card from the command line.  You will need to make
amixer print out all the possible controls and their settings
and then you can set them to the way you need for whatever you
are doing.

	ALSA which stands for Advanced Linux Sound Architecture
is the heart of everything that has to do with sound in Linux.
Get that working and lots of other neat things are available.

	Several people on this list have suggested different
sound editing programs and the like but they all need ALSA so you
need that first.

	One thing I use a lot is sox or Sound Exchange.  It
technically doesn't need a sound card because it is a data
processing utility you can use to do some editing of files,
modify the speed or pitch of recordings and readjust audio levels
within certain limits.  The command interface can be down-right
ugly at times so get good with shell scripts and you will be
happier with it.

	So, when I talk about using a computer as a tape
recorder, that is kind of a figure of speech.  I haven't yet
found a good command-line player that, say, has a way of easily
rewinding or fast-forwarding a .wav file, for example.  mplayer
will let you do that when it is running, but it only plays
certain types of files so you can't use mplayer for everything.

	Generally, the computer lets you do a lot of things you
only dreamed about doing with a conventional tape recorder.  A
few operations like fast-forward and rewind are different or hard
to do due to the way digital sound technology works, but one
certainly gets more bang for the Buck in the digital world than
we used to get.

	Finally, Linux sets up a standard framework for the sound
system that all the utilities like ecasound and mplayer use.  You
can actually play with this a bit without going to too much
trouble.  If you set your sound controls to record from the
Line-in or Microphone jack and have a sound source ready, you can
make a recording by simply typing

cat /dev/dsp >somefile.dsp

This will record sound at 8,000 samples per second with 8 bits
per sample for as long as you have space on your disk drive.
Just hit Control-C to stop the recording.  To play it back, type

cat somefile.dsp >/dev/dsp and you should begin to hear the
recording you just made.  Since it is at 8,000 samples per second
and 8-bits per sample, it will be terrible for music and okay for
voice.  It is like recording tape at 15/16 inches per second
instead of 7.5 or 15 IPS.  In the digital world, the same natural
rules apply plus a few more.  The best sound quality uses the
highest sampling rates and eats up much more media per second
than does a low-fidelity recording.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group

More information about the Blinux-list mailing list