]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/self-aligment-interface.cc (centered_on_parent): only
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 19 Aug 2002 10:57:41 +0000 (10:57 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 19 Aug 2002 10:57:41 +0000 (10:57 +0000)
return center if extents not empty.

* scm/music-functions.scm (unfold-repeats): typo,

ChangeLog
input/regression/repeat-unfold-all.ly
lily/music.cc
lily/self-aligment-interface.cc
scm/music-functions.scm

index 5523c1569419418d1954f8879354d21efa8b8413..45c2a213d871f02c3680609a7a0fd8353cd0c856 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 
        * VERSION: release 1.6.0 
 
+       * lily/self-aligment-interface.cc (centered_on_parent): only
+       return center if extents not empty.
+
+       * scm/music-functions.scm (unfold-repeats): typo,  
+
        * mf/feta-bolletjes.mf: use resolution independent variables.
 
 2002-08-19  janneke  <janneke@blauw.xs4all.nl>
index 23428c15e5f382b4f1499684aba131f0fbcca59c..b4fe54c30bc45875220638e21f8ac42572e81763 100644 (file)
@@ -4,9 +4,12 @@
     texidoc = "Repeats may be unfolded through the Scheme function @code{unfold-repeats}."
 }
 
-nots = \notes\relative c'   {c4 \repeat volta 2 c4 \alternative { d e  }}
+nots = \notes\relative c'   {
+    c4 \repeat volta 2 c4 \alternative { d e  }
+    \repeat tremolo 4 { c16 d }
+}
 
-\score { \notes {
+\score { \notes \context Voice {
 \nots
 \apply #unfold-repeats \nots
 }
index 6f9ce4c928538a13564c501a2d9fc22543346110..4eb6a68514659e2e54fbb36d12cc4272011b7ecb 100644 (file)
@@ -231,7 +231,7 @@ LY_DEFINE(ly_set_mus_property,
          "Set property @var{sym} in music expression @var{mus} to @var{val}.")
 {
   Music * sc = unsmob_music (mus);
-  SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "music");
   SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
 
   bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?"));
index dd0c05cc1965cc381249b3f5cdad9f85841fb090..15eec97cd05d94b92155f4f2abea8e40159f738b 100644 (file)
@@ -11,8 +11,9 @@ Self_alignment_interface::centered_on_parent (SCM element_smob, SCM axis)
   Grob *me = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (axis);
   Grob *him = me->get_parent (a);
-
-  return gh_double2scm (him->extent (him,a).center ());  
+  Interval he = him->extent (him,a);
+  
+  return  gh_double2scm (he.empty_b () ? 0.0 : he.center ());
 }
 
 
index 59a78254ee2ec994003dd6ff16bc3557aac5025b..cab888da1769c81757d8709a54289c8fe7fab46a 100644 (file)
@@ -53,13 +53,13 @@ written by Rune Zedeler. "
   (let* ((es (ly-get-mus-property music 'elements))
          (e (ly-get-mus-property music 'element))
          (n  (ly-music-name music)))
-
     (if (equal? n "Repeated_music")
         (begin
          (if (equal?
               (ly-get-mus-property music 'iterator-ctor)
               Chord_tremolo_iterator::constructor)
-             (shift-duration-log music (- (intlog2 (ly-get-mus-property 'repeat-count music))))
+             (shift-duration-log music  (intlog2 (ly-get-mus-property music 'repeat-count)))
              )
           (ly-set-mus-property!
            music 'length Repeated_music::unfolded_music_length)