John Chambers wrote:

>As I (sorta) understand the suggestions, they amount  to  defining  a
>list  of  standard  musical  terms, possibly in the !...! form.  This
>would give us a list of things like !fermata!, !mf!, !sfz!,  !trill!,
>!roll!,  and  so  on.   These  could be used, but the result would be
>cluttered and not very readable.  So then we  define  the  macros  as
>something like:
>
>m: T !trill!
>m: ~ !roll!
>m: H !fermata!

Here we go again.

Once more I will try to explain the difference between redefinable
symbols and macros.  They are not the same.  Macros substitute
one piece of text for another, while redefinable symbols change
the binding between the finite set of characters 'H'..'Z' and
a (potentially) infinite set of musical symbols.  Macros can be
implemented in a preprocessor (or a separate program), redefinable
symbols can't be, because you have to write the code to draw the
new symbol.  If your program doesn't know how to draw an inverted
fermata, no amount of text substitution in the abc input is going
to persuade it to do that.

So forget macros for the moment - they are not what you need here.

Suppose I want to add a new symbol to the list which my program
supports.  I'm doing guitar transcriptions and I need an arpeggio
symbol.  First I have to write the necessary code to draw a vertical
jagged line to the left of a chord.  Then I have to give it a name:
"arpeggio".  To invoke it from the abc I then have to define one
of the 19 letters which the standard provides for this purpose to
mean "arpeggio" like this:

U: R = arpeggio

and in the abc I can write R[CEG], and have the chord drawn in the
staff display with an arpeggio symbol before it.  The default
meaning for R is a medium length phrase mark, so a user who wanted
to use both of these symbols in the same music would have to use
a different letter for the purpose, or define another letter to
mean medium phrase mark.

Of course you could go on to define a macro which would substitute
the symbol R for the word arpeggio, or if you insist !arpeggio!,
and then write !arpeggio![CEG] in the abc, but then you've lost all
compatibility with the existing standard and cluttered up the abc
by adding nine extra characters to invoke a single musical symbol.

Phil Taylor


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

Reply via email to