From 6d6fffa05066ea27e9fda6a140d78c44af5fbbf7 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Sun, 13 Dec 2015 22:46:55 +0000 Subject: [PATCH 1/2] Fix typo in filename to delete. --- makeWebGraphics.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makeWebGraphics.sh b/makeWebGraphics.sh index 1dd6130..aed1186 100755 --- a/makeWebGraphics.sh +++ b/makeWebGraphics.sh @@ -35,5 +35,5 @@ find $booke -name "*.abc" | sort | abcm2ps -E -F singletuneweb -O $builddir/$name.eps $filename # And make the corresponding PDF. epstopdf --outfile=$builddir/$name.pdf $builddir/${name}001.eps - rm $builddir/${name}.001.eps + rm $builddir/${name}001.eps done From 3fc263e2079ace1e114b6edf75923e858924c35d Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Sun, 13 Dec 2015 22:47:24 +0000 Subject: [PATCH 2/2] Try Cello transposition algorithm again. --- makeCello.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/makeCello.sh b/makeCello.sh index 7f7e4f2..67ca279 100755 --- a/makeCello.sh +++ b/makeCello.sh @@ -17,22 +17,24 @@ fi # octave. $2 is highest note, $3 is lowest note. # # If range is G to d', transpose down 2 octaves. -# If lowest note is < C, transpose down 1 octave. # Otherwise calculate the distance above d for the highest note on a one -# octave transposition, and the distance below G on a two octave +# octave transposition, and the distance below C on a two octave # transposition. Find the smallest, and use the corresponding -# transposition. +# transposition, preferring 2 octaves in case of a tie. transposedowntwo() { if (($3 >= 104 && $2 <= 115)); then return 0; fi - if (($3 < 100)); then - return 1; - fi over=$(($2 - 108)) - under=$((104 - $3)) - if (($over <= $under)); then + if (($over < 0)); then + over=0 + fi + under=$((100 - $3)) + if (($under < 0)); then + under=0 + fi + if (($over < $under)); then return 1; fi