X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fauto-beam-engraver.cc;h=a98b05f48d953384474d5e5996fb023062b02eb1;hb=ec8b80d1b75688aa875078a228fb0e6ec39d3ccb;hp=d2cef6ae1693ecb2bd9bf8a928958b9978a7fb4a;hpb=91f01637f31c7d904fd8016b49184e935bf1c8ab;p=lilypond.git diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index d2cef6ae16..a98b05f48d 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -27,7 +27,6 @@ class Auto_beam_engraver : public Engraver protected: void stop_translation_timestep (); - void start_translation_timestep (); void process_music (); virtual void finalize (); virtual void derived_mark () const; @@ -106,6 +105,16 @@ Auto_beam_engraver::check_bar_property () void Auto_beam_engraver::process_music () { + /* + don't beam over skips + */ + if (stems_) + { + Moment now = now_mom (); + if (extend_mom_ < now) + end_beam (); + } + if (scm_is_string (get_property ("whichBar"))) { consider_end (shortest_mom_); @@ -185,7 +194,7 @@ Auto_beam_engraver::create_beam () return 0; /* - Can't use make_spanner_from_properties() because we have to use + Can't use make_spanner_from_properties () because we have to use beam_settings_. */ Spanner *beam = new Spanner (beam_settings_); @@ -273,26 +282,12 @@ Auto_beam_engraver::typeset_beam () } } -void -Auto_beam_engraver::start_translation_timestep () -{ - process_acknowledged_count_ = 0; - /* - don't beam over skips - */ - if (stems_) - { - Moment now = now_mom (); - if (extend_mom_ < now) - end_beam (); - } - forbid_ = 0; -} - void Auto_beam_engraver::stop_translation_timestep () { typeset_beam (); + process_acknowledged_count_ = 0; + forbid_ = 0; } void @@ -393,7 +388,7 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info) durlog - 2); stems_->push_back (stem); last_add_mom_ = now; - extend_mom_ = max (extend_mom_, now) + get_event_length (ev); + extend_mom_ = max (extend_mom_, now) + get_event_length (ev, now); } void