2 lyric-performer.cc -- implement Lyric_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2005 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "audio-item.hh"
10 #include "performer.hh"
12 class Lyric_performer : public Performer {
14 TRANSLATOR_DECLARATIONS (Lyric_performer);
17 virtual bool try_music (Music* req);
18 virtual void stop_translation_timestep ();
19 virtual void create_audio_elements ();
22 Link_array<Music> lreqs_;
29 Lyric_performer::Lyric_performer ()
36 Lyric_performer::create_audio_elements ()
38 // FIXME: won't work with fancy lyrics
40 && scm_is_string (lreqs_[0]->get_property ("text"))
41 && ly_scm2string (lreqs_[0]->get_property ("text")).length ())
43 audio_ = new Audio_text (Audio_text::LYRIC,
44 ly_scm2string (lreqs_[0]->get_property ("text")));
45 Audio_element_info info (audio_, lreqs_[0]);
46 announce_element (info);
52 Lyric_performer::stop_translation_timestep ()
56 play_element (audio_);
63 Lyric_performer::try_music (Music* req)
65 if (req->is_mus_type ("lyric-event"))
73 ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event", "", "", "");