Date: Sun, 11 May 1997 13:12:01 -0400 (EDT) From: Robert N Watson <rnw@andrew.cmu.edu> To: post+internet.computing.freebsd-multimedia@andrew.cmu.edu Subject: Audio, combo Data/Audio CDR scripts Message-ID: <Pine.SUN.3.93l.970511130013.20239B-400000@apriori.cc.cmu.edu>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Attached using MIME are three scripts to handle the Audio and Data/Audio
CDR creation process. For instructions on using the scripts, look in the
scripts themselves. I have not used these revised scripts -- mine were
written in sh, and I converted them to csh for distribution. This means
they may have problems. Also, the CD-burning process itself is very
fragile on some systems, so that may cause problems. End result: if you
screw up or it screws up, this will be expensive. :) Don't blame me.
I've successfully burned a number of audio and combined audio/data CD's so
far. And destroyed several figuring out how to burn them. One got burnt
little-endian, and is affectionately titled "Little Endian Machines" --
we're thinking about releasing it as an album <jk>. If you have any
changes to submit, either to add functionallity or whatever, email me and
let me know. Thanks :)
1. convert2cdr.csh
Converts stereo 44khz .wav files to .cdr files appropriate for CD-burning.
It also reverses the endian. Requires sox package/port.
3. burn_audio.csh
Burns a set of audio tracks onto the CDR. Set the variable in the script
to your data directory, and place a series of files number 01..99.cdr in
the directory, and it'll burn them on in that order. It actually burns
according to the normal ls output order. I like using 01..99 since it's
easy to tell what order things will turn up in. The .cdr files should
have been generated by the above script -- doing it yourself is risky.
These scripts are designed for the Intel platform, as they reverse the
endian (CD's are burned big endian.)
2. burn_audio_data.csh
Burns one data image to track 1, then burns audio onto the rest.
Again, modify the script to point to the right place for both audio and
data. You can create the cd image with mkisofs included with your system.
See /usr/share/examples/worm/ for more useful stuff.
----
Robert Watson <rnw+@Andrew.cmu.edu>
[-- Attachment #2 --]
#!/bin/csh -f
#
# convert2cdr.csh
#
# Converts little-endian *.wav to big-endian *.cdr for use in audio
# cd burning from an Intel (and ONLY and Intel) machine. It must
# be run in your audio directory. You must have at least as much extra
# disk space as the largest file when you run this script, as it creates
# .cdr files of about the same size as the .wav files, and the new and
# old versions of each file must coexist during the conversion process.
# See below for details. Read the WARNING or things might go badly.
#
# **WARNING**
#
# Failure to use this script on audio files may result in something
# you don't expect on the CD.
#
# This is only going to work on an HP 4020i without modification
# If you have trouble with the HP, try setting "double" to "single"
# - Robert Watson <robert@fledge.watson.org>
#
foreach file (*.wav)
sox -x $file `basename $file .wav`.cdr
rm $file
end
[-- Attachment #3 --]
#!/bin/csh -f
#
# burn_audio_data.csh
#
# Burn one track of data, the rest of audio.
#
# set variable "audioroot" to the path of your big endian .cdr
# files. set datafile to the path and filename of your iso file image.
#
# E.g., audioroot=/homec/cdburn/audio # directory
# dataroot=/homec/cdburn/data/image.cd0 # file
#
# **WARNING**
#
# Using little-endian .wav files may not give you music, you must
# first convert all files to big-endian .cdr files. See convert2cdr.csh
# script
#
# This is only going to work on an HP 4020i without modification
# If you have trouble with the HP, try setting "double" to "single"
# - Robert Watson <robert@fledge.watson.org>
#
set audioroot=/homec/cdburn/audio
set datafile=/homec/cdburn/data/image.cd0
scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" >& /dev/null
wormcontrol select HP 4020i
wormcontrol prepdisk double
wormcontrol track data
rtprio 5 team -v 1m 5 < $datafile | rtprio 5 dd of=/dev/rworm0 obs=20k
foreach trackfile ( ${audioroot}/*.cdr )
wormcontrol track audio
echo -n ${trackfile}...
rtprio 5 team -v 1m 5 < $trackfile | rtprio 5 dd of=/dev/rworm0 obs=23520
echo done
end
wormcontrol fixate 1 onp
[-- Attachment #4 --]
#!/bin/csh -f
#
# burn_audio.csh
#
# Burn audio cd
#
# set variable "audioroot" to the path of your big endian .cdr
# files.
#
# E.g., audioroot=/homec/cdburn/audio # directory
#
# **WARNING**
#
# Using little-endian .wav files may not give you music, you must
# first convert all files to big-endian .cdr files. See convert2cdr.csh
# script
#
# This is only going to work on an HP 4020i without modification
# If you have trouble with the HP, try setting "double" to "single"
# - Robert Watson <robert@fledge.watson.org>
#
set audioroot=/homec/cdburn/audio
scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" >& /dev/null
wormcontrol select HP 4020i
wormcontrol prepdisk double
echo "Initialized..."
foreach trackfile ( ${audioroot}/*.cdr )
wormcontrol track audio
echo -n ${trackfile}...
rtprio 5 team -v 1m 5 < $trackfile | rtprio 5 dd of=/dev/rworm0 obs=23520
echo done
end
wormcontrol fixate 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.93l.970511130013.20239B-400000>
