X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscore-performer.cc;h=aee7deaf24bfba1a6cfb6adabf4869baf103c7ff;hb=3b963e7de14816666287b7a2bcfd35eccef977c4;hp=3479a17b469f07496593d2c66161d48d1c4477b1;hpb=a4d7106c75b325441063fd9ba9c4131979784aa5;p=lilypond.git diff --git a/lily/score-performer.cc b/lily/score-performer.cc index 3479a17b46..aee7deaf24 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996--2000 Jan Nieuwenhuizen + (c) 1996--2002 Jan Nieuwenhuizen */ #include "score-performer.hh" @@ -14,13 +14,16 @@ #include "midi-stream.hh" #include "string-convert.hh" #include "debug.hh" -#include "score.hh" -#include "source-file.hh" -#include "source.hh" -#include "audio-staff.hh" +#include "translator-def.hh" -ADD_THIS_TRANSLATOR (Score_performer); + +ENTER_DESCRIPTION(Score_performer, +/* descr */ "", +/* creats*/ "", +/* acks */ "", +/* reads */ "", +/* write */ ""); Score_performer::Score_performer () @@ -36,7 +39,7 @@ Score_performer::~Score_performer () void Score_performer::play_element (Audio_element * p) { - if (Audio_item * i=dynamic_cast (p)) + if (Audio_item * i=dynamic_cast (p)) { audio_column_l_->add_audio_item (i); } @@ -64,36 +67,37 @@ Score_performer::prepare (Moment m) Global_translator::prepare (m); audio_column_l_ = new Audio_column (m); play_element (audio_column_l_); - post_move_processing (); + start_translation_timestep (); } void -Score_performer::process() +Score_performer::one_time_step () { - //process_music(); + // fixme: put this back. + // process_music (); announces (); - pre_move_processing(); - check_removal(); + stop_translation_timestep (); + check_removal (); } void -Score_performer::start() +Score_performer::start () { } int -Score_performer::get_tempo_i() const +Score_performer::get_tempo_i () const { - return performance_p_->midi_l_->get_tempo_i (Moment (1, 4)); + return performance_p_->midi_l_->get_tempo_i (Moment (Rational (1, 4))); } void -Score_performer::finish() +Score_performer::finish () { check_removal (); - removal_processing(); + removal_processing (); } Music_output * @@ -105,10 +109,12 @@ Score_performer::get_output_p () } void -Score_performer::do_add_processing () +Score_performer::initialize () { - Translator_group::do_add_processing (); + unsmob_translator_def (definition_)->apply_property_operations (this); assert (dynamic_cast (output_def_l_)); performance_p_ = new Performance; - performance_p_->midi_l_ = dynamic_cast(output_def_l_); + performance_p_->midi_l_ = dynamic_cast (output_def_l_); + + Translator_group::initialize (); }