From: Jan Nieuwenhuizen Date: Fri, 22 Jan 1999 17:05:30 +0000 (+0100) Subject: patch::: 1.1.23.jcn4: %-| X-Git-Tag: release/1.1.24~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e455eda69eeda82059a981d35bfadeb76728e4de;p=lilypond.git patch::: 1.1.23.jcn4: %-| pl 23.jcn4 - hakken aan repeat-engaver --- Generated by janneke@gnu.org using package-diff 0.62, >From = lilypond-1.1.23.jcn3, To = lilypond-1.1.23.jcn4 usage cd lilypond-source-dir; patch -E -p1 < lilypond-1.1.23.jcn4.diff Patches do not contain automatically generated files or (urg) empty directories, i.e., you should rerun autoconf, configure and possibly make outdirs. --state 1.1.23.jcn3 1.1.23.jcn4 ++state --- diff --git a/NEWS b/NEWS index 71c7f63348..ed8d4e1d1d 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,12 @@ -pl 23.mb1 +--- ../lilypond-1.1.23.jcn3/NEWS Thu Jan 21 18:57:17 1999 +++ b/NEWS Fri Jan 22 17:54:13 1999 +@@ -1,3 +1,6 @@ +pl 23.jcn4 + - hakken aan repeat-engaver + + pl 23.jcn3 + - succussfully removed []s from wtk1-fugue2.ly + - bf + smarter autobeamerpl 23.mb1 - bf: Position and possible SIGSEGV in Mark_engraver - Added padding support in G_staff_side_item - bf: Correct direction of textual scripts. diff --git a/VERSION b/VERSION index 7864b2e373..12248a04ab 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 PATCH_LEVEL=23 -MY_PATCH_LEVEL=mb1 +MY_PATCH_LEVEL=jcn4 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/rep.ly b/input/test/rep.ly new file mode 100644 index 0000000000..d5af51806e --- /dev/null +++ b/input/test/rep.ly @@ -0,0 +1,10 @@ +\score{ + < + \type Staff \notes\relative c'{ + c4 d e f + \repeat 2 { g a b c } + \alternative { { c b a g } { f e d c } } + c c c c + } + > +} diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index 5ab6fe38aa..472b849b0d 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -33,8 +33,14 @@ Repeat_engraver::do_try_music (Music* m) if (r->unfold_b_) return true; - Moment stop_mom = now_moment () + r->repeat_p_->duration () - + r->alternative_p_->music_p_list_p_->top ()->duration (); + Music_sequence* alt = r->alternative_p_; + Moment stop_mom = now_moment () + r->repeat_p_->duration (); + for (PCursor i (alt->music_p_list_p_->top ()); i.ok () && (i != alt->music_p_list_p_->bottom ()); i++) + { + stop_mom += i->duration (); + if (dynamic_cast (alt)) + break; + } Moment alt_mom = now_moment () + r->repeat_p_->duration (); /* TODO: @@ -51,12 +57,13 @@ Repeat_engraver::do_try_music (Music* m) return false; repeated_music_arr_.push (r); stop_mom_arr_.push (stop_mom); - for (PCursor i (r->alternative_p_->music_p_list_p_->top ()); i.ok (); i++) + for (PCursor i (alt->music_p_list_p_->top ()); i.ok (); i++) { alternative_music_arr_.push (i.ptr ()); alternative_start_mom_arr_.push (alt_mom); - alt_mom += i->duration (); - alternative_stop_mom_arr_.push (alt_mom); + alternative_stop_mom_arr_.push (alt_mom + i->duration ()); + if (!dynamic_cast (alt)) + alt_mom += i->duration (); } return true; } @@ -70,13 +77,13 @@ Repeat_engraver::acknowledge_element (Score_element_info i) if (Note_column *c = dynamic_cast (i.elem_l_)) { for (int i = 0; i < volta_p_arr_.size (); i++) - if ((now >= alternative_start_mom_arr_[i]) && volta_p_arr_[i]) + if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i])) volta_p_arr_[i]->add_column (c); } if (Bar *c = dynamic_cast (i.elem_l_)) { for (int i = 0; i < volta_p_arr_.size (); i++) - if ((now >= alternative_start_mom_arr_[i]) && volta_p_arr_[i]) + if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i])) volta_p_arr_[i]->add_column (c); } } @@ -149,26 +156,45 @@ Repeat_engraver::do_pre_move_processing () repeated_music_arr_.del (i); } } + Time_description const *time = get_staff_info().time_C_; for (int i = volta_p_arr_.size (); i--; ) { - if (now >= alternative_stop_mom_arr_[i]) + if (volta_p_arr_[i] && (now >= alternative_stop_mom_arr_[i]) + && (volta_p_arr_[i]->column_arr_.size () >= 1)) + // if (volta_p_arr_[i] && (now > alternative_stop_mom_arr_[i]) + // && !time->whole_in_measure_ + // && (volta_p_arr_[i]->column_arr_.size () > 1)) { - if (volta_p_arr_[i]) - { - typeset_element (volta_p_arr_[i]); - volta_p_arr_[i] = 0; - } + typeset_element (volta_p_arr_[i]); + volta_p_arr_[i] = 0; volta_p_arr_.del (i); alternative_music_arr_[i] = 0; alternative_music_arr_.del (i); alternative_start_mom_arr_.del (i); alternative_stop_mom_arr_.del (i); - } + } } } void Repeat_engraver::do_post_move_processing () { +#if 0 + Time_description const *time = get_staff_info().time_C_; + Moment now = now_moment (); + for (int i = volta_p_arr_.size (); i--; ) + { + if ((now > alternative_stop_mom_arr_[i]) + && !time->whole_in_measure_) + { + volta_p_arr_[i] = 0; + volta_p_arr_.del (i); + alternative_music_arr_[i] = 0; + alternative_music_arr_.del (i); + alternative_start_mom_arr_.del (i); + alternative_stop_mom_arr_.del (i); + } + } +#endif } diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 7513146388..2a25bb47b3 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -45,7 +45,7 @@ Volta_spanner::do_brew_molecule_p () const Atom num (number_p_->get_atom (paper (), LEFT)); Atom dot (dot_p_->get_atom (paper (), LEFT)); Real dy = column_arr_.top ()->extent (Y_AXIS) [UP] > - column_arr_[0]->extent (Y_AXIS) [UP]; + column_arr_[0]->extent (Y_AXIS) [UP]; dy += 2 * h; /* @@ -75,7 +75,11 @@ Volta_spanner::do_add_processing () if (column_arr_.size ()) { set_bounds (LEFT, column_arr_[0]); - set_bounds (RIGHT, column_arr_.top ()); + // set_bounds (RIGHT, column_arr_.top ()); + // huh? + // array.top () == last element?? + // list.top () == first element + set_bounds (RIGHT, column_arr_[column_arr_.size () - 1]); } number_p_->style_str_ = "number-1"; dot_p_->text_str_ = ".";