changeset 751:9a6c27f6d13d build-default-287

Merge with upstream.
author Jim Hague <jim.hague@acm.org>
date Fri, 13 Oct 2017 16:17:56 +0100
parents c2460aa9b4eb (diff) f176aa95c523 (current diff)
children 36847c35b467 b83b49f2a0a0
files
diffstat 20 files changed, 223 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/BearDance.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,10 @@
+X:1
+T:Bear Dance
+M:2/4
+L:1/16
+Q:1/4=120
+K:Em
+"Em" B2 E2 E4| B2 E2 E3 F| G2G2F2G2|"D" A4G2A2| \
+|"Em" B2B2 "D" A2A2|"Em" G2G2 "D" F4|"Em" E2G2 "D" F2D2|"Em" E4 E4:|
+"Em" E2G2E2G2|"D" F2D2D4|"C" E2G2E2G2|"D" A4G2A2| \
+|"Em" B2B2 "D" A2A2|"C" G2G2 "D" F4|"Em" E2G2 "D" F2D2|"Em" E4 E4:|
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/CaptainRock.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,13 @@
+X: 1
+T: Captain Rock's Farewell
+M: 3/4
+L: 1/4
+Q: 140
+R: Waltz
+K: Gmaj
+D |: "G" G>AB | d>BA | "C" G>EC | "G" D/G/-G D | "G" G>AB |
+d>BG | [1 "G" B/d/-dB | "D" A2 D :| [2 "D" A/B/-B A | "G" G2 d ||
+"G" d>Bd | "C" g>eg | "G" d>BG | B/d/-d d | "G" d>Bd |\
+"C" g>eg | "G" d>BG | "D" A2 D |
+"G" G>AB | d>BA |\
+"C" G>EC | "G" D/G/-GD | G>AB | d>BG | "D" A/B/-B A | "G" G2 |]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/FromNightTillMorn.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,13 @@
+X:1
+T:From Night Till Morn
+M:4/4
+L:1/8
+Q:140
+K:G
+dc | "G" B2B2B2G2 | "D" AGAB "G" G2AB | "Am" cBAG "G" GABc | "D" d2ec B2dc |
+        "G" B2B2B2G2 | "D" AGAB "G" G2AB | "Am" cBAG "G" GABG |\
+         [1  "D" A4  "G" G2 :| [2 "D" A4 "G" G4 |]
+"G"  GABc "D" d2d2| "D" d2  e2  d4 | "C" e2d2 "G" g2B2 | "D" d2ec B2A2 |\
+        "G" B2B2B2G2 | "D" AGAB "G" G2AB |
+        "Am" cBAG "G" GABc | "D" d2ec B2A2 |\
+        "G" B2B2B2G2 | "D" AGAB "G" G2AB | "Am" cBAG "G" GABG | "D" A4 "G" G4 :|
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/KingOfTheFairies.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,20 @@
+X: 1
+T: King Of The Fairies
+M: 4/4
+L: 1/8
+Q: 140
+R: Hornpipe
+N: Dottes: Change: <LanigansBall.abc>.
+K: Em
+B,2 |\
+|: "Em" (ED)EF (GF)GA | B2B2 G3 A | B2E2 (EF)GE | "D" (FG)FE D3 B, |\
+"Em" (ED)EF (GF)GA | (BA)(GB) "D" d3 c |
+"Em" B2E2 "Bm" (GF)(ED) | [1 "Em" E6 B,2 :| [2 "Em" E6 z2 ||\
+|: "Em" e2 e2 (Bd)ef | (ga)gf "C" e3 f | "Em" e2 B2 (BA)B^c |\
+"Bm" (de)d^c (Bc) (3(dcB) |
+"Em" e2 B2 (Bd)ef |\
+(ga)gf "C" e3 f | "Em" (gf) (3(efg) "D" (fe) (3(def) |\
+"Em" e2 (ed) e3 f | g2 z e "D" f2 z d | "Em" (ed)(B^c) "Bm" d3 e |
+"D" (dB)AF "Em" (GA)B^c | "Bm" (dB)(AF) "Em" (GF)(ED) |\
+B,2 E2 (EF)GA | B2 e2 (ed)ef | e2 B2 "Bm" (BA)(GF) |\
+[1 "Em" E6 z d :| [2 "Em" E6 |]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/MidsummerWaltz.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,19 @@
+X:1
+T:Midsummer Waltz, The
+C:Ed Pritchard
+O:England
+R:Waltz
+M:3/4
+K:G
+L:1/4
+Q:140
+"D" D B A | "G" G2 A | B>c d | "D" A3 | "G" B B A |\
+"Em" G2 G | "Am" A2 G | "D" F/D/-D2 |\
+"D" D B A | "G" G2 A | B>c d | "D" A3 | "Am" E c B |
+"D" A2 B | "C" G3-| "G" G3 :|\
+"G" B>A B | "Am" c>B c | "Bm" d>c d | "C" e3 | "Em" e2 d |\
+"C" c2 B | "Am" A2 G | "D" F/D/-D2 | "G" B>A B | "Am" c>B c |
+"Bm" d2 e | "D" A3 | "Am" E c B | "D" A2 B | "C" G3- |\
+"G" G3 | "G" B>A B | "Am" c>B c | "Bm" d>c d | "C" e3 |
+"Em" e2 d | "C" c2 B | "Am" A2 G | "D" F/D/-D2 | "D" D B A |\
+"G" G2 A | "G" B>c d | "D" A3 | "Am" E c B | "D" A2 B | "C" G3- | "G" G3 |]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/SussexCotillion.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,14 @@
+X: 1
+T: Sussex Cotillion
+N: Goes into Mount Hills
+Q: 1/4=130
+M: 4/4
+L: 1/4
+K: G
+N: Dottes: Change: <MountHills.abc>
+D | "G" G2 "D" d>c | "Em" B/c/A/B/ G A/B/ | "C" c B A G | "D" F/G/A/F/ D>D |
+"C" E D/E/ "D" F E/F/ | "G" G/F/G/A/ "Em" G "C" c | "G" B A/G/ "D" A G/F/ | "G" G2 G :|
+B/c/ | "G" d d/c/ B B/c/ | d/e/d/c/ B d | "C" e d e f | "G" g f/e/ d2 |\
+"G" g f/e/ d d | "C" e d/c/ "G" B A/B/ |
+"C" c B "Am" A G | "D" F/G/A/F/ D>D |\
+"C" E D/E/ F E/F/ | "G" G/F/G/A/ "Em" G c | "G" B A/G/ "D" A G/F/ | "G" G2 G :|
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Session/Compact/WhinshieldsHornpipe.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -0,0 +1,21 @@
+X: 1
+T: Whinshields Hornpipe
+C: J. L. Dunk
+M: C
+L: 1/8
+Q: 160
+R: hornpipe
+K: Gmaj
+dc |\
+"G" B2 G2 G2 B2 | "D7" A2 D2 D2 D2 | "G" G2 G2 GABc |\
+d2>B2 d2 g2 |"C" e2 c2 c2 e2 |
+"G" d2 G2 G2 AB |\
+[1 "Am" c2 B2 "A7" A2 G2 | "D7" F2 A2 d2 :|\
+[2 "Am" cBAG "D7" F2 d2 | "G" G4 ||\
+|: d2 |\
+"G" g2>a2 gfed | B2 G2 G2 AB | "Am" cBcd cBAG |
+"D7" F2 A2 A2 d2 | "G" g2>a2 gfed |\
+ B2 G2 G2 B2 | "A7" A2 A2 B2 ^c2 | "D" d4 "D7" d2 | "G" g^fgf gfed |\
+ B2 G2 G2 AB |
+ "D7" cBcd cBAG | F2 A2 d2 dc | "G" B2 G2 G2 B2 | "D7" A2 D2 D2 B2 |\
+ "C" cBAG "D7" F2 d2 | "G" G4 :|
--- a/Session/WhinshieldsHornpipe.abc	Fri Oct 13 12:26:58 2017 +0100
+++ b/Session/WhinshieldsHornpipe.abc	Fri Oct 13 16:17:56 2017 +0100
@@ -11,7 +11,7 @@
 d2>B2 d2 g2 |"C" e2 c2 c2 e2 |
 "G" d2 G2 G2 AB |\
 [1 "Am" c2 B2 "A7" A2 G2 | "D7" F2 A2 d2 :|\
-[2 "Am" cBAG "D7" F2 d2 | "G" G4 |]
+[2 "Am" cBAG "D7" F2 d2 | "G" G4 ||
 |: d2 |\
 "G" g2>a2 gfed | B2 G2 G2 AB | "Am" cBcd cBAG |\
 "D7" F2 A2 A2 d2 | "G" g2>a2 gfed |
--- a/dottes.tex.firstline-tune	Fri Oct 13 12:26:58 2017 +0100
+++ b/dottes.tex.firstline-tune	Fri Oct 13 16:17:56 2017 +0100
@@ -1,1 +1,1 @@
-\showfirstline{$name}{$fulltitle}{$graphicsdir/firstline-$name}
+\showfirstline{$name}{$fulltitle}{$firstlineimagefile}
--- a/dottes.tex.tune	Fri Oct 13 12:26:58 2017 +0100
+++ b/dottes.tex.tune	Fri Oct 13 16:17:56 2017 +0100
@@ -1,5 +1,5 @@
 \tunestart
-\showtune{$name}{$title}{$subtitle}{$fulltitle}{$tradition}{$composer}{$parts}{$graphicsdir/$name}
+\showtune{$name}{$title}{$subtitle}{$fulltitle}{$tradition}{$composer}{$parts}{$tuneimagefile}
 $notes
 
 $history
--- a/makeAll.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeAll.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -9,12 +9,20 @@
 
 makeABooke()
 {
+    # Print graphics.
     ./makeGraphics.sh "$1"
+
+    # Normal graphics printed output.
     ./makeBookeTunePages.sh "$1"
     ./makeBooke.sh A4 "$1"
+    ./makeBooke.sh Nook "$1"
+
+    # Compact graphics printed output.
+    ./makeBookeTunePages.sh --use-compact "$1"
     ./makeBooke.sh A5 "$1"
     ./makeBooklet.sh "$1"
-    ./makeBooke.sh Nook "$1"
+
+    # Web output.
     ./makeWebGraphics.sh "$1"
     ./makeWebAudio.sh "$1"
     ./makeWeb.sh "$1" "$1" "$2"
@@ -22,12 +30,20 @@
 
 makeATransposedBooke()
 {
+    # Print graphics.
     ./makeGraphics.sh "$1"
+
+    # Normal graphics printed output.
     ./makeBookeTunePages.sh "$1"
     ./makeBooke.sh A4 "$1"
+    ./makeBooke.sh Nook "$1"
+
+    # Compact graphics printed output.
+    ./makeBookeTunePages.sh --use-compact "$1"
     ./makeBooke.sh A5 "$1"
     ./makeBooklet.sh "$1"
-    ./makeBooke.sh Nook "$1"
+
+    # Web output. Uses audio from main booke.
     ./makeWebGraphics.sh "$1"
     ./makeWeb.sh "$1" "$2" "$3"
 }
--- a/makeAltoRecorderCFingering.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeAltoRecorderCFingering.sh	Fri Oct 13 16:17:56 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 -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
--- a/makeBooke.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeBooke.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -17,6 +17,12 @@
 builddir=$dir/build
 booketex=$builddir/dottes.tex
 bookepdf=$builddir/dottes.pdf
+usecompact=""
+
+if [ "$1" = "--use-compact" ]; then
+    usecompact="yes"
+    shift
+fi
 
 papersize=$1
 shift
--- a/makeBookeTunePages.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeBookeTunePages.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -8,8 +8,15 @@
 # makeGraphics.sh to make these.
 #
 
+usecompact=""
+
+if [ $# -gt 1 -a "$1" = "--use-compact" ]; then
+    usecompact="yes"
+    shift
+fi
+
 if [ $# != 1 ]; then
-    echo "Usage: makeBookeTunePages.sh <book dir name>"
+    echo "Usage: makeBookeTunePages.sh [--use-compact] <book dir name>"
     exit 1
 fi
 
@@ -25,11 +32,28 @@
 
 rm -f $tunesoutput $indexoutput
 
-# Now, for each tune, make the tune graphic and add it, inside a
-# centre section, so the document. Then add a TOC entry.
-find $booke -name "*.abc" | sort |
+# Now, for each tune, build the tunes part and the first line sections
+# of the document.
+find $booke -depth 1 -name "*.abc" | sort |
     while read filename
     do
-        $dir/abctemplate.py --latex --value "graphicsdir=$graphicsdir" --template $dir/dottes.tex.tune $filename >> $tunesoutput
-        $dir/abctemplate.py --latex --value "graphicsdir=$graphicsdir" --template $dir/dottes.tex.firstline-tune $filename >> $indexoutput
+        name=`basename $filename .abc`
+        tuneimagefile="${graphicsdir}/${name}"
+        compacttuneimagefile="${graphicsdir}/compact-${name}"
+        firstlineimagefile="${graphicsdir}/firstline-${name}"
+
+        if [ "$usecompact" -a -f ${compacttuneimagefile}.pdf ]; then
+            tuneimagefile=$compacttuneimagefile
+        fi
+
+        $dir/abctemplate.py \
+            --latex \
+            --value "tuneimagefile=${tuneimagefile}" \
+            --template $dir/dottes.tex.tune \
+            $filename >> $tunesoutput
+        $dir/abctemplate.py \
+            --latex \
+            --value "firstlineimagefile=${firstlineimagefile}" \
+            --template $dir/dottes.tex.firstline-tune \
+            $filename >> $indexoutput
     done
--- a/makeCello.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeCello.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -46,7 +46,7 @@
 booke=$dir/$1
 outdir=$dir/$1-Cello
 
-mkdir -p $outdir
+mkdir -p $outdir/Compact
 
 # Copy book component items.
 cp $booke/*.txt $outdir
@@ -57,6 +57,14 @@
     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
--- a/makeGraphics.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeGraphics.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -17,7 +17,7 @@
 mkdir -p $graphicsdir
 
 # Now, for each tune, make the tune graphic.
-find $booke -name "*.abc" | sort |
+find $booke -depth 1 -name "*.abc" | sort |
     while read filename
     do
         name=`basename $filename .abc`
@@ -42,3 +42,24 @@
         pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf
         rm $graphicsdir/firstline-$name-tocrop.pdf
     done
+
+# And make any compact tune graphics.
+if [ ! -d ${booke}/Compact ]; then
+    exit
+fi
+
+find ${booke}/Compact -depth 1 -name "*.abc" | sort |
+    while read filename
+    do
+        name=`basename $filename .abc`
+
+        # Make the tune graphic.
+        abcm2ps -E -F singletune -O $graphicsdir/compact-${name}.eps $filename
+        # Make $name.eps so we can build with LaTeX.
+        mv $graphicsdir/compact-${name}001.eps $graphicsdir/compact-${name}.eps
+        # And make the corresponding PDF.
+        epstopdf --outfile=$graphicsdir/compact-${name}-tocrop.pdf $graphicsdir/compact-${name}.eps
+        # And crop it, so the graphic is as big as possible on the page.
+        pdfcrop $graphicsdir/compact-${name}-tocrop.pdf $graphicsdir/compact-${name}.pdf
+        rm $graphicsdir/compact-${name}-tocrop.pdf
+    done
--- a/makeHornInF.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeHornInF.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -18,7 +18,7 @@
 booke=$dir/$1
 outdir=$dir/$1-HornInF
 
-mkdir -p $outdir
+mkdir -p $outdir/Compact
 
 # Copy book component items.
 cp $booke/*.txt $outdir
@@ -29,6 +29,14 @@
     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
--- a/makeWeb.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeWeb.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -67,7 +67,7 @@
 # Now, for each tune, make the tune page.
 rm -f $webdir/$tunelist
 declare -a filenames
-filenames=(`find $bookedir -name "*.abc" | sort`)
+filenames=(`find $bookedir -depth 1 -name "*.abc" | sort`)
 nofiles=${#filenames[@]}
 for (( i=0; i < ${nofiles}; i++ ))
 do
--- a/makeWebAudio.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeWebAudio.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -66,7 +66,7 @@
 }
 
 # Generate audio files and slow speed (currently half speed) audio files.
-find $booke -name "*.abc" | sort |
+find $booke -depth 1 -name "*.abc" | sort |
     while read filename
     do
         makeaudiofiles $filename
--- a/makeWebGraphics.sh	Fri Oct 13 12:26:58 2017 +0100
+++ b/makeWebGraphics.sh	Fri Oct 13 16:17:56 2017 +0100
@@ -20,7 +20,7 @@
 # Now, for each tune, make the main tune and tune first line bitmaps.
 # Do this to temp files and rename into place to make updates as
 # atomic as possible.
-find $booke -name "*.abc" | sort |
+find $booke -depth 1 -name "*.abc" | sort |
     while read filename
     do
         name=`basename $filename .abc`