comparison makeWebGraphics.sh @ 223:0ef955669a9a

Make transposed tunes use the original audio. The aim of MIDI and MP3 is to allow the user to hear what a tune sounds like. For transposed bookes, I think this should be reused from the main booke page, because hearing it at the transposed pitch isn't a major help. And in fact given the way cello transposition is done, the sound won't be transposed anyway. And Jane hasn't complained. This will speed up building the bookes by removing audio generation, the slowest process, from the transposed bookes.
author Jim Hague <jim.hague@acm.org>
date Fri, 22 Feb 2013 01:09:37 +0000
parents makeWebItems.sh@8f352063f277
children 77372a0166fe
comparison
equal deleted inserted replaced
222:f2c8ca48b8a4 223:0ef955669a9a
1 #!/bin/bash
2 #
3 # Make graphics required for the website but not for the book.
4 # They go into web/<book>.
5 #
6
7 if [ $# != 1 ]; then
8 echo "Usage: makeWebGraphics.sh <book dir name>"
9 exit 1
10 fi
11
12 dir=`pwd`
13
14 booke=$dir/$1
15 builddir=$dir/web/$1
16 graphicsdir=$dir/graphics/$1
17
18 mkdir -p $builddir
19
20 # Now, for each tune, make the main tune and tune first line bitmaps.
21 # Do this to temp files and rename into place to make updates as
22 # atomic as possible.
23 find $booke -name "*.abc" | sort |
24 while read filename
25 do
26 name=`basename $filename .abc`
27 tmpname=${name}.tmp
28 convert -density 96 $graphicsdir/${name}.eps $builddir/${tmpname}.png
29 convert -density 96 $graphicsdir/firstline-${name}.eps $builddir/firstline-${tmpname}.png
30
31 mv $builddir/${tmpname}.png $builddir/${name}.png
32 mv $builddir/firstline-${tmpname}.png $builddir/firstline-${name}.png
33 done