2 key-performer.cc -- implement Key_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
9 #include "key-performer.hh"
10 #include "command-request.hh"
11 #include "midi-item.hh"
14 IMPLEMENT_STATIC_NAME(Key_performer);
15 IMPLEMENT_IS_TYPE_B1(Key_performer,Performer);
16 ADD_THIS_PERFORMER(Key_performer);
18 Key_performer::Key_performer()
23 Key_performer::~Key_performer()
28 Key_performer::do_print() const
37 Key_performer::process_requests()
40 int sharps_i = key_req_l_->sharps_i();
41 int flats_i = key_req_l_->flats_i();
42 // midi cannot handle non-conventional keys
43 if ( !( flats_i && sharps_i ) ) {
44 Midi_key k( sharps_i - flats_i, key_req_l_->minor_b() );
52 Key_performer::try_request( Request* req_l )
57 if ( req_l->command() )
58 key_req_l_ = req_l->command()->keychange();