]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/relative-octave-music.cc
* scm/define-grob-properties.scm: remove 'type
[lilypond.git] / lily / relative-octave-music.cc
index db24b85fc0d12ca57025970b346d675d8c40db20..ad2350fa39bdf337e71e58a3587d51762367dc40 100644 (file)
@@ -3,31 +3,32 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "relative-music.hh"
-#include "debug.hh"
+#include "warn.hh"
 
-Musical_pitch
-Relative_octave_music::to_relative_octave (Musical_pitch)
+Pitch
+Relative_octave_music::to_relative_octave (Pitch)
 {
-  return last_pitch_;
-}
+       /*
+               ugh: last-pitch should  be junked.
 
+               Change this for lilypond 2.0. When you do,
+               then B should start where A left off.
 
-Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def)
-  : Music_wrapper (p)
-{
-  last_pitch_ = element_p_->to_relative_octave (def);
+               \relative { A \relative { ...} B }
+
+               */
+
+  return * unsmob_pitch (get_mus_property ("last-pitch"));
 }
 
-void
-Relative_octave_music::do_print () const
+
+Relative_octave_music::Relative_octave_music ()
 {
-  Music_wrapper::do_print ();
-  DOUT << "default pitch: " << last_pitch_.str ();
 }
 
-IMPLEMENT_IS_TYPE_B1 (Relative_octave_music, Music_wrapper);
+ADD_MUSIC (Relative_octave_music);