]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.23.jcn4: %-|
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 22 Jan 1999 17:05:30 +0000 (18:05 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 22 Jan 1999 17:05:30 +0000 (18:05 +0100)
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

NEWS
VERSION
input/test/rep.ly [new file with mode: 0644]
lily/repeat-engraver.cc
lily/volta-spanner.cc

diff --git a/NEWS b/NEWS
index 71c7f6334852d7409b78bc83cc7fb68d2a1e7eef..ed8d4e1d1dfb550427581055f38c07d6af0153e4 100644 (file)
--- 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 7864b2e37304a606e1b76fa0f8b5b022a5879e5c..12248a04abbf4d904cbde6c82a460de31a34353c 100644 (file)
--- 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 (file)
index 0000000..d5af518
--- /dev/null
@@ -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 
+                 }
+       >
+}
index 5ab6fe38aafdc4105140bfc728c5ae6448330a11..472b849b0dc65a79c3a81e2c662e644b779ebbd9 100644 (file)
@@ -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<Music*> i (alt->music_p_list_p_->top ()); i.ok () && (i != alt->music_p_list_p_->bottom ()); i++)
+       {
+         stop_mom += i->duration ();
+         if (dynamic_cast<Simultaneous_music *> (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<Music*> i (r->alternative_p_->music_p_list_p_->top ()); i.ok (); i++)
+      for (PCursor<Music*> 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<Simultaneous_music *> (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<Note_column *> (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<Bar*> (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
 }
 
index 751314638832671df76da764cc76a6695fa6a728..2a25bb47b344e683d9e3805d579b23779d3783e5 100644 (file)
@@ -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_ = ".";