source file of the GNU LilyPond music typesetter
- (c) 1998--1999 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_octave_music::Relative_octave_music(Music*p,Musical_pitch def)
- : Music_wrapper (p)
-{
- last_pitch_ = element_l ()->to_relative_octave (def);
+ \relative { A \relative { ...} B }
+
+ */
+ return * unsmob_pitch (get_mus_property ("last-pitch"));
+ }
+ else
+ return p;
}
-void
-Relative_octave_music::do_print () const
+
+Relative_octave_music::Relative_octave_music ()
{
- Music_wrapper::do_print ();
- DEBUG_OUT << "default pitch: " << last_pitch_.str ();
}
+ADD_MUSIC (Relative_octave_music);
+