lilypond-1.5.9
[lilypond.git] / lily / part-combine-music.cc
blob316d4a117b9fa78679d3d58b31c9444add6a4959
1 /*
2 part-combine-music.cc -- implement Part_combine_music
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2001 Jan Nieuwenhuizen <janneke@gnu.org>
8 */
10 #include "part-combine-music.hh"
11 #include "part-combine-music-iterator.hh"
12 #include "pitch.hh"
14 Part_combine_music::Part_combine_music (SCM l)
15 : Music (l)
17 set_mus_property ("iterator-ctor",
18 Part_combine_music_iterator::constructor_cxx_function);
21 void
22 Part_combine_music::transpose (Pitch p)
24 first_l ()->transpose (p);
25 second_l () ->transpose (p);
30 Moment
31 Part_combine_music::length_mom () const
33 return first_l ()->length_mom ();
36 Pitch
37 Part_combine_music::to_relative_octave (Pitch p)
39 p = first_l ()->to_relative_octave (p);
40 return second_l ()->to_relative_octave (p);
43 void
44 Part_combine_music::compress (Moment m)
46 first_l ()->compress (m);
47 second_l ()->compress (m);
50 Music*
51 Part_combine_music::first_l () const
53 return unsmob_music (get_mus_property ("one"));
56 Music*
57 Part_combine_music::second_l () const
59 return unsmob_music (get_mus_property ("two"));
63 Part_combine_music::Part_combine_music ()
64 : Music (SCM_EOL)
68 ADD_MUSIC (Part_combine_music);