changeset 538:e9e2488bd0b7 build-default-226

Automated merge with ssh://hg.cryhavoc.org.uk/dottes
author Jim Hague <jim.hague@acm.org>
date Sun, 13 Dec 2015 22:47:40 +0000
parents d0576fb2a928 (current diff) cf2fe741a582 (diff)
children eb6ba914a728 ee737200d07a
files
diffstat 2 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/makeCello.sh	Sun Dec 13 18:50:10 2015 +0000
+++ b/makeCello.sh	Sun Dec 13 22:47:40 2015 +0000
@@ -17,22 +17,24 @@
 # 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;
+    over=$(($2 - 108))
+    if (($over < 0)); then
+        over=0
     fi
-    over=$(($2 - 108))
-    under=$((104 - $3))
-    if (($over <= $under)); then
+    under=$((100 - $3))
+    if (($under < 0)); then
+        under=0
+    fi
+    if (($over < $under)); then
         return 1;
     fi
 
--- a/makeWebGraphics.sh	Sun Dec 13 18:50:10 2015 +0000
+++ b/makeWebGraphics.sh	Sun Dec 13 22:47:40 2015 +0000
@@ -35,5 +35,5 @@
         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