diff --git a/makeAltoRecorderCFingering.sh b/makeAltoRecorderCFingering.sh index a9bb43f..9513d32 100755 --- a/makeAltoRecorderCFingering.sh +++ b/makeAltoRecorderCFingering.sh @@ -18,17 +18,25 @@ dir=`pwd` booke=$dir/$1 outdir=$dir/$1-AltoRecorderCFingering -mkdir -p $outdir +mkdir -p $outdir/Compact # Copy book component items. cp $booke/*.txt $outdir echo "Alto Recorder (C Fingering)" > $outdir/instrument.txt -find $booke -depth 1 -name "*.abc" | sort | +find $booke -name "*.abc" | 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` # Transpose concert pitch down a fifth. @@ -46,6 +54,6 @@ find $booke -depth 1 -name "*.abc" | sort | # Transpose. By default abc2abc will report errors in the output, # but this messes up output formatting so stop it. - abc2abc $outdir/$name.abc.tmp -e -t $transpose > $outdir/$name.abc + abc2abc $outdir/$name.abc.tmp -e -t $transpose > $outdir/$compact$name.abc rm $outdir/$name.abc.tmp done diff --git a/makeCello.sh b/makeCello.sh index 572e6c9..c4a789c 100755 --- a/makeCello.sh +++ b/makeCello.sh @@ -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 diff --git a/makeHornInF.sh b/makeHornInF.sh index 0b0e32d..00a30b1 100755 --- a/makeHornInF.sh +++ b/makeHornInF.sh @@ -18,17 +18,25 @@ dir=`pwd` booke=$dir/$1 outdir=$dir/$1-HornInF -mkdir -p $outdir +mkdir -p $outdir/Compact # Copy book component items. cp $booke/*.txt $outdir echo "Horn in F" > $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` # Transpose concert pitch up a fifth. @@ -50,6 +58,6 @@ find $booke -depth 1 -name "*.abc" | sort | # note will otherwise appear in bass clef, which is not what this # crap horn player wants. abc2abc $outdir/$name.abc.tmp -e -t $transpose | \ - sed -e "/^ *K:/s/$/ clef=treble/" > $outdir/$name.abc + sed -e "/^ *K:/s/$/ clef=treble/" > $outdir/$compact$name.abc rm $outdir/$name.abc.tmp done