diff --git a/dottes.html b/dottes.html index 5da2b45..6061513 100644 --- a/dottes.html +++ b/dottes.html @@ -22,6 +22,29 @@

@SUBTITLE@

+

See below if you'd like to print a book + of these tunes. +

Click on the tune title or first line music for a page showing + the dots for the tune and giving links for downloading the tune + in various formats. If you don't read music, or you'd like to work + on practicing learning tunes by ear, or just playing along with + the tune, click on the learner icon + + for a page where you can listen to the tune repeatedly, either + at the full playing speed or several slower speeds. +

When changes to this site are made, the issue number is incremented. + This is issue @BUILD@. +

+ +
+

The tunes

+
+ +
+
+ +
+

Printing

You can download a PDF with a booklet of these tunes. There is an A5 landscape book with one tune per page, a 4x5in portrait book @@ -33,15 +56,6 @@ A5 booklet. Print this onto A4 paper using both sides of the paper, and fold in half to make an A5 booklet. -

When changes to this site are made, the issue number is incremented. - This is issue @BUILD@. -

- -
-

The tunes

-
- -
diff --git a/dottes.html.learnertune b/dottes.html.learnertune new file mode 100644 index 0000000..806aa5a --- /dev/null +++ b/dottes.html.learnertune @@ -0,0 +1,163 @@ + + + + + Cry Havoc tunes - learning @TITLE@ + + + + + + + + +
+ + + + +
+
+
+
+
+
+

@TITLE@

+

@SUBTITLE@

+
+
+ @COMPOSER@ +
+
+
+

@TITLE@ is in the key of @KEY@. +

