From e71fbb60f7cd432e264d5ece091dcbb399fa8f51 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Wed, 12 Jan 2011 13:07:42 +0100 Subject: [PATCH] lily/stem-engraver.cc: allow distinguishable durations to be stemmed together (string chords) --- lily/stem-engraver.cc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index e21d796765..fb54591147 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -135,8 +135,22 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi) make_stem (gi); int ds = Stem::duration_log (stem_); - - if (ds != d->duration_log ()) + int dc = d->duration_log (); + + // half notes and quarter notes all have compatible stems. + // Longas are done differently (oops?), so we can't unify + // them with the other stemmed notes. + if (ds == 1) + ds = 2; + if (dc == 1) + dc = 2; + // whole notes and brevis both have no stems + if (ds == -1) + ds = 0; + if (dc == -1) + dc = 0; + + if (ds != dc) { gi.event_cause ()->origin ()->warning (_f ("adding note head to incompatible stem (type = %d/%d)", ds < 0 ? 1 << -ds : 1, -- 2.39.2