2 #include "request-chord-iterator.hh"
3 #include "music-list.hh"
4 #include "musical-request.hh"
6 Request_chord::Request_chord (SCM s
)
7 : Simultaneous_music (s
)
9 set_mus_property ("iterator-ctor",
10 Request_chord_iterator::constructor_proc
);
13 Request_chord::Request_chord ()
15 set_mus_property ("iterator-ctor",
16 Request_chord_iterator::constructor_proc
);
20 Request_chord::to_relative_octave (Pitch last
)
22 for (SCM s
= music_list (); gh_pair_p (s
); s
= ly_cdr (s
))
24 Music
* mus
= unsmob_music (ly_car (s
));
25 Melodic_req
*m
= dynamic_cast <Melodic_req
*> (mus
);
28 kLudge: rests have pitches now as well.
30 Rest_req
*r
= dynamic_cast<Rest_req
*> (mus
);
34 Pitch
*old_pit
= unsmob_pitch (mus
->get_mus_property ("pitch"));
38 Pitch new_pit
= *old_pit
;
39 new_pit
.to_relative_octave (last
);
40 mus
->set_mus_property ("pitch", new_pit
.smobbed_copy ());
50 Request_chord::start_mom () const
52 return Music::start_mom ();
55 ADD_MUSIC (Request_chord
);