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"
15 Signal existence of melismas.
17 class Melisma_translator : public Translator
20 TRANSLATOR_DECLARATIONS (Melisma_translator);
22 virtual bool try_music (Music *);
23 void process_music ();
24 void start_translation_timestep ();
29 Melisma_translator::try_music (Music *m)
31 if (m->is_mus_type ("melisma-playing-event"))
32 return melisma_busy (context ());
33 else if (m->is_mus_type ("melisma-span-event"))
43 Melisma_translator::process_music ()
47 SCM sd = event_->get_property ("span-direction");
48 Direction d = to_dir (sd);
50 context ()->set_property ("melismaBusy", SCM_BOOL_T);
52 context ()->unset_property (ly_symbol2scm ("melismaBusy"));
57 Melisma_translator::start_translation_timestep ()
62 Melisma_translator::Melisma_translator ()
67 ADD_TRANSLATOR (Melisma_translator,
68 /* doc */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ",
70 /* accept */ "melisma-playing-event melisma-span-event",
71 /* read */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",