Re: [abcusers] Extended Repeats

2002-04-26 Thread Jack Campin

> BUT, I am very excited by the proposal that ends of sections be 
> markable with ']' because this is necessary to get away from the idea 
> that conditional material only occurs at the *ends* of repeated 
> sections. There are quite a few Highland pipe tunes in which a single 
> bar in the middle of a repeated section is varied the second time 
> around.  [...]

>  |: AA | BB | [1C][2A]C | DD :| % ie., a section need not be a whole bar

This is common in classical music as well - usually it's isolated
notes that have variants, not whole bars.

A further generalization: in classical music you may well find
isolated variant notes scattered through a repeated section:

   |: AA | BB | [1C][2A]C | DD  [1E][2F]G | HH:|

which would be equivalent to:

 | AA | BB | CC | DD  EG | HH |
 | AA | BB | AC | DD  FG | HH |

Trying to figure out "just what is different between these two
apparently identical chunks of score that they aren't simply written
as a repeat?" is often a pain in the bum with scores written using
ABC as it is now.  Particularly if you're trying to memorize the
piece.

Implementation of the above idea is probably easier for player
software than for formatters.  A formatter would usually have to
align the variant notes vertically and find some way of placing
numerals beside them without conflicting with something else (you
see a lot of scores where the numerals were obviously added last).

===  ===


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



Re: [abcusers] Extended Repeats

2002-04-26 Thread John Chambers

