Mercurial > dottes
comparison makeWebAudio.sh @ 393:c5d404bf68a3
Reduce size of generated audio files.
Set Timidity to produce mono output and crank up the compression on
MP3 and OGGs.
| author | Jim Hague <jim.hague@acm.org> |
|---|---|
| date | Sun, 01 Sep 2013 22:24:58 +0100 |
| parents | e5f59f0e7dd5 |
| children | ae9c05d2aafd |
comparison
equal
deleted
inserted
replaced
| 392:1f079d911e4b | 393:c5d404bf68a3 |
|---|---|
| 23 do | 23 do |
| 24 name=`basename $filename .abc` | 24 name=`basename $filename .abc` |
| 25 tmpname=${name}.tmp | 25 tmpname=${name}.tmp |
| 26 | 26 |
| 27 abc2midi $filename -o $builddir/${tmpname}.mid | 27 abc2midi $filename -o $builddir/${tmpname}.mid |
| 28 timidity -Ow -o $builddir/${tmpname}.wav $builddir/${tmpname}.mid | 28 timidity -OwM -o $builddir/${tmpname}.wav $builddir/${tmpname}.mid |
| 29 lame --quiet $builddir/${tmpname}.wav $builddir/${tmpname}.mp3 | 29 lame -m m -V 9 --quiet $builddir/${tmpname}.wav $builddir/${tmpname}.mp3 |
| 30 # Timidity can generate OGG directly. But we need to generate WAV | 30 # Timidity can generate OGG directly. But we need to generate WAV |
| 31 # for lame, and oggenc produces smaller output. OGG is needed for | 31 # for lame, and oggenc produces smaller output. OGG is needed for |
| 32 # Firefox's audio tag. FF doesn't support MP3, some others support | 32 # Firefox's audio tag. FF doesn't support MP3, some others support |
| 33 # MP3 but not OGG. | 33 # MP3 but not OGG. |
| 34 oggenc -Q -o $builddir/${tmpname}.ogg $builddir/${tmpname}.wav | 34 oggenc -Q -q 0 -o $builddir/${tmpname}.ogg $builddir/${tmpname}.wav |
| 35 | 35 |
| 36 mv $builddir/${tmpname}.mid $builddir/${name}.mid | 36 mv $builddir/${tmpname}.mid $builddir/${name}.mid |
| 37 mv $builddir/${tmpname}.mp3 $builddir/${name}.mp3 | 37 mv $builddir/${tmpname}.mp3 $builddir/${name}.mp3 |
| 38 mv $builddir/${tmpname}.ogg $builddir/${name}.ogg | 38 mv $builddir/${tmpname}.ogg $builddir/${name}.ogg |
| 39 rm $builddir/${tmpname}.wav | 39 rm $builddir/${tmpname}.wav |
