]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lyric-phrasing-engraver.cc
* THANKS: Create skeleton for 2.1.
[lilypond.git] / lily / lyric-phrasing-engraver.cc
index 1621d21d03a20a8e7572352ef8b335e49f68f387..fab2a8e607c9f4a5ab010b4cd02512b3e95658e4 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  2000 Glen Prideaux <glenprideaux@iname.com>
+  (c)  2000--2003 Glen Prideaux <glenprideaux@iname.com>
 */
 #include <string.h>
 
 */
 #include <string.h>
 
@@ -14,7 +14,7 @@
 #include "warn.hh"
 
 
 #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);
 
 
 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? */
       /* 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 ? */
       record_notehead (voice_context_id, h);
 
       /* is it in a melisma ? */
@@ -224,7 +224,7 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i)
        }
       else
        {
        }
       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);
          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.
      
      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, 
      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")))
     {
   */
   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 
       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_;
     }
     {
       ancestor = ancestor->daddy_trans_;
     }
@@ -354,12 +354,11 @@ Lyric_phrasing_engraver::stop_translation_timestep ()
 
 
 ENTER_DESCRIPTION(Lyric_phrasing_engraver,
 
 
 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 */     "",
 /* acks  */      "lyric-syllable-interface note-head-interface lyric-extender-interface",
                  /* creats*/       "",
                  /* accepts */     "",
 /* acks  */      "lyric-syllable-interface note-head-interface lyric-extender-interface",