ie, if you're not into both, delete this now ;) Don't say you weren't warned.
I'm very happy with abcm2ps's ability to typeset normal bagpipe music; so that
means I need a challenge...
I've been playing with abcm2ps with the intention of being able to set
piobaireachd [1] with it. This is a bit of a nuisance, as virgin ABC is
about as well equipped to handle piobaireachd typesetting as a virgin is
to...well, you get my drift.
Here's problem no 1:
%%leftmargin 2.25cm % room for manoeuvre
%%postscript (text) % call to routine between this line and next
%%postscript /Times-Roman findfont
%%postscript 14 scalefont
%%postscript setfont
%%postscript -55 29 M show
^^^ ^^
magic nos
I stick this (wrapped in a routine) after each line of music. It sticks a
label in front of each line of music. Trouble is, the string length varies,
from '1st.' to '1st. & 3rd.'. Is there any way of right-justifying this text
somehow? The ugly solution is to use a fixed-width font, and calculate its
width from its length, but my sensitive soul revolts at such a way of doing
things. Besides, I'd like the labellings in an attractive(ish) font. And I
don't know what the postscript for strlen() is.
Sub-problem - for some reason, appending this after the last line of music
doesn't work - meaning the text just doesn't show up. Providing a seperate
routine for the last line and putting it before it works, but again, ugh.
Problem no 2:
Has been solved, as I had a look over Guido's superb typesetting guide before
sending, and found the answer staring me in the face. Hurrah for %%multicol.
Problem no 3:
This was discussed on the list before (last year), and I apologise if it feels
like I'm flogging a dead horse.
This, I think, is the most difficult. Frequently, each variation is repeated
with only slight variations in melody. Sometimes, a line is repeated with a
phrase added or left out. So, what is needed is a octavo-like marker with
text settable when called ("2nd line only", "1st time twice", etc). If it's
at all possible, it really needs to be nestable one level (ie sections within
sections, but no sections within sections within sections!) Ewan MacPherson
has been kind enough to show me the code he uses for 1st and 2nd time phrases
within parts/lines, and I've taken the liberty of reproducing part of it. My
postscript skills are insufficiently l33t to understand what's going on in
there with the line of exchs (if someone could explain it, I'd be very
grateful), though I assume it has to do with the internal workings of
abcm2ps:
% -- draw "first time" indication
%%postscript /firsttime { % usage: len x y firsttime
%%postscript exch -9 add exch 2 copy
%%postscript M 0 10 rmoveto /Times-Roman 16 selectfont (1) show
%%postscript M 0 6 rlineto currentpoint stroke M
%%postscript 30 add 0 rlineto currentpoint stroke M
%%postscript 0 -6 rlineto stroke
%%postscript } bdef
% -- start / stop of firsttime indication
%%deco 1( 5 - 24 0 0
%%deco 1) 5 firsttime 24 0 0
Sorry, I think some of you are going to get hit with ^Ms - I'm not sure if
kmail filters them, but anyway I can't see them...
Is it possible to modify this to do what I want? I suspect it probably needs
two routines, one for the inner brace and one for the outer (how to do that
without potential crashes?) Aargh...
Incidentally, I'm well aware of the argument that this isn't how music should
be written anyway...all I can say is, it makes it a heck of a lot easier to
learn if you can see the trees nicely marked out from the wood.
Cheers,
Calum
[1]If anyone thinks it would be helpful to actually see some of this
piobaireachd stuff in its natural habitat, let me know and I'll try and get a
scan of a piob society page posted on the web. Will take a day or two,
though.
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html