lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: Fix lyric extenders to end properly


From: Chris Snyder
Subject: Patch: Fix lyric extenders to end properly
Date: Tue, 24 Feb 2009 13:37:13 -0500
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

I'm attaching a patch that fixes lyric extenders to end properly in some
cases where they hadn't been. Basically, if an extender was at the end
of a Lyrics section, while the voice continued further, the extender
line was not ended correctly. In some cases, I've had it continue for a
single extra note. In others, it's continued all the way to the end of
the music. I've run into this issue quite a few times when I've had to
add some text because one vocal part has an alternate rhythm for a
couple of measures.

As I understand the code, extenders are stopped when the next Lyric
event comes along. Since these situations do not have another lyric
after the extender, the extender goes for too long. My patch adds a
check to make sure that the notes the extender sees are still part of a
melisma, and completes the extender upon encountering the first note
that is not (i.e. the last note of the melisma).

This bug is described in Issue #331, but the two test-cases provided
there work properly in recent versions. I've created a test-case that
demonstrates the problem with the latest code in master:
http://temp.mvpsoft.com/ly/lyric_extender/
Two result pngs are included: one with 2.13.0 (current master as of a
half-hour or so ago) and one with my patch applied.

I have a case in a bigger score where the extenders go for pages and
pages too long, but I haven't been able to boil that down to a precise
test-case. I have verified, however, that this patch fixes that instance
as well.

Thanks. I look forward to any comments.

-Chris Snyder
>From ae36a3f6e79ce3a15d4e254a8919108b9feed440 Mon Sep 17 00:00:00 2001
From: Chris Snyder <address@hidden>
Date: Tue, 24 Feb 2009 13:02:17 -0500
Subject: [PATCH] Fix lyric extenders to end properly when there are notes but 
no more lyrics.

---
 lily/extender-engraver.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc
index f3f711d..d29f5a3 100644
--- a/lily/extender-engraver.cc
+++ b/lily/extender-engraver.cc
@@ -98,6 +98,11 @@ Extender_engraver::stop_translation_timestep ()
            {
              Pointer_group_interface::add_grob (pending_extender_,
                                                 ly_symbol2scm ("heads"), h);
+             if (! melisma_busy(voice))
+             {
+               completize_extender (pending_extender_);
+               pending_extender_ = 0;
+             }
            }
        }
       else
-- 
1.5.6.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]