When I was working on `The Phantom of the Opera' a few weeks ago,
I noticed that the brackets over alternative endings get misaligned
when the alternative is placed at the beginning of a line.
I used version 1.3.47 at that time. After upgrading to 1.3.52 and
doing some tests, I noticed that in this case:

1: The bracket for the first alternative starts *after* the clef and
   time signature; brackets for the other alternatives start *before*
   the clef.

2: The brackets at the beginning of a line are too short.
   There should be a small gap (half the interline spacing) between
   brackets.

I included a sample file which demonstrates the behaviour I described
above, as well as a suggestion for dealing with situation #2 (in the
hope that it won't break other things).

Sample file:
---------------
\header{
filename = "spantest.ly";
title = "Spanner test";
composer = "";
enteredby = "Johan Schoone";
}

$data = \notes \relative c' { \time 4/4; \key c \major;
        \repeat "volta" 3 { c d e f g a b c b a g f e d c r
        c e g c e, g c e g, c e g c, e g c c g e c g' e c g e' c g e c' g e c }
        \alternative { { <c1 e1 g1 c1> } { <c2 e2 g2 c2> r } { c4 e g c } }
        \repeat "volta" 3 { c, d e f g a b c b a g f e d c r
        c e g c e, g c e g, c e g c, e g c c g e c g' e c g e' c g e c' g e c }
        \alternative { { <c1 e1 g1 c1> } { <c2 e2 g2 c2> r } { c4 e g c } }
        \repeat "volta" 3 { c, d e f g a b c b a g f e d c r
        c e g c e, g c e g, c e g c, e g c c g e c g' e c g e' c g e c' g e c }
        \alternative { { <c1 e1 g1 c1> } { <c2 e2 g2 c2> r } { c4 e g c } }
        \repeat "volta" 3 { c, d e f g a b c b a g f e d c r
        c e g c e, g c e g, c e g c, e g c c g e c g' e c g e' c g e c' g e c }
        \alternative { { <c1 e1 g1 c1> } { <c2 e2 g2 c2> r } { c4 e g c } }
}

\score{
        \context Staff { \$data }
        \paper {
%               linewidth = 18.0\cm;
%               textheight = 27.0\cm;
        }
}
---------------

The change I made:
---------------
diff -urN lilypond-1.3.52/lily/volta-spanner.cc 
lilypond-1.3.52.js1/lily/volta-spanner.cc
--- lilypond-1.3.52/lily/volta-spanner.cc       Fri May 19 15:33:35 2000
+++ lilypond-1.3.52.js1/lily/volta-spanner.cc   Fri May 19 15:33:55 2000
@@ -66,7 +66,7 @@
   Real staff_space = paper_l ()->get_var ("interline");
   Real half_space = staff_space / 2;
 
-  Real w = spanner_length () - get_broken_left_end_align () - half_space;
+  Real w = spanner_length () - half_space;
   Real h = paper_l()->get_var ("volta_spanner_height");
   Real t = paper_l ()->get_var ("volta_thick");

---------------
 
-- 
Johan Schoone <[EMAIL PROTECTED]>                                \\|//
Assume nothing, expect anything.

Reply via email to