Mercurial > dottes
diff makeHornInF.sh @ 749:06fec6764661
Revise transposition scripts to make Compact.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Fri, 13 Oct 2017 15:56:23 +0100 |
parents | ce5c7214f9aa |
children | 1a838d8dca2a |
line wrap: on
line diff
--- 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