Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | WP Backend | RSS2 | Atom

« | »

makecdrfiles

Some years ago, cdrecord gained the ability to convert .wav files to an audio CD on the fly. No more messing around with sox! But I've found that it's better to feed files through sox anyways, just to make sure that the file format is correct and the sampling rate is correct:

#!/bin/sh

# makecdrfiles - Convert mp3s to
# .cdr format for an audio CD.
# Copyright 2000-2007 Hal Canary
# Dedicated to the Public Domain.

if [ "$#" -lt 1 ] ; then
  echo "  Useage: $0 file.mp3 [more files.mp3]"
  echo ""
  echo "  After you're done, burn with:"
  echo -n '   sudo cdrecord -v -dao -eject dev=$DEV'
  echo ' -pad -audio *.cdr'
  exit 1
fi
for FILE in "$@" ; do
  nice lame --decode "$FILE" - | \
    nice sox -t wav - "$(basename $FILE .mp3).cdr"
done

I burnt four coasters today before I figured this out.

Hal Canary | Computers & Code | 2007-03-23 11:52:20 UTC
Permanent Link Comments Off | No Comments

Comments are closed.

Copyright 1997-2007 by Hal Canary.
mailto: h3 at halcanary dot org
xmpp:halcanary@jabber.org
aim:halwcanary
http://halcanary.org