1 #include "rhythmic-head.hh"
4 #include "score-engraver.hh"
6 class Forbid_line_break_engraver : public Engraver
9 TRANSLATOR_DECLARATIONS(Forbid_line_break_engraver);
10 virtual void start_translation_timestep ();
13 Forbid_line_break_engraver::Forbid_line_break_engraver(){}
15 ENTER_DESCRIPTION(Forbid_line_break_engraver,
16 /* descr */ "Forbid line breaks when note heads are still playing at some point.",
20 /* reads */ "busyGrobs",
24 Forbid_line_break_engraver::start_translation_timestep()
27 Check for running note heads. This should probably be done elsewhere.
29 SCM busy = get_property ("busyGrobs");
31 Moment now = now_mom();
32 while (gh_pair_p (busy) && unsmob_moment (gh_caar (busy))->main_part_ == now.main_part_)
36 while (gh_pair_p (busy))
38 Grob *g = unsmob_grob (gh_cdar (busy));
39 if (Rhythmic_head::has_interface (g))
41 get_score_engraver()->forbid_breaks();