2 melisma-engraver.cc -- implement Melisma_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
11 duplicated in melisma-performer
13 #include "engraver.hh"
20 Signal existence of melismas.
22 class Melisma_translator : public Translator
25 TRANSLATOR_DECLARATIONS (Melisma_translator);
27 virtual bool try_music (Music *);
28 virtual void process_music ();
29 virtual void start_translation_timestep ();
35 Melisma_translator::try_music (Music *m)
37 if (m->is_mus_type ("melisma-playing-event"))
39 return melisma_busy (context ());
41 else if (m->is_mus_type ("melisma-span-event"))
51 Melisma_translator::process_music ()
55 SCM sd = event_->get_property ("span-direction");
56 Direction d = to_dir (sd);
58 context ()->set_property ("melismaBusy", SCM_BOOL_T);
60 context ()->unset_property (ly_symbol2scm ("melismaBusy"));
66 Melisma_translator::start_translation_timestep ()
71 Melisma_translator::Melisma_translator ()
76 ENTER_DESCRIPTION (Melisma_translator,
77 /* descr */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ",
79 /* accepts */ "melisma-playing-event melisma-span-event",
81 /* reads */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",