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
19 /* accepts */ "general-music",
21 /* reads */ "busyGrobs",
25 Forbid_line_break_engraver::start_translation_timestep()
28 Check for running note heads. This should probably be done elsewhere.
30 SCM busy = get_property ("busyGrobs");
32 Moment now = now_mom();
33 while (gh_pair_p (busy) && unsmob_moment (gh_caar (busy))->main_part_ == now.main_part_)
37 while (gh_pair_p (busy))
39 Grob *g = unsmob_grob (gh_cdar (busy));
40 if (Rhythmic_head::has_interface (g))
42 top_engraver()->forbid_breaks();