3 # Script to play audio tracks with different pitches
4 # through a soundcard (cdda2wav must have soundcard
7 # Pitches are specified in percentage with 100% being
8 # the original pitch, 50% being one octave lower, 200%
11 # based on a script from Raul Sobon, who created the pitch
12 # feature. Thanks Raul.
14 # usage: pitchplay <track a> <pitch a> <track b> <pitch b> ...
16 # example: pitchplay 1 90 3 140 5 50
17 # will play track 1 with a pitch of 90%,
18 # track 3 with a pitch of 140%, and
19 # track 5 with a pitch of 50%.
22 #CDDA2WAVOPTS="-qeNP0 -n75"
23 CDDA2WAVOPTS="-qeNP0 -n40"
25 if [ $(( $# % 2 )) -eq 0 ]; then
26 while [ $# -ge 2 ]; do
27 echo playing track $1 with a pitch of $2%
28 $CDDA2WAV $CDDA2WAVOPTS -t $1 -p $2
30 if [ $RES -ne 0 ]; then
31 echo "$CDDA2WAV error, return value "$RES". Aborted." >&2
37 echo "usage: $0 [<Tracknr> <Pitch>] ..." >&2