Hi,
In the later time I play in a band where we have C and Bb and Eb instruments.
I have discovered that there is an easy way to make a copy for each musician
if you have either the voice for a C instrument or a voice for a Bb
instrument in abc format.
The following scripts require that abcm2ps and abc2abc be installed on your
system and available on your $PATH or in the current path.
In case of a Bb voice abc file you would use a bash script like this:
#!/bin/bash
if [ $# -ne 1 ] ; then
echo "Usage: $0 abc-file"
exit 1
fi
sed -e '/T:/ a \T: C Instrument' $1 > tmp.abc
abc2abc tmp.abc -t -2 > tmp1.abc
abcm2ps -c tmp1.abc -O ${1%.abc}_C.ps
sed -e '/T:/ a \T: Bb Instrument' $1 > tmp.abc
abcm2ps -c tmp.abc -O ${1%.abc}_Bb.ps
sed -e '/T:/ a \T: Eb Instrument' $1 > tmp.abc
abc2abc tmp.abc -t -5 > tmp1.abc
abcm2ps -c tmp1.abc -O ${1%.abc}_Eb1.ps
abc2abc tmp.abc -t 7 > tmp1.abc
abcm2ps -c tmp1.abc -O ${1%.abc}_Eb2.ps
In case of a C voice abc file you would use a bash script like this:
#!/bin/bash
if [ $# -ne 1 ] ; then
echo "Usage: $0 abc-file"
exit 1
fi
sed -e '/T:/ a \T: C Instrument' $1 > tmp.abc
abcm2ps -c tmp.abc -O ${1%.abc}_C.ps
sed -e '/T:/ a \T: B Instrument' $1 > tmp.abc
abc2abc tmp.abc -t 2 > tmp1.abc
abcm2ps -c tmp1.abc -O ${1%.abc}_Bb.ps
sed -e '/T:/ a \T: Eb Instrument' $1 > tmp.abc
abc2abc tmp.abc -t -3 > tmp1.abc
abcm2ps -c tmp1.abc -O ${1%.abc}_Eb1.ps
abc2abc tmp.abc -t 9 > tmp1.abc
abcm2ps -c tmp1.abc -O ${1%.abc}_Eb2.ps
The result of running these scripts is 4 Postscript files, one for a C
instrument, one for a Bb instrument and two for an Eb instrument of which you
can pick the one you like the most. Each piece of sheet music has a subtitle
stating for which instrument the music was written.
If anyone can use these scripts for anything I am happy to share them with
you.
Ulf
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html