lewdlime / abcm2ps

abcm2ps is a command line program which converts ABC to music sheet in PostScript or SVG format. It is an extension of abc2ps which may handle many voices per staff. abcm2ps is Copyright © 2014-2016 Jean-Francois Moine.
http://moinejf.free.fr/
GNU General Public License v3.0
84 stars 31 forks source link

Volta bracket for second and subsequent endings dependent on length of first ending #52

Open rjl20 opened 5 years ago

rjl20 commented 5 years ago

If the second or subsequent endings are longer than the first ending, the volta bracket above the longer endings is only as long as the first ending. Sample ABC to reproduce:

X:1
T:Volta test
L:1/4
K:C
|: ABCD |1 EFGA :|2 BCDE | FGAB :|3 CDEF | GABC || DEFG |]

There should be volta brackets above the second measures of the second and third endings, but only the first measure gets them, presumably because the first ending only has one measure:

Screen Shot 2019-05-05 at 8 54 09 PM

If you insert an invisible bar in the first ending, then the other endings get the right length for their volta brackets:

|: ABCD |1 EFGA [|] :|2 BCDE | FGAB :|3 CDEF | GABC || DEFG |]
Screen Shot 2019-05-05 at 8 57 04 PM

The standard says of multiple endings that:

The Nth ending starts with [N and ends with one of ||, :| |] or [|.

So it seems like each ending should be allowed an independent length, rather than being based on the first ending.

If I can figure out how volta brackets are being calculated and displayed, I'll try to write a patch, but I'm not much of a programmer.

rjl20 commented 5 years ago

Ah, I found where that was happening. I have submitted a pull request which adds a new flag/parameter to switch between the current behavior and the behavior I expected from reading the standard.

moinejf commented 5 years ago

Sorry for I did not use your patch. The truncation of the volta bracket was one of the remaining features of abc2ps. It seems that this was not a so good idea: the users want more control on the music elements.