From: fred Date: Sun, 24 Mar 2002 19:33:32 +0000 (+0000) Subject: lilypond-0.0.35 X-Git-Tag: release/1.5.59~5287 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=671a3f2e0284c1caa73d32eef30207bfb763e39d;p=lilypond.git lilypond-0.0.35 --- diff --git a/input/wohltemperirt.ly b/input/wohltemperirt.ly index b5ea0f6654..7d615a4d1b 100644 --- a/input/wohltemperirt.ly +++ b/input/wohltemperirt.ly @@ -47,7 +47,7 @@ bassdux = music { $ [G c16 B] [c8 d] [F16 G] As4 [G16 F] | $} -trebstaf = staff { melodic +trebstaf = staff { melodic % every "music {} " in a staff has its own "voicegroup" music { dux } music { comes } @@ -59,8 +59,8 @@ basstaf = staff { melodic } score { - staff { basstaf } staff { trebstaf } + staff { basstaf } commands { meter {4*4} diff --git a/src/localkeyreg.cc b/src/localkeyreg.cc index 5669109786..3817a36ba2 100644 --- a/src/localkeyreg.cc +++ b/src/localkeyreg.cc @@ -4,14 +4,18 @@ (c) 1997 Han-Wen Nienhuys */ #include "musicalrequest.hh" +#include "commandrequest.hh" #include "localkeyreg.hh" #include "localkeyitem.hh" #include "complexwalker.hh" +#include "keyreg.hh" +#include "debug.hh" Local_key_register::Local_key_register(Complex_walker*w) : Request_register(w) { - key_item_p_ = 0; + key_item_p_ = 0; + key_c_l_ = 0; } void @@ -43,5 +47,21 @@ Local_key_register::acknowledge_element(Staff_elem_info info) local_key_.oct(melodic_l_->octave_i_) .set(melodic_l_->notename_i_, melodic_l_->accidental_i_); } + } else if (info.req_l_->command() && + info.req_l_->command()->keychange()) { + Key_register * key_reg_l = (Key_register*)info.origin_reg_l_; + key_c_l_ = &key_reg_l->key_; + local_key_.reset(*key_c_l_); + } +} + +void +Local_key_register::process_request() +{ + if (!walk_l_->time_.whole_in_measure_) { + if (key_c_l_) + local_key_.reset(*key_c_l_); + else if( walk_l_->when() >0) + warning ("Help me! can't figure current key", 0); } }