> If I understand BarFly macros correctly, they're simply bits of text that
> get replaced by other bits of text. If we're suitably desperate, writing
> a simple preprocessor to do that shouldn't take more than a Perl
> interpreter and a rainy afternoon, and it will basically macro-enable
> all Unix-based abc tools at the cost of a minor inconvenience.

They're a bit more complicated than that - they're parametrized, so you
can give one a note and have it expand into an ornament based on that
note or into a chord with that note as the root.  Here's an example; the
chords could hardly be simpler (play the lower octave along with the
named note), but even here there's less to type and read than writing
them out explicitly.  Simple bass parts ought to be simple to notate.

X:1
T:Lady Robert Kerr's Strathspey
C:Niel Gow Jnr
S:Collection of compositions by Niel Gow Jnr pub posthumously by Nathaniel Gow, 1837
N:for the pianoforte, harp, violin and violoncello
B:NLS Glen.411
M:C|
L:1/8
m: On =[nn,]
m: On/ = [n/n,/]
V:1
V:2 bass
K:G Minor
V:1
"Slowly"
B/c/|d<Gd>B  G>d (c/B/).A/.G/|A>fF>f             c>F   (A/B/c/).A/|\
     d<GTd>B G>d (c/B/).A/.G/|cd/e/ (d/c/).B/.A/ G2 "#"~GB/c/     |
V:2 [L:1/4]
z/  |OG, OG, OG,  OG,        |OF,    OF,         OF,    OF,       |\
     OG, OG, OG,  OG,        |OC,    OD,         OG,    OG,       |
V:1 [L:1/8]
     d<Gd>B  G>d (c/B/).A/.G/|A>fF>f             c>F    A/B/c/A/  |\
     d<GTd>B G>d (c/B/).A/.G/|cd/e/ (d/c/).B/.A/ G2     G        ||
V:2 [L:1/4]
     OG, OG, OG,  OG,        |OF,    OF,         OF,    OF,       |\
     OG, OG, OG,  OG,        |OC,    OD,         OG,    OG,/     ||
V:1 [L:1/8]
d|"#"~ga/b/ (b/a/).g/.^f/ gddg  |f>cdf        c/B/A/G/ F>d  |\
  "#"~ga/b/ (b/a/).g/.^f/ gddg  |f>c d/c/B/A/ dGGd          |
V:2 [L:1/4]
z/|   OG,    D,           OG,OG,|OA, OB,      OF,      OF,  |\
      OG,    D,           OG,OG,|OC, OD,      OG,      OG,  |
V:1 [L:1/8]
  "#"~ga/b/ (b/a/).g/.^f/ gddg  |f>cdf        c/B/A/G/ F>A  |\
      G>B    A/B/c/A/     B>dc>e|d>B d/c/B/A/ dGG          |]
V:2 [L:1/4]
      OG,    D,           OG,OG,|OA, OB,      OF,      OF,  |\
      OG,    D,           OG,OC,|OD, OD,      OG,      OG,/|]

which expands into:

X:2
T:Lady Robert Kerr's Strathspey
C:Niel Gow Jnr
S:Collection of compositions by Niel Gow Jnr pub posthumously by Nathaniel Gow, 1837
N:for the pianoforte, harp, violin and violoncello
B:NLS Glen.411
M:C|
L:1/8
m: On =[nn,]
m: On/ = [n/n,/]
V:1
V:2 bass
K:G Minor
V:1
"Slowly"
B/c/|d<Gd>B  G>d (c/B/).A/.G/|A>fF>f             c>F   (A/B/c/).A/|\
     d<GTd>B G>d (c/B/).A/.G/|cd/e/ (d/c/).B/.A/ G2 "#"~GB/c/     |
V:2 [L:1/4]
z/  |[G,G,,] [G,G,,] [G,G,,]  [G,G,,]        |[F,F,,]    [F,F,,]         [F,F,,]    
[F,F,,]       |\
     [G,G,,] [G,G,,] [G,G,,]  [G,G,,]        |[C,C,,]    [D,D,,]         [G,G,,]    
[G,G,,]       |
V:1 [L:1/8]
     d<Gd>B  G>d (c/B/).A/.G/|A>fF>f             c>F    A/B/c/A/  |\
     d<GTd>B G>d (c/B/).A/.G/|cd/e/ (d/c/).B/.A/ G2     G        ||
V:2 [L:1/4]
     [G,G,,] [G,G,,] [G,G,,]  [G,G,,]        |[F,F,,]    [F,F,,]         [F,F,,]    
[F,F,,]       |\
     [G,G,,] [G,G,,] [G,G,,]  [G,G,,]        |[C,C,,]    [D,D,,]         [G,G,,]    
[G,/G,,/]     ||
V:1 [L:1/8]
d|"#"~ga/b/ (b/a/).g/.^f/ gddg  |f>cdf        c/B/A/G/ F>d  |\
  "#"~ga/b/ (b/a/).g/.^f/ gddg  |f>c d/c/B/A/ dGGd          |
V:2 [L:1/4]
z/|   [G,G,,]    D,           [G,G,,][G,G,,]|[A,A,,] [B,B,,]      [F,F,,]      [F,F,,] 
 |\
      [G,G,,]    D,           [G,G,,][G,G,,]|[C,C,,] [D,D,,]      [G,G,,]      [G,G,,] 
 |
V:1 [L:1/8]
  "#"~ga/b/ (b/a/).g/.^f/ gddg  |f>cdf        c/B/A/G/ F>A  |\
      G>B    A/B/c/A/     B>dc>e|d>B d/c/B/A/ dGG          |]
V:2 [L:1/4]
      [G,G,,]    D,           [G,G,,][G,G,,]|[A,A,,] [B,B,,]      [F,F,,]      [F,F,,] 
 |\
      [G,G,,]    D,           [G,G,,][C,C,,]|[D,D,,] [D,D,,]      [G,G,,]      
[G,/G,,/]|]

You can imagine the kind of difference that makes with denser textures.

I'd like to see some more discussion and experiment with these.  If
you're used to something like TeX macros, BarFly's model seems too
limited (e.g. you usually have to write the same code out multiple
times, once for each note length you intend to apply it to).  On the
other hand I wouldn't like to see ABC tunes looking like TeX source.
And I still haven't figured out a naming scheme for chord macros
that combines the concision required for clear layout with mnemonic
helpfulness.

=================== <http://www.purr.demon.co.uk/jack/> ===================


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

Reply via email to