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>
12 #include "translator.icc"
14 /* Remove this translator. */
17 Signal existence of melismas.
19 class Melisma_translator : public Translator
22 TRANSLATOR_DECLARATIONS (Melisma_translator);
24 virtual bool try_music (Music *);
25 void process_music ();
26 void start_translation_timestep ();
31 Melisma_translator::try_music (Music *m)
33 if (m->is_mus_type ("melisma-playing-event"))
34 return melisma_busy (context ());
35 else if (m->is_mus_type ("melisma-span-event"))
45 Melisma_translator::process_music ()
49 SCM sd = event_->get_property ("span-direction");
50 Direction d = to_dir (sd);
52 context ()->set_property ("melismaBusy", SCM_BOOL_T);
54 context ()->unset_property (ly_symbol2scm ("melismaBusy"));
59 Melisma_translator::start_translation_timestep ()
64 Melisma_translator::Melisma_translator ()
69 ADD_TRANSLATOR (Melisma_translator,
70 /* doc */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ",
73 /* read */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",