2 score-performer.cc -- implement Score_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1996, 1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "score-performer.hh"
10 #include "midi-def.hh"
11 #include "audio-column.hh"
12 #include "audio-item.hh"
13 #include "performance.hh"
14 #include "midi-stream.hh"
15 #include "string-convert.hh"
18 #include "source-file.hh"
20 #include "audio-staff.hh"
23 ADD_THIS_TRANSLATOR(Score_performer);
26 Score_performer::Score_performer()
32 Score_performer::~Score_performer()
37 Score_performer::play (Audio_element * p)
39 if (Audio_item * i=dynamic_cast<Audio_item *> (p))
41 audio_column_l_->add_audio_item (i);
43 performance_p_->add_element (p);
47 Score_performer::prepare (Moment m)
49 Global_translator::prepare (m);
50 audio_column_l_ = new Audio_column (m);
51 play (audio_column_l_);
52 post_move_processing ();
57 Score_performer::process()
61 pre_move_processing();
66 Score_performer::start()
72 Score_performer::get_tempo_i() const
74 return performance_p_->midi_l_->get_tempo_i (Moment (1, 4));
78 Score_performer::finish()
85 Score_performer::get_output_p ()
87 Music_output * o = performance_p_;
93 Score_performer::do_add_processing ()
95 Translator_group::do_add_processing ();
96 assert (dynamic_cast<Midi_def *> (output_def_l_));
97 performance_p_ = new Performance;
98 performance_p_->midi_l_ = dynamic_cast<Midi_def*>(output_def_l_);