2 score-performer.cc -- implement Score_performer
4 (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
5 Jan Nieuwenhuizen <jan@digicash.com>
8 #include "score-performer.hh"
9 #include "input-translator.hh"
10 #include "midi-item.hh"
11 #include "midi-stream.hh"
12 #include "string-convert.hh"
15 IMPLEMENT_IS_TYPE_B1(Score_performer,Performer_group_performer);
16 IMPLEMENT_STATIC_NAME(Score_performer);
17 ADD_THIS_PERFORMER(Score_performer);
19 Score_performer::Score_performer()
21 // not so much ugh, as [todo]
22 *mlog << "MIDI output to " << "lelie.midi" << " ...\n";
23 midi_stream_p_ = new Midi_stream( "lelie.midi",
24 // don-t forget: extra track 0 for tempo/copyright stuff...
25 //score_l_->staffs_.size() + 1,
30 Score_performer::~Score_performer()
32 delete midi_stream_p_;
36 Score_performer::ancestor_l( int l )
38 return Global_translator::ancestor_l( l );
42 Score_performer::depth_i() const
44 return Global_translator::depth_i();
48 Score_performer::play_event( Midi_item* l )
50 // file_p_->output( l );
51 // cerr << String_convert::bin2hex_str( l->str() );
52 // this should be done at staff level,
53 // cached per staff probably.
54 // but it generates output...
55 *midi_stream_p_ << *l;
59 Score_performer::prepare( Moment m )
65 Score_performer::process()