X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fscore-performer.hh;h=5830953aff5a0b22d8a5960688c107014c5bc842;hb=60f6cf0a5769ef2c9dc48aefa0abfa1e243445e7;hp=b4030800b49443dc7e1a7ee221be4c35733e6c59;hpb=bdabe71a2bdda41b64c0000da6023771701f4def;p=lilypond.git diff --git a/lily/include/score-performer.hh b/lily/include/score-performer.hh index b4030800b4..5830953aff 100644 --- a/lily/include/score-performer.hh +++ b/lily/include/score-performer.hh @@ -1,48 +1,60 @@ /* - score-performer.hh -- declare Score_performer + This file is part of LilyPond, the GNU music typesetter. - (c) 1996, 1997 Han-Wen Nienhuys - Jan Nieuwenhuizen - */ + Copyright (C) 1996--2015 Han-Wen Nienhuys + Jan Nieuwenhuizen + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ #ifndef SCORE_PERFORMER_HH #define SCORE_PERFORMER_HH -#include "performer-group-performer.hh" -#include "global-translator.hh" +#include "moment.hh" +#include "performer-group.hh" -class Score_performer: - public Performer_group_performer, public Global_translator +/** + Top level performer. Completely takes care of MIDI output +*/ +class Score_performer : public Performer_group { public: - DECLARE_MY_RUNTIME_TYPEINFO; - Score_performer(); - ~Score_performer(); + DECLARE_CLASSNAME (Score_performer); + Performance *performance_; -protected: - virtual Translator* ancestor_l( int l ); - virtual int depth_i() const; - - virtual void finish(); - virtual Moment get_mom() const; - virtual void prepare( Moment mom ); - virtual void process(); - virtual void set_score( Score* score_l ); - virtual void start(); - virtual int get_tempo_i() const; - virtual void play(Audio_item*); - virtual void play(Midi_item*); + ~Score_performer (); + Score_performer (); +protected: + void finish (SCM); + void prepare (SCM); + void one_time_step (SCM); + + /* Engraver_group_engraver interface */ + virtual void connect_to_context (Context *); + virtual void disconnect_from_context (); + virtual void initialize (); + virtual void announce_element (Audio_element_info); + virtual void derived_mark () const; + virtual void acknowledge_audio_elements (); private: - void header(Midi_stream&); - - Midi_def* midi_l_; - - Moment prev_mom_; - Moment now_mom_; - Audio_column* audio_column_l_; + void header (Midi_stream &); - Link_array midi_item_l_arr_; + Audio_column *audio_column_; + bool skipping_; + Moment skip_start_mom_; + Moment offset_mom_; }; #endif // SCORE_PERFORMER_HH