]> git.donarmstrong.com Git - lilypond.git/commitdiff
Set asymmetric shifts for notes with mixed whole/half collides. Fixes #53
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Dec 2006 15:33:26 +0000 (16:33 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Dec 2006 15:49:21 +0000 (16:49 +0100)
(cherry picked from 35c33785e2faf3672ede5417c9f4c52de89bbc5f commit)

input/regression/collision-whole.ly [new file with mode: 0644]
lily/note-collision.cc

diff --git a/input/regression/collision-whole.ly b/input/regression/collision-whole.ly
new file mode 100644 (file)
index 0000000..3c81802
--- /dev/null
@@ -0,0 +1,14 @@
+\version "2.10.1"
+
+\header {
+ texidoc = "Mixed collisions with whole notes require asymmetric shifts."
+}
+
+\layout{ragged-right=##t}
+\relative c'' {
+  <<
+    { c1 c2 s2 c1 c4 s2. }
+    \\
+    { c2 s2 c1 c4 s2. c1 }
+ >>
+}
index ddfbf19983e14572dcf8fe4eec4baae09489cce1..9023f5e5e096b4aab6b4c0e5ad36c6f78ad494bb 100644 (file)
@@ -246,6 +246,22 @@ check_meshing_chords (Grob *me,
   else
     shift_amount *= 0.17;
 
+  /*
+    
+  */
+  if (full_collide
+      && dnball_type * upball_type == 0)
+    {
+      if (upball_type == 0 && dnball_type == 1)
+       shift_amount *= 1.25;
+      else if (upball_type == 0 && dnball_type == 2)
+       shift_amount *= 1.35;
+      else if (dnball_type == 0 && upball_type == 1)
+       shift_amount *= 0.7;
+      else if (dnball_type == 0 && upball_type == 2)
+       shift_amount *= 0.75;
+    }
+  
   /*
    * Fix issue #44:
    *