Revise transposition scripts to make Compact.

This commit is contained in:
Jim Hague
2017-10-13 15:56:23 +01:00
parent a5b76de484
commit 06f4e5ea57
3 changed files with 33 additions and 9 deletions
+11 -3
View File
@@ -46,17 +46,25 @@ dir=`pwd`
booke=$dir/$1
outdir=$dir/$1-Cello
mkdir -p $outdir
mkdir -p $outdir/Compact
# Copy book component items.
cp $booke/*.txt $outdir
echo "Cello" > $outdir/instrument.txt
find $booke -depth 1 -name "*.abc" | sort |
find $booke -name "*.abc" | sort |
while read filename
do
name=`basename $filename .abc`
dir=`dirname $filename`
basedir=`basename $dir`
compact=""
if [ "$basedir" = "Compact" ]; then
compact="Compact/"
fi
range=`./abcrange.py $filename`
# Move down either one octave or two, depending on the range
@@ -66,5 +74,5 @@ find $booke -depth 1 -name "*.abc" | sort |
middle="d"
fi
sed -e "/^ *K:/s/$/ clef=bass middle=$middle/" $filename > $outdir/$name.abc
sed -e "/^ *K:/s/$/ clef=bass middle=$middle/" $filename > $outdir/$compact$name.abc
done