2 lyric-performer.cc -- implement Lyric_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "musical-request.hh"
10 #include "audio-item.hh"
11 #include "lily-proto.hh"
12 #include "performer.hh"
15 class Lyric_performer : public Performer {
17 TRANSLATOR_DECLARATIONS(Lyric_performer);
20 virtual bool try_music (Music* req_l);
21 virtual void stop_translation_timestep ();
22 virtual void create_audio_elements ();
25 Link_array<Lyric_req> lreq_arr_;
32 Lyric_performer::Lyric_performer ()
39 Lyric_performer::create_audio_elements ()
41 // FIXME: won't work with fancy lyrics
43 && gh_string_p (lreq_arr_[0]->get_mus_property ("text"))
44 && ly_scm2string (lreq_arr_[0]->get_mus_property ("text")).length_i ())
46 audio_p_ = new Audio_text (Audio_text::LYRIC,
47 ly_scm2string (lreq_arr_[0]->get_mus_property ("text")));
48 Audio_element_info info (audio_p_, lreq_arr_[0]);
49 announce_element (info);
55 Lyric_performer::stop_translation_timestep ()
59 play_element (audio_p_);
66 Lyric_performer::try_music (Music* req_l)
68 if (Lyric_req *lr = dynamic_cast <Lyric_req *> (req_l))
76 ENTER_DESCRIPTION(Lyric_performer,"","","","","");