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

Enregistrer la sortie audio sur debian

Installation

Installer pulseaudio et sox,

Lancer pulseaudio :

 pulseaudio start

Récupérer la liste des entrée/sortie disponibles

 pactl list

Enregistrement

Enregistrer l’entrée monitor qui est une copie de la sortie audio dans un fichier wav 44kHz, 16 bit (entier signé) sur 2 canaux

 parec -d alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor |sox -t raw -r 44k -b 16 -e signed-integer -c 2 - music.wav

Pour cibler le maximum de qualité en sortie, on peut passer sur du 64bit a virgule flotante:

 
 parec -d alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor |sox -t raw -r 44k -b 64 -e float -c 2 - music.wav

Pas de son sur la Dapper

La nouvelle version d’Ubuntu ET Kubuntu, la Dapper, n’aime la carte Asus A7V8X-X. Bizarrement sur le live CD, pas de problème, le son fonctionne, mais une fois l’installation effectuée plus de son.

J’ai comparé les listings de lspci et lsmod sur le liveCD et sur le DD, ils sont identiques…

$ lspci

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
$ lsmod |grep snd

snd_seq_dummy           3844  0
snd_seq_oss            33536  0
snd_seq_midi            9376  0
snd_seq_midi_event      7552  2 snd_seq_oss,snd_seq_midi
snd_seq                51984  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_via82xx            28824  0
gameport               15496  2 analog,snd_via82xx
snd_ac97_codec         93088  1 snd_via82xx
snd_ac97_bus            2304  1 snd_ac97_codec
snd_pcm_oss            53664  0
snd_mixer_oss          18688  1 snd_pcm_oss
snd_pcm                89864  3 snd_via82xx,snd_ac97_codec,snd_pcm_oss
snd_timer              25220  2 snd_seq,snd_pcm
snd_page_alloc         10632  2 snd_via82xx,snd_pcm
snd_mpu401_uart         7808  1 snd_via82xx
snd_rawmidi            25504  2 snd_seq_midi,snd_mpu401_uart
snd_seq_device          8716  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq,snd_rawmidi
snd                    55268  11 snd_seq_oss,snd_seq,snd_via82xx,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore              10208  1 snd

$ cat /dev/sndstat
Sound Driver:3.8.1a-980706 (ALSA v1.0.10rc3 emulation code)
Kernel: Linux oblivion 2.6.15-26-386 #1 PREEMPT Thu Aug 3 02:52:00 UTC 2006 i686
Config options: 0

Installed drivers:
Type 10: ALSA emulation

Card config:
VIA 8235 with AD1980 at 0xe000, irq 201

Audio devices:
0: VIA 8235 (DUPLEX)

Synth devices: NOT ENABLED IN CONFIG

Midi devices: NOT ENABLED IN CONFIG

Timers:
7: system timer

Mixers:
0: Analog Devices AD1980

Ca sent le conflit d’applications mais lsof n’est pas bavard :

$ lsof /dev/snd
$ lsof /dev/audio
$ lsof /dev/mixer

Le pire c’est que arts « voit » le son passer (les graphes oscillent) mais rien sur les H.P. … (les cables sont branchés et le mixer n’est pas en mute)

LA SOLUTION (sur Kubuntu) :
Par défaut Kmix active le surround et à première vue la ASUS n’aime pas.
Dans l’onglet Interrupteur de Kmix il faut désactiver le « exchange front/surround » et tout rentre dans l’ordre.

Pour faire simple : désactivez tous les boutons de l’onglet Interrupteur de Kmix.

Voila ; )