2 melisma-engraver.cc -- implement Melisma_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
13 #include "translator.icc"
15 /* Remove this translator. */
18 Signal existence of melismas.
20 class Melisma_translator : public Translator
23 TRANSLATOR_DECLARATIONS (Melisma_translator);
25 virtual bool try_music (Music *);
26 void process_music ();
27 void start_translation_timestep ();
32 Melisma_translator::try_music (Music *m)
34 if (m->is_mus_type ("melisma-playing-event"))
35 return melisma_busy (context ());
36 else if (m->is_mus_type ("melisma-span-event"))
46 Melisma_translator::process_music ()
50 SCM sd = event_->get_property ("span-direction");
51 Direction d = to_dir (sd);
53 context ()->set_property ("melismaBusy", SCM_BOOL_T);
55 context ()->unset_property (ly_symbol2scm ("melismaBusy"));
60 Melisma_translator::start_translation_timestep ()
65 Melisma_translator::Melisma_translator ()
70 ADD_TRANSLATOR (Melisma_translator,
71 /* doc */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ",
76 "melismaBusyProperties "