]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/repeated-music.cc
* lily/text-item.cc (interpret_string): new file, select font with
[lilypond.git] / lily / repeated-music.cc
index e874e42451a2279ce201d5f3dbea8dac547ac5bb..daf7611a70451d0ce3129db8daa93b94f1c19984 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "pitch.hh"
 #include "warn.hh"
 #include "music-sequence.hh"
+#include "scm-option.hh"
 
 Music *
 Repeated_music::body ()const
 {
-  return unsmob_music (get_mus_property ("element"));
+  return unsmob_music (get_property ("element"));
 }
 
 SCM
 Repeated_music::alternatives ()const
 {
-  return get_mus_property ("elements");
+  return get_property ("elements");
 }
 
 
@@ -38,9 +39,12 @@ Repeated_music::to_relative_octave (Pitch p)
 
       Pitch last = p ; 
       if (alternatives ())
-       for (SCM s = alternatives (); gh_pair_p (s);  s = ly_cdr (s))
-         unsmob_music (ly_car (s))->to_relative_octave (p);
-     
+       {
+         lily_1_8_compatibility_used = true; 
+
+         for (SCM s = alternatives (); is_pair (s);  s = ly_cdr (s))
+           unsmob_music (ly_car (s))->to_relative_octave (p);
+       }     
 
       return last;
     }
@@ -64,7 +68,7 @@ Repeated_music::alternatives_get_length (bool fold) const
   int done =0;
 
   SCM p = alternatives ();
-  while (gh_pair_p (p) && done < repeat_count ())
+  while (is_pair (p) && done < repeat_count ())
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       done ++;
@@ -86,7 +90,7 @@ Repeated_music::alternatives_volta_get_length () const
 
   Moment m;
   SCM p = alternatives ();
-  while (gh_pair_p (p))
+  while (is_pair (p))
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       p = ly_cdr (p);
@@ -112,7 +116,7 @@ Repeated_music::body_get_length () const
 int
 Repeated_music::repeat_count () const
 {
-  return gh_scm2int (get_mus_property ("repeat-count"));
+  return ly_scm2int (get_property ("repeat-count"));
 }
 
 
@@ -161,13 +165,13 @@ SCM
 Repeated_music::minimum_start (SCM m)
 {
   Music * me = unsmob_music (m);
-  Music * body = unsmob_music (me->get_mus_property ("element"));
+  Music * body = unsmob_music (me->get_property ("element"));
 
   if (body)
-    return body->start_mom ().smobbed_copy();
+    return body->start_mom ().smobbed_copy ();
   else
     {
-      return Music_sequence::minimum_start (me->get_mus_property ("elements")).smobbed_copy();
+      return Music_sequence::minimum_start (me->get_property ("elements")).smobbed_copy ();
     }
 }
 
@@ -175,10 +179,10 @@ SCM
 Repeated_music::first_start (SCM m)
 {
   Music * me = unsmob_music (m);
-  Music * body = unsmob_music (me->get_mus_property ("element"));
+  Music * body = unsmob_music (me->get_property ("element"));
 
   Moment rv =  (body) ? body->start_mom () :
-    Music_sequence::first_start (me->get_mus_property ("elements"));
+    Music_sequence::first_start (me->get_property ("elements"));
 
   return rv.smobbed_copy ();
 }