comparison makeCello.sh @ 155:cc2d4925f280

Produce a cello-friendly Booke. Transpose down 2 octaves and display with bass clef.
author Jim Hague <jim.hague@laicatc.com>
date Tue, 05 Jun 2012 19:34:54 +0100
parents
children 76f18e0a80bd
comparison
equal deleted inserted replaced
154:25e252792140 155:cc2d4925f280
1 #!/bin/bash
2 #
3 # Copy a booke to cello-friendly form. Bass clef, transposed down 2 octaves.
4 #
5 # It would be easier to do with transpose in dottes.fmt, but I can't get
6 # that to work properly for a 2 octave downward transpose.
7 #
8 # This relies on abcm2ps >= 6.0 but does not check for it.
9
10 if [ $# != 1 ]; then
11 echo "Usage: makeCello.sh <book dir name>"
12 exit 1
13 fi
14
15 dir=`pwd`
16
17 booke=$dir/$1
18 outdir=$dir/$1-Cello
19
20 mkdir -p $outdir
21
22 find $booke -name "*.abc" | sort |
23 while read filename
24 do
25 name=`basename $filename .abc`
26 sed -e "/^ *K:/s/$/ octave=-2/" $filename > $outdir/$name.abc
27 done