]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/repeated-music.cc
2003 -> 2004
[lilypond.git] / lily / repeated-music.cc
index 28b2c0aca6ef56ec39510c83d2dfa25a27cc20db..85a1c280bc0cfdf36531569ba779ac6ac5f07310 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -12,6 +12,7 @@
 #include "pitch.hh"
 #include "warn.hh"
 #include "music-sequence.hh"
+#include "scm-option.hh"
 
 Music *
 Repeated_music::body ()const
@@ -31,35 +32,28 @@ Repeated_music::alternatives ()const
 Pitch
 Repeated_music::to_relative_octave (Pitch p)
 {
-  if (body ())
-    p = body ()->to_relative_octave (p);
+  if (lily_1_8_relative)
+    {
+      if (body ())
+       p = body ()->to_relative_octave (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);
-     
+      Pitch last = p ; 
+      if (alternatives ())
+       {
+         lily_1_8_compatibility_used = true; 
 
-  return last;
-}
+         for (SCM s = alternatives (); gh_pair_p (s);  s = ly_cdr (s))
+           unsmob_music (ly_car (s))->to_relative_octave (p);
+       }     
 
-void
-Repeated_music::transpose (Pitch p)
-{
-  if (body ())
-    body ()->transpose (p);
-
-  Music_sequence::transpose_list (get_mus_property ("elements"), p);
+      return last;
+    }
+  else
+    {
+      return Music::to_relative_octave (p);
+    }
 }
 
-void
-Repeated_music::compress (Moment p)
-{
-  if (body ())
-    body ()->compress (p);
-
-  Music_sequence::compress_list (alternatives (), p);
-}
 
 Moment
 Repeated_music::alternatives_get_length (bool fold) const