comparison makeWebAudio.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 e5f59f0e7dd5
comparison
equal deleted inserted replaced
222:f2c8ca48b8a4 223:0ef955669a9a
1 #!/bin/bash
2 #
3 # Make audio required for the website but not for the book.
4 # They go into web/<book>.
5 #
6
7 if [ $# != 1 ]; then
8 echo "Usage: makeWebAudio.sh <book dir name>"
9 exit 1
10 fi
11
12 dir=`pwd`
13
14 booke=$dir/$1
15 builddir=$dir/web/$1
16
17 mkdir -p $builddir
18
19 # Now, for each tune, make the tune bitmap and sound. Do this to temp
20 # files and rename into place to make updates as atomic as possible.
21 find $booke -name "*.abc" | sort |
22 while read filename
23 do
24 name=`basename $filename .abc`
25 tmpname=${name}.tmp
26
27 abc2midi $filename -o $builddir/${tmpname}.mid
28 timidity -Ow -o $builddir/${tmpname}.wav $builddir/${tmpname}.mid
29 lame --quiet $builddir/${tmpname}.wav $builddir/${tmpname}.mp3
30
31 mv $builddir/${tmpname}.mid $builddir/${name}.mid
32 mv $builddir/${tmpname}.mp3 $builddir/${name}.mp3
33 rm $builddir/${tmpname}.wav
34 done