2 time-signature-performer.cc -- implement Time_signature_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "time-signature-performer.hh"
10 #include "command-request.hh"
11 #include "audio-item.hh"
13 ADD_THIS_TRANSLATOR (Time_signature_performer);
15 Time_signature_performer::Time_signature_performer ()
17 time_signature_req_l_ = 0;
21 Time_signature_performer::~Time_signature_performer ()
27 Time_signature_performer::do_process_music ()
29 if (time_signature_req_l_)
31 int b = gh_scm2int (time_signature_req_l_->get_mus_property ("beats"));
32 int o = gh_scm2int (time_signature_req_l_->get_mus_property ("one-beat"));
34 audio_p_ = new Audio_time_signature (b,o);
35 Audio_element_info info (audio_p_, time_signature_req_l_);
36 announce_element (info);
37 time_signature_req_l_ = 0;
42 Time_signature_performer::do_pre_move_processing ()
46 play_element (audio_p_);
52 Time_signature_performer::do_try_music (Music* req_l)
54 if (time_signature_req_l_)
57 if (Time_signature_change_req *t =
58 dynamic_cast <Time_signature_change_req *> (req_l))
60 time_signature_req_l_ = t;