How to setup a sound recording system
=====================================

Purpose:
========
You can produce cd-like quality (depending on your soundcard and cables and ...) with your
linux box. To make it more simple you can use tty_ctrl for your recordings. The main advantage
is that you'll have a start recording and a stop button.
I have tested this with a 486-DX2-66 and the results were great.
Thanks to the people who wrote the linux audio quality howto.
You should read the linux audio quality howto first.

License:
========
Copyright (C) 2002 by Peter Pfrang <peter.pfrang@gmx.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Installation-Guide:
===================
0. You'll need the following programms installed on your machine:
    alsa: amixer arecord aplay
    perl
    sox
    tty_ctrl
    enough diskspace for your recordings (approximately 650 MB for 74 minutes of music)

1. The first thing to do ist to unpack the scripts to any path e.g. /etc/tty_ctrl/sound_recording.
2. Read the description of the scripts.
3. Modify the scripts for your machine (path's and users).
4. Copy the scripts to /etc/tty_ctrl (do not forget to back up your own scripts!).
5. Copy your bdflush file to /etc/tty_ctrl:
   cp /proc/sys/vm/bdflush /etc/tty_ctrl/orig_bdflush
6. Check the permission of the files in /etc/tty_ctrl.
7. You've done it!
8. Enjoy recording.




Explanation of the scripts:
===========================

Button 1:
Sets up the system for sound recording: all services not necessary for this will be stopped.
The work is done by the script sound_rec_system.

Button 4:
Starts recording of the file.

Button 5:
Stops recording of the file.
Before burning this file on a cd-rom, you'll have to correct some parameters of the .wav file, this will be
done by sox, by typing:
sox your_record.wav cd_recordable.wav

Button 7:
If you're finished with recording and want to use your System as normal. The normal services will be started again.
The work is done by the script no_sound_rec_system.

sound_rec_system:
All daemons that are not necessary for sound recording are killed and the synchronisation
of the harddisk is changed. The parameters from the sound_bdflush work fine for the recording job, but
not for all other jobs.
The services that have to be stopped may vary, so you ought to check this script for your system.

no_sound_rec_system:
The normal services will be started. The services that have to be stopped may vary, so you ought to check this script for your system.

look_for_name:
Perl script counting the number of files with the endind .wav in a special directory and returns the next number for a file.

orig_bdflush:
Your original file taken from /proc/sys/vm/bdflush. (You should copy this file as mentioned in step 5 of the installation guide.)

sound_bdflush:
File will be copied to /proc/sys/vm/bdflush. File taken from the audion quality howto:
All data will be directly written to disk, no data will be stored in ram.

