diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-12-31 05:04:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-12-31 05:04:42 +0400 |
commit | 71dc8760ff4de5f365330d1bc571d934deb54af9 (patch) | |
tree | 7346d42a282562a3937d82307012b5857d642ce6 /icedax/pitchplay | |
download | cdrkit-71dc8760ff4de5f365330d1bc571d934deb54af9.tar.gz |
Imported Upstream version 1.1.11upstream/1.1.11upstream
Diffstat (limited to 'icedax/pitchplay')
-rwxr-xr-x | icedax/pitchplay | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/icedax/pitchplay b/icedax/pitchplay new file mode 100755 index 0000000..a9f3dc2 --- /dev/null +++ b/icedax/pitchplay @@ -0,0 +1,39 @@ +#! /bin/sh +# +# Script to play audio tracks with different pitches +# through a soundcard (cdda2wav must have soundcard +# support enabled). +# +# Pitches are specified in percentage with 100% being +# the original pitch, 50% being one octave lower, 200% +# one octave higher. +# +# based on a script from Raul Sobon, who created the pitch +# feature. Thanks Raul. +# +# usage: pitchplay <track a> <pitch a> <track b> <pitch b> ... +# +# example: pitchplay 1 90 3 140 5 50 +# will play track 1 with a pitch of 90%, +# track 3 with a pitch of 140%, and +# track 5 with a pitch of 50%. +# +CDDA2WAV=icedax +#CDDA2WAVOPTS="-qeNP0 -n75" +CDDA2WAVOPTS="-qeNP0 -n40" + +if [ $(( $# % 2 )) -eq 0 ]; then + while [ $# -ge 2 ]; do + echo playing track $1 with a pitch of $2% + $CDDA2WAV $CDDA2WAVOPTS -t $1 -p $2 + RES=$? + if [ $RES -ne 0 ]; then + echo "$CDDA2WAV error, return value "$RES". Aborted." >&2 + break + fi + shift 2 + done +else + echo "usage: $0 [<Tracknr> <Pitch>] ..." >&2 +fi + |