I think I solved the extra dots on span-bars for repeat bars.  It was
merely a matter of calling evaluate_empty before
Bar::before_line_breaking in Span_bar::before_line_breaking.

The patch also changes the look of back-to-back repeat bars a little,
in order to conform to some notation I have here.  I am far from
certain that this is correct, however, and would like some feedback
from others here.  The notation I have seen for back-to-back repeat
bars is:

double-dot thin-line thick-line thin-line double-dot

What lilypond currently uses is:

double-dot thick-line thick-line double-dot

What do others think is correct?  Maybe this should be parameterized?

One thing this patch fails to fix is the postbreaking of Span_bars.
The following file illustrates the problem:
foo = \notes \relative c'' {
\repeat volta 3 { e c d e } \break
\repeat volta 3 { e c d e }
}
\score { 
\context StaffGroup <
\context Staff = one \foo
\context Staff = two \foo
>
\midi{}
\paper{}
}

And here is the promised patch:
Generated by Michael Welsh Duggan <[EMAIL PROTECTED]>,
>From = lilypond-1.3.41, To = lilypond-1.3.41.mwd1

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.41.mwd1.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should rerun autoconf, configure

diff -urN ../lilypond-1.3.41/CHANGES ./CHANGES
--- ../lilypond-1.3.41/CHANGES  Thu Mar 30 04:05:01 2000
+++ ./CHANGES   Fri Mar 31 00:30:53 2000
@@ -1,3 +1,10 @@
+1.3.41.mwd1
+===========
+
+* Fixed extra dots on repeat span-bars.
+
+* Changed the look of :|: repeat bars.
+
 1.3.40.jcn3
 ===========
 
diff -urN ../lilypond-1.3.41/VERSION ./VERSION
--- ../lilypond-1.3.41/VERSION  Thu Mar 30 07:19:49 2000
+++ ./VERSION   Fri Mar 31 01:06:09 2000
@@ -2,7 +2,7 @@
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=41
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=mwd1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -urN ../lilypond-1.3.41/lily/bar.cc ./lily/bar.cc
--- ../lilypond-1.3.41/lily/bar.cc      Tue Mar 21 20:15:44 2000
+++ ./lily/bar.cc       Thu Mar 30 14:54:02 2000
@@ -122,10 +122,21 @@
     }
   else if (str == ":|:")
     {
-      m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
-      m.add_at_edge (X_AXIS, LEFT, colon, kern);      
-      m.add_at_edge (X_AXIS, RIGHT, thick, kern);
+//        m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
+//        m.add_at_edge (X_AXIS, LEFT, colon, kern);      
+//        m.add_at_edge (X_AXIS, RIGHT, thick, kern);
+//        m.add_at_edge (X_AXIS, RIGHT, colon, kern);      
+      m.add_at_edge (X_AXIS, RIGHT, thick, 0);
+      m.add_at_edge (X_AXIS, RIGHT, thin, kern);
       m.add_at_edge (X_AXIS, RIGHT, colon, kern);      
+      m.add_at_edge (X_AXIS, LEFT, thin, kern);
+      m.add_at_edge (X_AXIS, LEFT, colon, kern);      
+    }
+  else if (str == ";|;")
+    {
+      m.add_at_edge (X_AXIS, RIGHT, thick, 0);
+      m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+      m.add_at_edge (X_AXIS, LEFT, thin, kern);
     }
   else if (str == ".|.")
     {
diff -urN ../lilypond-1.3.41/lily/span-bar.cc ./lily/span-bar.cc
--- ../lilypond-1.3.41/lily/span-bar.cc Sun Mar 26 16:00:55 2000
+++ ./lily/span-bar.cc  Thu Mar 30 15:18:57 2000
@@ -41,10 +41,10 @@
 void
 Span_bar::before_line_breaking ()
 {
-  Bar::before_line_breaking ();
-  
   evaluate_empty ();
   
+  Bar::before_line_breaking ();
+  
   //  set_empty (false, Y_AXIS); // a hack to make mark scripts work.
 }
 
@@ -94,13 +94,10 @@
     }
   else if (type_str== ":|:")
     {
-      type_str= ".|.";
+      type_str= ";|;";
     }
+    set_elt_property ("glyph", ly_str02scm (type_str.ch_C ()));
   }
-
-  /*
-    uhh. should do something with type_str ?!!
-   */
 }
 
 Interval
diff -urN ../lilypond-1.3.41/scm/lily.scm ./scm/lily.scm
--- ../lilypond-1.3.41/scm/lily.scm     Tue Mar 28 04:14:44 2000
+++ ./scm/lily.scm      Thu Mar 30 15:01:50 2000
@@ -962,9 +962,11 @@
 (define (break-barline glyph dir)
    (let ((result (assoc glyph 
                        '((":|:" . (":|" . "|:"))
+                         (";|;" . ("|." . ".|"))
                          ("|" . ("|" . ""))
                          ("|s" . (nil . "|"))
                          ("|:" . ("|" . "|:"))
+                         (".|" . ("|" . ".|"))
                          ("|." . ("|." . nil))
                          (":|" . (":|" . nil))
                          ("||" . ("||" . nil))

-- 
Michael Duggan
([EMAIL PROTECTED])

Reply via email to