]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/relative-octave-music.cc
* lily/main.cc (main_with_guile): call lilypond-main
[lilypond.git] / lily / relative-octave-music.cc
index 5f8081afa0c177e1b908c1e1c1bcae14cdf8a7a9..ad9f617e2969491320002c955a855ab305499f24 100644 (file)
@@ -3,25 +3,40 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
-
 #include "relative-music.hh"
-#include "debug.hh"
+#include "warn.hh"
+#include "scm-option.hh"
+
 
-Musical_pitch
-Relative_octave_music::to_relative_octave (Musical_pitch)
+Pitch
+Relative_octave_music::to_relative_octave (Pitch p)
 {
-  return last_pitch_;
+  if (lily_1_8_relative)
+    {
+      lily_1_8_compatibility_used = true;
+      /*
+       ugh: last-pitch should  be junked.
+
+       Change this for lilypond 2.0. When you do,
+       then B should start where A left off.
+
+       \relative { A \relative { ...} B }
+
+      */
+      return * unsmob_pitch (get_property ("last-pitch"));
+    }
+  else
+    return p;
 }
 
 
-Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def)
-  : Music_wrapper (p)
+Relative_octave_music::Relative_octave_music ()
 {
-  last_pitch_ = element ()->to_relative_octave (def);
 }
 
+ADD_MUSIC (Relative_octave_music);