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 "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);
/* 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 ? */
}
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);
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,
*/
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_;
}
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 */ "");