]> git.donarmstrong.com Git - lilypond.git/commitdiff
fixes for cyclic dependencies.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 Jan 2007 01:04:28 +0000 (02:04 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 Jan 2007 01:04:28 +0000 (02:04 +0100)
input/regression/music-map.ly
lily/beam-quanting.cc
lily/stem.cc

index 1a1afb1d284a423916aa897ea18867afaa1b249f..1450098a1ca648e0277eb2b38d851f850e8fa0e4 100644 (file)
@@ -37,5 +37,5 @@ foobar =  \transpose c c' { c4\>-^ c4-^ c4\!-^ c4-^  }
 
   << \applyMusic #(lambda (x) (music-map notes-to-skip x))
      \foobar
-     { d2 d2 } >> 
+     { d8 d d d d d d d  } >> 
 }
index 695cb80b6eb2b8a950758b403b7e3bc3cb021507..7ef972ec27cdc721660ae36827673d31cb334e8b 100644 (file)
@@ -160,10 +160,8 @@ Beam::quanting (SCM smob, SCM posns)
   Real xr = fvs ? lvs->relative_coordinate (common[X_AXIS], X_AXIS) : 0.0;
 
   /*
-    We store some info to quickly interpolate.
-
-    Sometimes my head is screwed on backwards.  The stemlength are
-    AFFINE linear in YL and YR. If YL == YR == 0, then we might have
+    We store some info to quickly interpolate.  The stemlength are
+    affine linear in YL and YR. If YL == YR == 0, then we might have
     stem_y != 0.0, when we're cross staff.
 
   */
@@ -179,11 +177,18 @@ Beam::quanting (SCM smob, SCM posns)
       bool f = to_boolean (s->get_property ("french-beaming"))
        && s != lvs && s != fvs;
 
-      base_lengths.push_back (calc_stem_y (me, s, common, xl, xr,
-                                     Interval (0, 0), f) / ss);
+      if (Stem::is_normal_stem (s))
+       {
+         base_lengths.push_back (calc_stem_y (me, s, common, xl, xr,
+                                              Interval (0, 0), f) / ss);
+       }
+      else
+       {
+         base_lengths.push_back (0);
+       }
+
       stem_xposns.push_back (s->relative_coordinate (common[X_AXIS], X_AXIS));
     }
-
   bool xstaff = false;
   if (lvs && fvs)
     {
@@ -348,7 +353,7 @@ Beam::score_stem_lengths (vector<Grob*> const &stems,
   for (vsize i = 0; i < stems.size (); i++)
     {
       Grob *s = stems[i];
-      if (Stem::is_invisible (s))
+      if (!Stem::is_normal_stem (s))
        continue;
 
       Real x = stem_xs[i];
index dc7c82e91b63d6c191db0ea9545f5666753fdd23..857dfb7d49fbbc37aceed0421697de11b9806566 100644 (file)
@@ -557,13 +557,11 @@ SCM
 Stem::height (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-
+  if (!is_normal_stem (me))
+    return ly_interval2scm (Interval ());
+  
   Direction dir = get_grob_direction (me);
   
-  /* Trigger callback.
-
-  UGH. Should be automatic
-  */
   Grob *beam = get_beam (me);
   if (beam)
     {
@@ -910,10 +908,14 @@ Stem::calc_stem_info (SCM smob)
   Real height_of_my_trem = 0.0;
   Grob *trem = unsmob_grob (me->get_object ("tremolo-flag"));
   if (trem)
-      height_of_my_trem = trem->extent (trem, Y_AXIS).length ()
+    {
+      height_of_my_trem
+       = Stem_tremolo::vertical_length (trem)
         /* hack a bit of space around the trem. */
         + beam_translation;
+    }
 
+  
   /* UGH
      It seems that also for ideal minimum length, we must use
      the maximum beam count (for this direction):