2 melisma-engraver.cc -- implement Melisma_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "engraver.hh"
15 Signal existence of melismas.
17 class Melisma_translator : public Translator
20 TRANSLATOR_DECLARATIONS (Melisma_translator);
22 virtual bool try_music (Music *);
23 virtual void process_music ();
24 virtual void start_translation_timestep ();
30 Melisma_translator::try_music (Music *m)
32 if (m->is_mus_type ("melisma-playing-event"))
34 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"));
61 Melisma_translator::start_translation_timestep ()
66 Melisma_translator::Melisma_translator ()
71 ADD_TRANSLATOR (Melisma_translator,
72 /* descr */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ",
74 /* accepts */ "melisma-playing-event melisma-span-event",
76 /* reads */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",