From: hanwen Date: Thu, 18 Sep 2003 14:06:35 +0000 (+0000) Subject: * lily/auto-beam-engraver.cc (process_music): end/junk beam if X-Git-Tag: release/2.1.3~145 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0a69f93902b6c6010807fb307441a295e1d58a56;p=lilypond.git * lily/auto-beam-engraver.cc (process_music): end/junk beam if special (repeat) bar comes along. * input/regression/auto-beam-bar.ly: update. --- diff --git a/ChangeLog b/ChangeLog index ef433d11b1..e76994e9bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-09-18 Han-Wen Nienhuys + * lily/auto-beam-engraver.cc (process_music): end/junk beam if + special (repeat) bar comes along. + + * input/regression/auto-beam-bar.ly: update. + * scripts/lilypond-book.py (output_dict): remove support for the EPS option. diff --git a/input/regression/auto-beam-bar.ly b/input/regression/auto-beam-bar.ly index 61f74b9e8f..87957a4f55 100644 --- a/input/regression/auto-beam-bar.ly +++ b/input/regression/auto-beam-bar.ly @@ -1,23 +1,16 @@ -\version "1.9.4" +\version "1.9.7" \header{ -texidoc=" -The first two a8 notes should not be beamed. -Also, no automatic beaming accross bar lines. -" +texidoc="No auto beams will be put over (manual) repeat bars." } -\score{ -\notes \notes\relative c'' { -\time 2/8 -a8 a -\time 6/8 -a16 cis d a bes g fis4 g8 -%a4. fis4 g8 -a16 g a bes c d % ees8 d c -} -\paper{ +\score { + \notes { + \time 3/4 + a'4 b' c''8 \bar ":|:" d''8 + } + \paper{ raggedright = ##t } } diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 1d6af1f1fa..42e3935d8d 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -31,6 +31,7 @@ class Auto_beam_engraver : public Engraver protected: virtual void stop_translation_timestep (); virtual void start_translation_timestep (); + virtual void process_music (); virtual void finalize (); virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); @@ -73,6 +74,15 @@ private: Beaming_info_list*finished_grouping_; }; +void +Auto_beam_engraver::process_music () +{ + if (gh_string_p (get_property ("whichBar"))) + { + consider_end (shortest_mom_); + junk_beam (); + } +} Auto_beam_engraver::Auto_beam_engraver () @@ -256,9 +266,13 @@ Auto_beam_engraver::create_beam () void Auto_beam_engraver::begin_beam () { - assert (!stems_); + if (stems_ || grouping_ ) + { + programming_error ("already have autobeam"); + return; + } + stems_ = new Link_array; - assert (!grouping_); grouping_ = new Beaming_info_list; beam_settings_ = get_property ("Beam"); @@ -271,7 +285,8 @@ Auto_beam_engraver::begin_beam () void Auto_beam_engraver::junk_beam () { - assert (stems_); + if (!stems_) + return ; delete stems_; stems_ = 0;