]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper.cc
release: 1.5.29
[lilypond.git] / lily / music-wrapper.cc
1 /*   
2   music-wrapper.cc --  implement Music_wrapper
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10
11 #include "music-wrapper.hh"
12
13
14
15
16 void
17 Music_wrapper::transpose (Pitch p)
18 {
19   if (element ())
20     element ()-> transpose (p);
21 }
22
23
24 Music_wrapper::Music_wrapper (SCM l)
25   : Music (l)
26 {
27 }
28
29 Moment
30 Music_wrapper::length_mom () const
31 {
32   return element ()->length_mom ();
33 }
34
35 Pitch
36 Music_wrapper::to_relative_octave (Pitch p)
37 {
38   return element ()->to_relative_octave (p);
39 }
40
41
42 Music*
43 Music_wrapper::element () const
44 {
45   return unsmob_music (get_mus_property ("element"));
46 }
47
48 void
49 Music_wrapper::compress (Moment m)
50 {
51   element ()->compress (m);
52 }
53
54 ADD_MUSIC (Music_wrapper);
55
56 Music_wrapper::Music_wrapper ()
57   : Music (SCM_EOL)
58 {
59   
60 }
61
62 Moment
63 Music_wrapper::start_mom () const
64 {
65   return element ()->start_mom ();
66 }