]> git.donarmstrong.com Git - lilypond.git/commitdiff
Align pedal brackets to main note-column; issue 723
authorKeith OHara <k-ohara5a5a@oco.net>
Fri, 26 Aug 2011 04:38:43 +0000 (21:38 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Tue, 6 Sep 2011 07:51:30 +0000 (00:51 -0700)
input/regression/pedal-bracket.ly
lily/piano-pedal-bracket.cc

index ff66cc47aa755519c9b383fd7c5b7271b13c8252..007b8404799d3291243e38678004bc119b7ff4c0 100644 (file)
@@ -3,8 +3,8 @@
 \header {
 
     texidoc = "The brackets of a piano pedal should start and end at
- the left side of the note. If a note is shared between two brackets,
- these ends are flared.
+ the left side of the main note-column. If a note is shared between
+ two brackets, these ends are flared.
 
 At a line-break, there are no vertical endings.  " }
 
@@ -12,14 +12,14 @@ At a line-break, there are no vertical endings.  " }
      \relative c'' {
         \set Staff.pedalSustainStyle = #'bracket
 
-        c4 d e \sustainOn b c c, \sustainOff \sustainOn  d8[ c]  e8[ 
-           e \sustainOff \sustainOn]  f4 d
-        \sustainOff g \sustainOn b b, \sustainOff c'
+        c4 d <e f b,> \sustainOn b c c, \sustainOff \sustainOn  d8[ c]  e8[
+            e \sustainOff \sustainOn]  f4 r \sustainOff
+            g \sustainOn bes bes, \sustainOff c'
 
         \set Staff.pedalUnaCordaStyle = #'mixed
 
         c4 d \unaCorda e f g
-        b  | \break c b c \treCorde c
+        b  | \break c b <c e,>\arpeggio \treCorde c
     }
     \layout { ragged-right = ##t }
 }
index fee4c4b762637bf0b417de7880df1be1e96485f8..312459e67ba7addd5f9a4cd23eb021d870f8d807 100644 (file)
@@ -65,10 +65,11 @@ Piano_pedal_bracket::print (SCM smob)
             height[d] = 0.0;
           else
             flare[d] = 0.0;
-        }
 
-      Interval ext = robust_relative_extent (b, common, X_AXIS);
-      span_points[d] = ext [broken[d] ? RIGHT : LEFT];
+          span_points[d] = robust_relative_extent (b, common, X_AXIS)[RIGHT];
+        }
+      else
+        span_points[d] = b->relative_coordinate (common, X_AXIS);
     }
   while (flip (&d) != LEFT);