<grumble>
then you've got to figure out how to put the cursor in the right place after you've
done all this, if the user made a mistake
</grumble>

wil

[EMAIL PROTECTED] wrote:
It strikes me that there are three processes to carry out -

Remove comments
Combine lines
Parse abc notation

The problem is to decide what order to do them in and to be consistent about it.  The above order seems the logical one to me and is what I have already implemented in Abacus.

> abc def| gab CDE|\ % comments
> FGA BC| ...

would become -

> abc def| gab CDE|\
> FGA BC| ...

and then -

> abc def| gab CDE| FGA BC| ...

which parses normally.

With -

> abc def| gab CDE| % comments\
> FGA BC| ...

The \ would be lost so it would be incorrect.

An earlier example -

> G|G2G2A4|(FEF) D (A2G) G|\
> w:She-nei zei-tim nich-__ra-tim_ be-\
> M:4/4 % Measure Change\
> K:C   % Key Change\
> c2c2(B2c2)|(f2e2)e2d G|
> w:gan na-'ul_ yats-_hi-ru. Le-

       is a mess whichever way you do it.  You have to start parsing the lines to find out how to combine them and get rid of the comments.  Removing the comments first wouldn't be too bad by accident since the backslashes on the imbedded commands are unnecessary.

>From the 1.6 standard -

>To change key, meter, or default note length, simply put in a new
>line with a K: M: or L: field, e.g.
>  ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
>  K:G
>  AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|
>
>To do this without generating a new line of music, put a \ at the
>end of the first line, i.e.
>  E2E EFE|E2E EFG|\
>  M:9/8
>  A2G F2E D2|]

It would be much more understandable and straight forward to have  -

> G|G2G2A4|(FEF) D (A2G) G|\
> M:4/4 % Measure Change
> K:C   % Key Change
> c2c2(B2c2)|(f2e2)e2d G|
> w:She-nei zei-tim nich-__ra-tim_ be-\
>   gan na-'ul_ yats-_hi-ru. Le-

Keep it simple and bear in mind what is understandable to a non-programmer.

Bryan Creer


Reply via email to