Ewan A. Macpherson wrote:
| John Chambers <[EMAIL PROTECTED]> wrote:
| > There were suggestions that the allowed chars include  '+'  and  'x',
| > and  I  did include them in my implementation.  I don't remember what
| > the 'x' was supposed to mean; does anyone know?
|
| Andrew Baker and I had proposed a syntax in which xN meant to play a
| particular block of material N times *within* a repeat. Thus you could
| have
|
| |: AA |[1x2,3x5 BB :|[2x3 CC ||
|
| This would be truly useful if we could get away from the idea that
| "conditional material" occurs only in endings. In piobaireachd, a
| section which plays
|
| | AA | AA | BB | AA | BB | BB | AA | BB ||
|
| is generally put on the page as
|
| |:: ["twice first time" AA] | ["twice second time" BB] ::|
|
| i.e.
|
| |:: [1x2,2,3 AA] | [1,2x2,3 BB] ::|


Aha! It makes sense now.  I've verified that my jcabc2ps clone  isn't
bothered  by  this,  and  produces the correct output.  Of course, it
would be a bit trickier for an abc player, which would actually  have
to understand what it all means.

This is probably another case of my earlier  comment  to  the  effect
that  people  who  say "Who needs that?" should be ignored.  I didn't
really understand what this was about the first time, but it was easy
enough  to  implement,  so  I  did.   It's  another example of normal
notation among a small crowd of musicians, which is unknown  to  most
others. To motivate implementers, it helps a lot if you can give some
specific examples and explain what they mean.  This still won't  much
motivate implementers who are only interested in their own music, but
it will motivate those who are curious about unfamiliar music.

BTW, I think the spacing in this example isn't really quite right. In
the  case  of  repeats  and  endings,  the  brackets chars are really
logically more like a bar line, unlike  the  [CDGc]  chord  notation,
where  they are grouping chars associated with the notes.  So I think
it would be better if written
  |::[1x2,2,3 AA ]|[1,2x2,3 BB ]::|

This helps avoid the confusion with chord notation, and makes it more
obvious  that  the  brackets  are for flow of control rather than for
binding a group of notes.  I'd probably also say that all the  spaces
should be optional, but we should teach people that such spaces are a
good idea if you want your abc to be readable.

Another problem is a shortage of characters ...


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



Re: [abcusers] Extended Repeats

2002-04-26 Thread Jack Campin

> In piobaireachd, a section which plays 
>   | AA | AA | BB | AA | BB | BB | AA | BB ||
> is generally put on the page as
>   |:: ["twice first time" AA] | ["twice second time" BB] ::|
> i.e.
>   |:: [1x2,2,3 AA] | [1,2x2,3 BB] ::|

I don't understand how either the second or third represent the first.

Isn't this kind of repeat exactly what ABC's "P:" construct is good at?

Write your structure like this:

[header]
   P:XXYX YYXY

[body]
   P:X
   |:A:|
   P:Y
   |:B:|

I posted an example here a while back ("Weighing from Land") using the
P: construct that way, along with BarFly macros to get it shorter, and
I represented the entire content of the Kilberry (I think) edition except
for the variable-length gracenotes; the ABC in the tune body was pretty
much symbol-for-symbol isomorphic with standard piobaireachd notation.

Obviously I picked a nicely regular example, but, while there may be
essential uses for the extra notation you're suggesting, I don't think
piobaireachd is one of them.

===  ===


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



Re: [abcusers] Extended Repeats

2002-04-26 Thread Laura Conrad

> "Ewan" == Ewan A Macpherson <[EMAIL PROTECTED]> writes:

Ewan> I guess I don't understand why there's a problem with endings of 
Ewan> different lengths. Why do you need to mark the end of [2 here?  Once 
Ewan> past the :|, the player will just keep on going regardless, no?

But a typesetting program might want to know where to stop drawing the
bar that goes over the 2.  This is a problem for abc2ly, where
lilypond expects the alternatives to go between curly braces, and ABC
doesn't specify where the end curly brace should go.



-- 
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097  fax: (801) 365-6574 
233 Broadway, Cambridge, MA 02139

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



Re: [abcusers] Extended Repeats

2002-04-26 Thread Ewan A. Macpherson

John Chambers <[EMAIL PROTECTED]> wrote:

>  But this does remind me of Yet Another Extension  that  I've
> been  thinking  of  proposing.  The problem is that there's no way to
> mark the end of an ending.

> A possible solution that's backwards compatible  and  wouldn't  break
> any  current abc is to say that ']' may be used to terminate endings. If
> there isn't a matching ']', then the  first  :|  or  any  sort  of
> double  bar  terminates  the  ending.  This would allow the ']' to be
> omitted for all the normal cases with endings of equal length.  Then you
> could write:
> 
>|: ... | ... |[1 ... ]:|[2 ... | ... ]|

I guess I don't understand why there's a problem with endings of 
different lengths. Why do you need to mark the end of [2 here?  Once 
past the :|, the player will just keep on going regardless, no?

BUT, I am very excited by the proposal that ends of sections be 
markable with ']' because this is necessary to get away from the idea 
that conditional material only occurs at the *ends* of repeated 
sections. There are quite a few Highland pipe tunes in which a single 
bar in the middle of a repeated section is varied the second time 
around. This is usually notated by a mid-repeat [1 ][2 ] sort of 
contruct.  Given a closing bracket, we could do this in abc also. So if 
the tune is:

| AA | BB | CC | DD | 
| AA | BB | AC | DD |

one could write:

|: AA | BB | [1 CC][2 AC] | DD :| 

or even

|: AA | BB | [1C][2A]C | DD :| % ie., a section need not be a whole bar

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



Re: [abcusers] Extended Repeats

2002-04-26 Thread Ewan A. Macpherson

Buddha Buck <[EMAIL PROTECTED]> wrote:

> At 07:39 PM 04-18-2002 +, John Chambers you wrote:
> >I've also been contemplating solving the need for random text such as
> >"last time" under an ending bracket. This obviously needs quotes, and
> >has syntax problems after a bar line.  What I think would work is  to
> >say that you must use the '[' in this case, and you can then write
> >|: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|
> 
> I'm one of the people that feels that ABC should be able to be used to
> unambiguously describe a piece of music without the need for human
> intelligence to interpret it.  As such, for the case of "last repeat has
> a special variant", I don't think an arbitrary text string method is the
> right solution (it may be right for other things, but not for
> information on how to play the music).
> 
> I would suggest that there be a special code used for things like that,
> such as a repeat-number beginning with '0x', (like 0xlast, 0xfirst, etc)
> that could be used to indicate alternate endings under special cases. 
> Done right, it could be extensible to newer repeat patterns as needed in
> the future.

I agree - keep the flow control characters mandatory and add a 
separate 'funky text' mechanism.

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



Re: [abcusers] Extended Repeats

2002-04-26 Thread Ewan A. Macpherson

John Chambers <[EMAIL PROTECTED]> wrote:

> Here's a brief description of  the  repeat/ending  syntax  that  I've
> implemented in my jcabc2ps clone of abc2ps.  This isn't a solution to
> all the world's repeat problems, but it does handle at least  95%  of
> what you see in print.

[snip]

> There were suggestions that the allowed chars include  '+'  and  'x',
> and  I  did include them in my implementation.  I don't remember what
> the 'x' was supposed to mean; does anyone know? 

Andrew Baker and I had proposed a syntax in which xN meant to play a 
particular block of material N times *within* a repeat. Thus you could 
have

|: AA |[1x2,3x5 BB :|[2x3 CC ||

This would be truly useful if we could get away from the idea that 
"conditional material" occurs only in endings. In piobaireachd, a 
section which plays 

| AA | AA | BB | AA | BB | BB | AA | BB ||

is generally put on the page as

|:: ["twice first time" AA] | ["twice second time" BB] ::|

i.e. 

|:: [1x2,2,3 AA] | [1,2x2,3 BB] ::|

> I've also been contemplating solving the need for random text such as
> "last time" under an ending bracket. This obviously needs quotes, and
> has syntax problems after a bar line.  What I think would work is  to
> say that you must use the '[' in this case, and you can then write
>|: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|
> 
> This looks like it would be intuitively obvious to  a  naive  reader,
> and  it  doesn't  seem to have any obvious syntax problem.  The "last
> time" is not an accompaniment chord, because the chord notation can't
> immediately  follow a bracket like this.  The bracket isn't the start of
> a [CEGc] type chord,  because  such  chords  can't  start  with  a
> double-quote  char.   It takes a while to verify that it works, but I
> think it does.
> 
> The description then would say that the actual ending syntax is:
>["text"
> This would be followed by saying that the quotes may  be  omitted  if
> the text contains only the characters "0123456789,-", and the bracket
> may be omitted immediately after a (single) bar  line  '|'.   In  the
> usual  cases, the bracket and quotes will be omitted; the full ending
> syntax is expected to be rare.

Again, I think it would be better not to try to mix the flow control 
and the arbitrary text functions.  Why not say that the flow control 
stuff is mandatory, and generates some default display text, but that 
text may be added to replace this?  Thus ...

   |: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|[5"last time" EFG ABc :|

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



Re: [abcusers] Extended Repeats

2002-04-19 Thread John Chambers

Jack Campin writes:
| >>   |: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|
| > Wouldn't it be best to avoid unmatched bracket symbols?
|
| "[" isn't used as a bracket here; it's used to mark a repeat number, and
| has to be so used if the variant bit doesn't start at the beginning of
| the bar.  I use it all the time, even when the variant starts at the
| barline, as I find it simpler to have only one syntax for this, it's
| more clearly visible than the more concise form, and it makes editing
| simpler if I want to move the start of the repeat.

Me too.  But this does remind me of Yet Another Extension  that  I've
been  thinking  of  proposing.  The problem is that there's no way to
mark the end of an ending.  I have a couple example where the  second
ending is longer than the first.  What abc2ps does is assume that the
endings are the same length. This looks a bit funny, though I suppose
it's musically harmless.

A possible solution that's backwards compatible  and  wouldn't  break
any  current abc is to say that ']' may be used to terminate endings.
If there isn't a matching ']', then the  first  :|  or  any  sort  of
double  bar  terminates  the  ending.  This would allow the ']' to be
omitted for all the normal cases with endings of equal length.  Then
you could write:

   |: ... | ... |[1 ... ]:|[2 ... | ... ]|

In this example, the first ']' could be omitted, since it is followed
by  :|,  but  the  second  ']' would be needed if you want to make it
clear that the second ending included two bars.  You could also  omit
both  of the '['s in the above, of course, though Jack and I probably
wouldn't.

This would sorta overcome the aesthetic objection to the  use  of  an
unclosed  bracket  in  abc's  syntax.  You could just say "Well, they
actually are balanced.  The syntax just permits  omitting  the  close
bracket  before :| and double bars.  So the close bracket is there by
implication.

Some programming languages have similar  rules  that  permit  closing
brackets  of various types to be omitted if a "higher level" token is
encountered.  They often allow  list  separators  such  as  comma  or
semicolon  to  be  omitted  before  tokens  like right paren or right
brace.  The parser just fills in the missing terminator tokens.  This
suggestion is similar.  And if implemented, it would make it possible
for us overly picky types to get printed ending brackets just right.

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



Re: [abcusers] Extended Repeats

2002-04-19 Thread Jack Campin

>> I've also been contemplating solving the need for random text such as
>> "last time" under an ending bracket. This obviously needs quotes, and
>> has syntax problems after a bar line.  What I think would work is  to
>> say that you must use the '[' in this case, and you can then write
>>   |: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|
>> ...The description then would say that the actual ending syntax is:
>>   ["text"
>> This would be followed by saying that the quotes may  be  omitted  if
>> the text contains only the characters "0123456789,-", and the bracket
>> may be omitted immediately after a (single) bar  line  '|'.   In  the
>> usual  cases, the bracket and quotes will be omitted; the full ending
>> syntax is expected to be rare.
> Can someone explain the problem with quotes after a bar line, please?

The problem is that a chord or arbitrary text annotation could also go
there.  Even a purely graphical ABC implementation might well want to
use a different typeface for such playing-order information, so it needs
some way to distinguish it.


> Wouldn't it be best to avoid unmatched bracket symbols?

"[" isn't used as a bracket here; it's used to mark a repeat number, and
has to be so used if the variant bit doesn't start at the beginning of
the bar.  I use it all the time, even when the variant starts at the
barline, as I find it simpler to have only one syntax for this, it's
more clearly visible than the more concise form, and it makes editing
simpler if I want to move the start of the repeat.

 
> The following works perfectly well with ABC2Win:
> CEC DED |1-3 EGE FAF :|2,4 EFG FED :|"last time" EFG ABc|

Does ABC2Win *play* that in the order you want?

I can't see many humans being able to sightread that piece of notation
anyway.  As I understand it, it expands out into

 CEC DED | EGE FAF |
 CEC DED | EGE FAF | EFG FED |
 CEC DED | EGE FAF |
 CEC DED | EFG FED |
 CEC DED | EFG ABc |

and there's no marker at the end to say where the "last time" bit
stops.  Any band I've been in would have needed to call a meeting
to agree on an interpretation.

It would be possible to represent that (no more readably) using
the "P:" construct:

in the header:

   P:AB ABC AB AC AD

in the body:

   [P:A] CEC DED | [P:B] EGE FAF | [P:C]  EFG FED | [P:D] EFG ABc |

===  ===


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



Re: [abcusers] Extended Repeats

2002-04-19 Thread John Chambers

| Can someone explain the problem with quotes after a bar line, please?
| Wouldn't it be best to avoid unmatched bracket symbols?
| The following works perfectly well with ABC2Win:
|
|  CEC DED |1-3 EGE FAF :|2,4 EFG FED :|"last time" EFG ABc|

Does it actually display the usual ending bracket above the last bar?
Or does it just display the text?

The above is syntactically the same as:
|  CEC DED |1-3 EGE FAF :|2,4 EFG FED :|"Am"EFG ABc|

The problem is that syntactically, that "last time" is parsed  as  an
accompaniment chord attached to the following E.  To you and me, it's
obviously not a chord, but most software doesn't know anything  about
what  are legal chords.  All a music formatter needs to do is put the
text above the music; the text of the "chord" isn't important. But if
you want the three lines of the ending bracket drawn above the staff,
the parser has to have a way of knowing that  this  is  text  for  an
ending and not a chord.

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



[abcusers] Extended Repeats

2002-04-19 Thread Phil Headford

Can someone explain the problem with quotes after a bar line, please?
Wouldn't it be best to avoid unmatched bracket symbols?
The following works perfectly well with ABC2Win:

 CEC DED |1-3 EGE FAF :|2,4 EFG FED :|"last time" EFG ABc|

Flos

Quote from John Chambers: -
I've also been contemplating solving the need for random text such as
"last time" under an ending bracket. This obviously needs quotes, and
has syntax problems after a bar line.  What I think would work is  to
say that you must use the '[' in this case, and you can then write
   |: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|
..
The description then would say that the actual ending syntax is:
   ["text"
This would be followed by saying that the quotes may  be  omitted  if
the text contains only the characters "0123456789,-", and the bracket
may be omitted immediately after a (single) bar  line  '|'.   In  the
usual  cases, the bracket and quotes will be omitted; the full ending
syntax is expected to be rare.







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



Re: [abcusers] Extended Repeats

2002-04-18 Thread Buddha Buck

At 07:39 PM 04-18-2002 +, John Chambers you wrote:
>I've also been contemplating solving the need for random text such as
>"last time" under an ending bracket. This obviously needs quotes, and
>has syntax problems after a bar line.  What I think would work is  to
>say that you must use the '[' in this case, and you can then write
>|: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|

I'm one of the people that feels that ABC should be able to be used to 
unambiguously describe a piece of music without the need for human 
intelligence to interpret it.  As such, for the case of "last repeat has a 
special variant", I don't think an arbitrary text string method is the 
right solution (it may be right for other things, but not for information 
on how to play the music).

I would suggest that there be a special code used for things like that, 
such as a repeat-number beginning with '0x', (like 0xlast, 0xfirst, etc) 
that could be used to indicate alternate endings under special cases.  Done 
right, it could be extensible to newer repeat patterns as needed in the future.

This would not prevent a program that converts ABC to standard notation 
(like abc2ps) from printing "last time" instead of 0xlast, or 
whatever.  That would be the proper thing to do, since that's how that 
feature of music is implemented.

It would also be useful, either in the repeat notation or in the P: field 
notation to be able to specify "repeat an arbitrary number of times".  For 
various dance music, it would be very nice to be able to easily specify 
"start with an intro consisting of the last measure of part B voice 1 
played once, then parts A, A, and B repeated in that order an arbitrary 
number of times, with on the final repeat of B, an alternate ending to 
end.  For human players, "arbitrary" is up to them.  For machine players, 
"arbitrary" could be 3, 4, 5, 1000, or "until the user hits a key, 
indicating last repeat".


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

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



[abcusers] Extended Repeats

2002-04-18 Thread John Chambers

Bryan Creer wrote:
| I was on
| the list when you last discussed it so I know about it but it is evident from
| recent postings that some people do not.

Here's a brief description of  the  repeat/ending  syntax  that  I've
implemented in my jcabc2ps clone of abc2ps.  This isn't a solution to
all the world's repeat problems, but it does handle at least  95%  of
what you see in print.


2000.05.24 Extended ending syntax.
  The syntax for an ending may be any string  consisting  of  the  characters
  "0123456789,.-". The string is simply copied to the output under the ending
  bracket.

  Repeats have been extended in two ways. The colons at the start or end of a
  repeat  may  be  repeated, and they will all appear in the music.  Thus the
  notation
|:: ... ::|
  means to play the phrase three times.  Multiple endings may be indicated by
  any  string  of "0123456789,.-" characters after a bar line.  A four-times
  repeat with two endings might be:
|::: ... |1,3 ... :|2,4 ... :|


Maybe a few more examples would be worthwhile.  I don't actually  use
the  multi-colon  notation  much,  but  I do have a few tunes where a
phrase should be played three or more  times  and  there  aren't  any
variant endings.  I've also seen the |::: used to give readers a good
warning that the next phrase is played four times; this also  does  a
good job of making the start of the phrase visible.

I have a number of examples of three times with one  ending,  then  a
fourth time with a different ending.  This can be written
   |: CEC DED |1-3 EGE FAF :|4 EFG ABc :|

Some time back, Jack Campin pointed out that there are times where  a
"null  ending"  is useful.  E.g., you have a phrase that has a bit of
extra music on the even times.  This could be just:
   |: CEC DED :|2,4 EGE FAF :|
which would unravel to:
   | CEC DED | CEC DED | EGE FAF | CEC DED | CEC DED | EGE FAF |
I've actually used this a couple of times.

There were suggestions that the allowed chars include  '+'  and  'x',
and  I  did include them in my implementation.  I don't remember what
the 'x' was supposed to mean; does anyone know? The '+' isn't unusual
in printed music, but it means the same thing as ','.

-
I've also been contemplating solving the need for random text such as
"last time" under an ending bracket. This obviously needs quotes, and
has syntax problems after a bar line.  What I think would work is  to
say that you must use the '[' in this case, and you can then write
   |: CEC DED |1-3 EGE FAF :|2,4 EFG FED :|["last time" EFG ABc :|

This looks like it would be intuitively obvious to  a  naive  reader,
and  it  doesn't  seem to have any obvious syntax problem.  The "last
time" is not an accompaniment chord, because the chord notation can't
immediately  follow a bracket like this.  The bracket isn't the start
of a [CEGc] type chord,  because  such  chords  can't  start  with  a
double-quote  char.   It takes a while to verify that it works, but I
think it does.

The description then would say that the actual ending syntax is:
   ["text"
This would be followed by saying that the quotes may  be  omitted  if
the text contains only the characters "0123456789,-", and the bracket
may be omitted immediately after a (single) bar  line  '|'.   In  the
usual  cases, the bracket and quotes will be omitted; the full ending
syntax is expected to be rare.


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