From: Han-Wen Nienhuys Date: Fri, 1 Dec 2006 15:33:26 +0000 (+0100) Subject: Set asymmetric shifts for notes with mixed whole/half collides. Fixes #53 X-Git-Tag: release/2.10.1-1~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=64d00a7b54577142f00e90c1c661f2ea0aa940e4;p=lilypond.git Set asymmetric shifts for notes with mixed whole/half collides. Fixes #53 (cherry picked from 35c33785e2faf3672ede5417c9f4c52de89bbc5f commit) --- diff --git a/input/regression/collision-whole.ly b/input/regression/collision-whole.ly new file mode 100644 index 0000000000..3c818023c9 --- /dev/null +++ b/input/regression/collision-whole.ly @@ -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 } + >> +} diff --git a/lily/note-collision.cc b/lily/note-collision.cc index ddfbf19983..9023f5e5e0 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -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: *