[linux-audio-user] cd burning w/out gaps

R Parker rtp405 at yahoo.com
Fri Apr 30 07:56:51 EDT 2004


Hi,

I see a few other folks replied with good answers.
Like some of them, I use cdrdao and a script. You
probably have a solution so this won't be particularly
interesting. Reguardless, I'll post my script. It
might be helpful to someone.

The script assumes a directory structure '~/clients/'.
When run, it searches clients and asks which one to
burn a CD for. After making your choice, it searches 
'~/clients/clientname/master' for *.wav. You are then
prompted to specify the amount of time between each
track. The format is 00:00:00. A minimum of 00:00:01
seems to be required.

The script generates the file cd.toc based on the
contents of ~/clientname/master. The script will ask
you if you want to use an existing TOC or generate a
new one.

This script isn't an example of good code. I needed a
solution and cobled it together.

Incidentally, I also use a script to add clients into
'~/clients/'. I require about eight subdirectories for
each. That's why the script is designed with a hard
coded directory stucture. In my studio data management
is not left to the engineers discretion. Everyone of
us manages their data exactly the same way.

If you add the following function to your .bashrc,
then at a command prompt 'client-mastercd'.

client-masterCD ()
{
~/.bin/mastercd
}

I've got a dozen or so tasks that each engineer must
run so having a series of functions named
client-whatever in .bashrc helps.

--------------------
#!/bin/bash
#rtp405 at yahoo.com
#CD-R device lines must be edited for each system.

clear

ROOT_UID=0     # This script must be run as root.
E_NOTROOT=67   # Non-root exit error.

if [ "$UID" -ne "$ROOT_UID" ]
then
  echo "Must be root to run this script."
    exit $E_NOTROOT
fi

PS3='Select a client directory: '

choice_of()
{
select directory
do
echo
echo
break
done
}

choice_of ~/clients/*

#Existing Table of Contents.
existing_toc()
{
echo "Burning CD based on existing Table of Contents
from $directory/master/cd.toc."
sleep 2
cdrdao write --device 1,6,0 --speed 4
$directory/master/cd.toc
}

#New Table of Contents.
new_toc()
{
rm -f $directory/master/cd.toc
echo "CD_DA"                            >>
$directory/master/cd.toc

for i in `ls $directory/master/*.wav | tr '\n' ' '`;do

echo "TRACK AUDIO"                      >>
$directory/master/cd.toc
echo -n "Please enter the 'silence', i.e. mm:ss:ff : "
read "silence"                          #location and
syntax???
echo SILENCE $silence                   >>
$directory/master/cd.toc
echo START                              >>
$directory/master/cd.toc
echo "AUDIOFILE \"${i%.*}.wav\" 0"      >>
$directory/master/cd.toc
done
}

echo 1. Use existing Table of Contents
echo 2. Generate a new Table of Contents
echo "Enter "1" or "2" as your choice:"
read choice

case $choice in
1) existing_toc # call the existing_toc() function
;;
*) new_toc # call the new_toc() function
;;
esac

echo "Table of contents file $directory/master/cd.toc
has been built"

sleep 3

clear

echo ""
echo "You're burning a CD based on the contents of
$directory/master"
echo ""

cdrdao write --device 1,6,0 --speed 4
$directory/master/cd.toc

exit 0
-----------------------

Example TOC file:
-------------------------
CD_DA
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/01searching02-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/02dave-fast-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/03amor-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/04patience-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/05helping-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/06city-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/07blood-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/08ode-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/09insane-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/10whipper-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/11doctor-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/12every-16bit-441.wav"
0
TRACK AUDIO
SILENCE 00:00:01
START
AUDIOFILE
"/mnt/raid5/studio/clients/lou/master/13dave-slow-16bit-441.wav"
0
-----------------------------

ron

--- rossen <rossen at protein.osaka-u.ac.jp> wrote:
> Hi all...
> 
> There was a discussion some time ago about
> burning a CD without the automatic 2 sec gap
> between the tracks. I didn't really follow it until
> I needed
> to do the same thing. Sorry if I'm repeating an old
> posting
> but I found that cdrecord has an option,
> defpregap, that can be used in this case. Just give
> 
> $cdrecord defpregap=0  -other-options *.wav
> 
> and it works. The tracks are searchable,and still
> the mix
> goes uninteruppted. Unfortunately, the man page says
> "This option may go away in the future":(
> 
> -- rossen



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 



More information about the Linux-audio-user mailing list