X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frelative-octave-music.cc;h=3a52d5d475c5b562b7d5f571d8c8894c31227f09;hb=7e72a1e50e94a7f9738d62599de79fe7745f600c;hp=7f66ab6a6b8b8a51d5ecf8d91da5c19cf8ad0643;hpb=8aad615ea7bb31f49a0c2afc21eea5ff5de20437;p=lilypond.git diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index 7f66ab6a6b..3a52d5d475 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -3,31 +3,40 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2004 Han-Wen Nienhuys */ - #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 (); - DOUT << "default pitch: " << last_pitch_.str (); } +ADD_MUSIC (Relative_octave_music); +