From bcb7616df5c2050c8532a392f4e760d92c631470 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 1 Dec 2006 16:33:26 +0100 Subject: [PATCH] Set asymmetric shifts for notes with mixed whole/half collides. Fixes #53 --- input/regression/collision-whole.ly | 14 ++++++++++++++ lily/note-collision.cc | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 input/regression/collision-whole.ly 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 e880c6cc29..2fa8ce4881 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -247,6 +247,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: * -- 2.39.5