# HG changeset patch # User Jim Hague # Date 1507906583 -3600 # Node ID 06fec6764661390a12fcd467c6b4dd87c5a5bffe # Parent ce5c7214f9aab0c57f40655b4eafa60499851b0a Revise transposition scripts to make Compact. diff -r ce5c7214f9aa -r 06fec6764661 makeAltoRecorderCFingering.sh --- a/makeAltoRecorderCFingering.sh Fri Oct 13 15:44:15 2017 +0100 +++ b/makeAltoRecorderCFingering.sh Fri Oct 13 15:56:23 2017 +0100 @@ -18,17 +18,25 @@ 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 @@ # 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 -r ce5c7214f9aa -r 06fec6764661 makeCello.sh --- a/makeCello.sh Fri Oct 13 15:44:15 2017 +0100 +++ b/makeCello.sh Fri Oct 13 15:56:23 2017 +0100 @@ -46,17 +46,25 @@ 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 @@ 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 -r ce5c7214f9aa -r 06fec6764661 makeHornInF.sh --- a/makeHornInF.sh Fri Oct 13 15:44:15 2017 +0100 +++ b/makeHornInF.sh Fri Oct 13 15:56:23 2017 +0100 @@ -18,17 +18,25 @@ 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 @@ # 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