+
+
+
+ + diff --git a/dottes.html.tuneindex b/dottes.html.tuneindex index 0cbd262..fe09a78 100644 --- a/dottes.html.tuneindex +++ b/dottes.html.tuneindex @@ -3,7 +3,12 @@ @TITLE@
- @TITLE@ first line + + @TITLE@ first line + + + Learner +
diff --git a/makeWeb.sh b/makeWeb.sh index 07d70a7..a456f10 100755 --- a/makeWeb.sh +++ b/makeWeb.sh @@ -13,6 +13,37 @@ fixtitle() retval=`echo "$1" | sed -e "s/\(.*\), *\(.*\)/\2 \1/"` } +# Format a key in ABC (G, Gmin, etc.) in standard presentation format. +fixkey() +{ + letter=${1:0:1} + accidental=${1:1:1} + if [ "$accidental" != "#" -a "$accidental" != "b" ]; then + accidental="" + mode=${1:1:3} + else + mode=${1:2:3} + fi + mode=${mode,,} + mode=${mode/ //g} + if [ "$mode" = "m" -o "$mode" = "min" ]; then + mode="Minor" + elif [ "$mode" = "mix" ]; then + mode="Mixolydian" + elif [ "$mode" = "dor" ]; then + mode="Dorian" + elif [ "$mode" = "phr" ]; then + mode="Phrygian" + elif [ "$mode" = "lyd" ]; then + mode="Lydian" + elif [ "$mode" = "loc" ]; then + mode="Locrian" + else + mode="Major" + fi + retval="${letter}${accidental} ${mode}" +} + if [ $# -lt 2 -o $# -gt 3 ]; then echo "Usage: makeWeb.sh []" exit 1 @@ -64,6 +95,7 @@ done cp $1-*.pdf $webdir # Now, for each tune, make the tune page. +rm -f $webdir/$tunelist find $bookedir -name "*.abc" | sort | while read filename do @@ -90,28 +122,33 @@ find $bookedir -name "*.abc" | sort | creditvisibility="yes" fi lastchanged=`hg log --limit 1 --template "{date|shortdate}" $filename` + key=`$dir/abcfield.py --field K $filename` + fixkey $key + key=$retval # Copy the ABC into the web. cp $filename $webdir - # If we are not the master booke, link the mp3 in from the + # If we are not the master booke, link the mp3s in from the # master page in a desperate attempt to make IE8 work. # The Jenkins archive will dereference the soft link, it seems, # but I guess I can live with copies of the MP3 for now. if [ "$booke" != "$masterbooke" ]; then pushd ${webdir} > /dev/null - ln -f -s ../${masterbooke}/${name}.mp3 + ln -f -s ../${masterbooke}/*${name}.mp3 popd > /dev/null fi # Generate the tune web page. tunepage=${name}.html + learnerpage=learner-${name}.html # If the title contains HTML character entities, escape # initial '&' in the title - it means things to sed. sed -e "s/@TITLE@/${title//&/\&}/" \ -e "s/@SUBTITLE@/${subtitle}/" \ -e "s/@COMPOSER@/${composer}/" \ + -e "s/@KEY@/${key}/" \ -e "s/@MASTERBOOKE@/${masterbooke}/" \ -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ @@ -121,6 +158,19 @@ find $bookedir -name "*.abc" | sort | -e "s/@LASTCHANGED@/${lastchanged}/" \ -e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage + sed -e "s/@TITLE@/${title//&/\&}/" \ + -e "s/@SUBTITLE@/${subtitle}/" \ + -e "s/@COMPOSER@/${composer}/" \ + -e "s/@KEY@/${key}/" \ + -e "s/@MASTERBOOKE@/${masterbooke}/" \ + -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ + -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ + -e "s/@CHANGEVISIBILITY@/${changevisibility}/" \ + -e "s/@CREDIT@/${credit}/" \ + -e "s/@CREDITVISIBILITY@/${creditvisibility}/" \ + -e "s/@LASTCHANGED@/${lastchanged}/" \ + -e "s/@TUNE@/${name}/" dottes.html.learnertune > $webdir/$learnerpage + sed -e "s/@TITLE@/${title//&/\&}/" \ -e "s/@TUNE@/${name}/" dottes.html.tuneindex >> $webdir/$tunelist done diff --git a/makeWebAudio.sh b/makeWebAudio.sh index 42139e7..f71acdc 100755 --- a/makeWebAudio.sh +++ b/makeWebAudio.sh @@ -16,27 +16,23 @@ builddir=$dir/web/$1 mkdir -p $builddir -# Make MP3 and OGG files for the input .abc. In case we're generating -# to a live site (which we won't be), do this to temp files and rename -# into place to make updates as atomic as possible. +# Make MP3 and OGG files for the input .abc. Since we're listening to +# a doorbell playing the tunes, go for lowest quality (and hence smallest) +# MP3 and OGG. makeaudiofiles() { name=`basename $1 .abc` - tmpname=${name}.tmp - abc2midi $1 -o $builddir/${tmpname}.mid - timidity -OwM -o $builddir/${tmpname}.wav $builddir/${tmpname}.mid - lame -m m -V 9 --quiet $builddir/${tmpname}.wav $builddir/${tmpname}.mp3 + abc2midi $1 -o $builddir/${name}.mid + timidity -OwM -o $builddir/${name}.wav $builddir/${name}.mid + lame -m m -V 9 --quiet $builddir/${name}.wav $builddir/${name}.mp3 # Timidity can generate OGG directly. But we need to generate WAV # for lame, and oggenc produces smaller output. OGG is needed for # Firefox's audio tag. FF doesn't support MP3, some others support # MP3 but not OGG. - oggenc -Q -q 0 -o $builddir/${tmpname}.ogg $builddir/${tmpname}.wav + oggenc -Q -q 0 -o $builddir/${name}.ogg $builddir/${name}.wav - mv $builddir/${tmpname}.mid $builddir/${name}.mid - mv $builddir/${tmpname}.mp3 $builddir/${name}.mp3 - mv $builddir/${tmpname}.ogg $builddir/${name}.ogg - rm $builddir/${tmpname}.wav + rm $builddir/${name}.wav } # Make audio for a new tempo for the abc file $1, giving the output files diff --git a/web/img/learner.png b/web/img/learner.png new file mode 100644 index 0000000..a7115ec Binary files /dev/null and b/web/img/learner.png differ diff --git a/web/index.html b/web/index.html index 3a04cae..15ac215 100644 --- a/web/index.html +++ b/web/index.html @@ -26,8 +26,7 @@ dance-out, there is a music-playing session.

Havoc musicians come in all shades of experience and ability. This collection is intended to help those like me who are inexpert with - instrument and folk music generally, but have a little musical - background.

+ instrument and folk music generally.

Being folk tunes, many of the tunes herein have many variations. The music presented here is my attempt at reflecting what is actually played at Havoc sessions. I'm in no way suggesting that they are