]> git.donarmstrong.com Git - lilypond.git/commitdiff
note-collision: left-align just the notes without force-hshift;
authorKeith OHara <k-ohara5a5a@oco.net>
Sun, 19 Jul 2015 03:07:08 +0000 (20:07 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sun, 26 Jul 2015 05:23:48 +0000 (22:23 -0700)
input/regression/collision-alignment.ly [deleted file]
input/regression/collision-manual.ly
lily/note-collision.cc

diff --git a/input/regression/collision-alignment.ly b/input/regression/collision-alignment.ly
deleted file mode 100644 (file)
index 428277b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-\header {
-
-    texidoc = "Notes in different staves should be aligned to the
- left-most note, in case of collisions."
-
-}
-
-\layout  { ragged-right = ##t }
-
-\version "2.19.21"
-
-\relative <<
-    \new Staff {
-       <<
-           { f' g } \\
-           { g f }
-       >> }
-    \new Staff {
-       c4 c 
-    }
->>
index 9fad6597d7c0abc4cf9b2fc7b1cb252fbc4a7eef..b39b0eafeb1b1ed9151480d60cbb737f788cc09c 100644 (file)
@@ -1,17 +1,28 @@
 \header {
-
-  texidoc = "Collision resolution may be forced manually with @code{force-hshift}. "
+  texidoc = "Colliding note-columns may be shifted manually
+with @code{force-hshift}.  Arrangements of notes after
+collision-resolution have their main columns (not suspended notes)
+left-aligned, excluding columns with forced shifts."
 }
-\version "2.19.21"
+\version "2.19.24"
 
-\paper  {
-  ragged-right = ##t
-}
+\new PianoStaff \with { \consists #Span_stem_engraver } <<
+  \new Staff \fixed c' <<
+    \new Voice {
+      \voiceOne f e
+      \crossStaff
+      \once\override NoteColumn.force-hshift = #-0.8
+      f
+      \once\override NoteColumn.force-hshift = #-1.5
+      e
+    }
+    \new Voice {
+      \voiceTwo e f
+      \once\override NoteColumn.force-hshift = #0
+      \crossStaff e
+      \crossStaff f
+    }
+  >>
+  \new Staff {\clef bass g g e f }
+>>
 
-\relative {
-  << {  f'
-       \override NoteColumn.force-hshift = #0.1
-       f } \\
-     {  e  e }
-   >> 
-}
index a9564951f3a6a8b349f1f579cb8842e3d81807af..0ef6b7b4e0b322ba767d35a8684402fbb1e7f2fa 100644 (file)
@@ -392,7 +392,7 @@ Note_collision_interface::calc_positioning_done (SCM smob)
     }
 
   vector<Grob *> done;
-  Real left_most = 1e6;
+  Real left_most = 0.0;
 
   vector<Real> amounts;
   for (; scm_is_pair (hand); hand = scm_cdr (hand))
@@ -402,8 +402,6 @@ Note_collision_interface::calc_positioning_done (SCM smob)
 
       done.push_back (s);
       amounts.push_back (amount);
-      if (amount < left_most)
-        left_most = amount;
     }
   for (; scm_is_pair (autos); autos = scm_cdr (autos))
     {