Simple DDP player script

Hi All,

For anybody on Linux needing a convenient way to play a DDP file either in its entirety or beginning at a particular track number, here is my script:


track=$( printf “%02d” $2)
tracktime=$( ddpinfo “$1” | grep “$track 01” | cut -c 8-12 )

if [ -z “$2” ]; then
play -b 16 -r 44100 -c 2 -t raw -e signed-integer “$1”/.DAT trim 0:00
play -b 16 -r 44100 -c 2 -t raw -e signed-integer “$1”/
.DAT trim “$tracktime”

Save the above into a file called playddp or similar and make sure it is executable. Place it in /local/usr/bin or similar to ensure it is available from any where you start your terminal. You basically feed the script your DDP folder and optionally add a starting track number:

e.g. playddp [ddpfolder] [tracknumber]

It uses ddpinfo to figure out track start times from the supplied track number as necessary otherwise it simply begins playback at 0:00. The basic play command was suggested by Andreas Ruge in a forum and I adapted it to play any .DAT file contained within the folder (given that it doesn’t necessarily need to be named the default IMAGE.DAT) as well as starting from a particular track without needing to know the start time. At some point, I’d be interested in creating a GUI for this but will need to brush up on Python or similar…