]> git.donarmstrong.com Git - lilypond.git/blob - lily/relative-octave-music.cc
*** empty log message ***
[lilypond.git] / lily / relative-octave-music.cc
1 /*   
2   relative-music.cc --  implement Relative_octave_music
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "relative-music.hh"
11 #include "warn.hh"
12 #include "scm-option.hh"
13
14 Pitch
15 Relative_octave_music::to_relative_octave (Pitch p)
16 {
17   if (lily_1_8_relative)
18     {
19       lily_1_8_compatibility_used = true;
20       /*  last-pitch should be junked some time, when
21           we ditch 1.8 compat too.
22
23          When you do, B should start where A left off.
24
25         \relative { A \relative { ...} B }  */
26       Pitch *ptr = unsmob_pitch (get_property ("last-pitch"));
27       return (ptr) ?  *ptr : p;
28     }
29   else
30     return p;
31 }
32
33
34 Relative_octave_music::Relative_octave_music (SCM x)
35   : Music_wrapper (x)
36 {
37   
38 }
39
40 ADD_MUSIC (Relative_octave_music);
41
42