Notes on how to generate a DDPI of your album (using SOX and cue2ddp)

What is written on an AUDIO cd

The audio data is a basic row of bits, the trick is to tell the reader where to put the head to find the correct track. it is done with the cuesheet, it describes where are the tracks and eventually add CD-TEXT information.

You can find good information in the man page of cdrdao and cue2ddp tools on linux/mac and in the links below.

DDP step by step…

1: convert each track to raw file

So basically, once you have your .wav files, you just have to encode them in raw format with the following characteristics:

  • 44100 Hz
  • 16 bits signed integer
  • 2 channels
  • little endian (FYI: cdrdao is using big endian so you should switch to big endian if you want to burn your cd with your home tool. Industrial tools use little endian… make it simple they said…)

sox is your friend to do that.

I added normalization, dithering and stats to sox command. Stats is usefull to see if you have peaks or gain issues

#!/bin/bash


SOURCE=$1
cd $SOURCE

mkdir "raw"

WAV_FILES=`ls *.wav`

for WAV in $WAV_FILES; do
	FILENAME=`basename $WAV`
	echo "File: $WAV"
	sox $WAV -e signed-integer -b 16 -r 44100 -c 2 raw/$FILENAME.raw remix 1 1 gain -hn -3 gain -h dither stats
done

2: Concatenate all raw files in one single raw file

Once you have the raw files, you can put them all together in a single raw file, using cat for instance:

#!/bin/bash

BIN="$1.dat"
SOURCE=$2
cd "$SOURCE/raw"
RAW_FILES=`ls *.raw`

for RAW in $RAW_FILES; do
  FILENAME=`basename $RAW`
  echo "$RAW >>"
  cat $RAW >> $BIN
done

3: Generate the ddpi

The ddpi uses a plain text to generate the ddpi files. this file is identified as the cuesheet, it describes where is the raw file, what is the type of the raw file and where are the tracks and the index of each track. You should ook at the links below to see how to write a cuesheet file. Once you have the cuesheet file, you can generate the ddpi :

cue2ddp -ct -m My_Ref_1234 cuesheet.cdt ddp

Notes: -ct will generate cdtext information based on the cuesheet file. -m is the reference of your album, cuesheet.cdt is your cuesheet file. ddp is the target folder. This folder must be empty.

Links

Notes on creating cuesheet

Cuesheet syntax on wikipedia

Cuesheet syntax

SOX documentation