lilypond-1.3.154
[lilypond.git] / lily / lyric-combine-music.cc
blobde706373bdeae3ab35c30d8961e814e90842ec3c
1 /*
2 lyric-combine-music.cc -- implement Lyric_combine_music
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include "lyric-combine-music.hh"
11 #include "lyric-combine-music-iterator.hh"
12 #include "pitch.hh"
14 Lyric_combine_music::Lyric_combine_music (SCM l)
15 : Music (l)
17 set_mus_property ("iterator-ctor",
18 Lyric_combine_music_iterator::constructor_cxx_function);
22 void
23 Lyric_combine_music::transpose (Pitch p)
25 music_l ()->transpose (p);
26 lyrics_l () ->transpose (p);
30 Moment
31 Lyric_combine_music::length_mom () const
33 return music_l ()->length_mom ();
36 Pitch
37 Lyric_combine_music::to_relative_octave (Pitch p)
39 p = music_l ()->to_relative_octave (p);
40 return lyrics_l () ->to_relative_octave (p);
43 void
44 Lyric_combine_music::compress (Moment m)
46 music_l ()->compress (m);
49 Music*
50 Lyric_combine_music::music_l () const
52 return unsmob_music (get_mus_property ("music"));
55 Music*
56 Lyric_combine_music::lyrics_l () const
58 return unsmob_music (get_mus_property ("lyrics"));
61 Lyric_combine_music::Lyric_combine_music ()
62 : Music (SCM_EOL)
66 ADD_MUSIC (Lyric_combine_music);