Hi Anselm,

># abcmac -- Barfly-style macro preprocessor for ABC files.

Neat!

Here are a few comments.

># Currently the argument is a note name (no length).

BarFly's macro processor does take lengths.  You have to write
a separate macro for each length of note.  The reason for this
is that an ornament which sounds right on a half note is often
wrong on an eighth.

># Transpose note `$base' according to the relative position of `$note'
># compared to `n' -- e.g., $base = 'A', $note = 'o' gives 'B'. Don't bother
># dealing with accidentals, since BarFly doesn't either.

My web page is a bit out of date there.  What the current Barfly version
does when it encounters a macro on a note with an accidental is to place
the accidental on the first ocurrence of the principal note in the
expansion.  This seems to be the right thing to do in the majority
of cases.  Older versions of the program didn't expand macros for
notes with an accidental, and you had to write a separate static
macro for them.

>           # Construct a sequence of expansion commands for the macros.
>           # Make sure to expand longer-named macros first, to avoid
>           # replacing `On' before `On/'

BarFly doesn't do this; rather it expands the macros in reverse order
to the order in which the definitions are listed.  It is the user's
responsibility to enter lists of macros with the shorter ones first.
The reason for this is that it is very useful to have macros override
one another, e.g. you might want an ornament on one particular pitch of
note to play differently from the others, or one tune in a file to have a
different set of ornaments from those defined globally.  In order to make
this work you have to deal with macros in a fixed order.

I don't have MacPerl on the machine I'm on at the moment, so I can't
try it out, but I will do so later.

Maybe we can get abc2midi to process the Goldberg Variations?

Phil Taylor


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to