X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flyric-phrasing-engraver.cc;h=fab2a8e607c9f4a5ab010b4cd02512b3e95658e4;hb=729d8509039c4c69ea89c102c89fc0df9d9e228c;hp=0dba2673df993d90730de0e3fbc5756bd5e8c101;hpb=6b9bfd374643d1eed1ea158777d796c57a2bcd3a;p=lilypond.git diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index 0dba2673df..fab2a8e607 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2000 Glen Prideaux + (c) 2000--2003 Glen Prideaux */ #include @@ -14,7 +14,7 @@ #include "warn.hh" -String get_context_id (Translator_group * ancestor, const char * type); +String get_context_id (Translator_group * ancestor, SCM); String trim_suffix (String &id); @@ -200,7 +200,7 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) /* caught a note head ... do something with it */ /* what's its Voice context name? */ - String voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, "Voice"); + String voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, ly_symbol2scm ("Voice")); record_notehead (voice_context_id, h); /* is it in a melisma ? */ @@ -224,7 +224,7 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) } else { - voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, "LyricsVoice"); + voice_context_id = get_context_id (i.origin_trans_->daddy_trans_,ly_symbol2scm ( "LyricsVoice")); voice_context_id = trim_suffix (voice_context_id); } record_lyric (voice_context_id, h); @@ -237,7 +237,7 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) This has the effect of finishing the extender under the last note of the melisma, instead of extending it to the next lyric. - Problem: the extender request is thrown at the same moment as the next lyric, + Problem: the extender event is thrown at the same moment as the next lyric, by which time we have already passed the last note of the melisma. However, the Lyric_phrasing_engraver remembers the last note, so just attach it to that, provided it was melismatic. If it was not melismatic, @@ -246,16 +246,16 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) */ if (h->internal_has_interface (ly_symbol2scm ("lyric-extender-interface"))) { - String voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, "LyricsVoice"); + String voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, ly_symbol2scm ("LyricsVoice")); record_extender (trim_suffix (voice_context_id), h); return; } } String -get_context_id (Translator_group * ancestor, const char *type) +get_context_id (Translator_group * ancestor, SCM type) { - while (ancestor != 0 && ancestor->type_string_ != type) + while (ancestor != 0 && !ancestor->is_alias_b(type)) { ancestor = ancestor->daddy_trans_; } @@ -354,14 +354,13 @@ Lyric_phrasing_engraver::stop_translation_timestep () ENTER_DESCRIPTION(Lyric_phrasing_engraver, - /* descr */ " -This engraver combines note heads and lyrics for alignment. - -This engraver is switched on by default. Turn it off for faster -processing of orchestral scores. -", + /* descr */ +"This engraver combines note heads and lyrics for alignment. " +"\n\n" +"This engraver is switched on by default. Turn it off for faster " +"processing of orchestral scores. ", /* creats*/ "", - /* accepts */ "general-music", + /* accepts */ "", /* acks */ "lyric-syllable-interface note-head-interface lyric-extender-interface", /* reads */ "automaticPhrasing melismaEngraverBusy associatedVoice phrasingPunctuation", /* write */ "");