X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftiming-engraver.cc;h=2bf0e5f6527184024817b542340b1d7e03aa22d2;hb=84fc9f99e4082062b9fdfc5b19f936769ee4863d;hp=5456a6820a9d9aa4785a25c9bbc199f5fcc8c2fe;hpb=7ea5c74058200ace4b405de82e1088560aeaacb2;p=lilypond.git diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 5456a6820a..2bf0e5f652 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -3,10 +3,9 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2003 Han-Wen Nienhuys + (c) 1997--2004 Han-Wen Nienhuys */ -#include "translator-group.hh" - +#include "context.hh" #include "grob-info.hh" #include "multi-measure-rest.hh" #include "timing-translator.hh" @@ -42,7 +41,7 @@ Timing_engraver::start_translation_timestep () { Timing_translator::start_translation_timestep (); - SCM nonauto = get_property ("barNonAuto"); + SCM automatic_bars = get_property ("automaticBars"); Moment now = now_mom (); SCM which = get_property ("whichBar"); @@ -60,10 +59,10 @@ Timing_engraver::start_translation_timestep () { Moment mlen = Moment (measure_length ()); unsmob_grob (get_property ("currentCommandColumn")) - ->set_grob_property ("measure-length", mlen.smobbed_copy ()); + ->set_property ("measure-length", mlen.smobbed_copy ()); } - if (!gh_string_p (which) && !to_boolean (nonauto)) + if (!gh_string_p (which) && to_boolean (automatic_bars)) { SCM always = get_property ("barAlways"); @@ -74,16 +73,15 @@ Timing_engraver::start_translation_timestep () } } - daddy_trans_->set_property ("whichBar", which); + daddy_context_->set_property ("whichBar", which); } void Timing_engraver::stop_translation_timestep () { Timing_translator::stop_translation_timestep (); - daddy_trans_->set_property ("whichBar", SCM_EOL); + daddy_context_->set_property ("whichBar", SCM_EOL); last_moment_ = now_mom (); - } @@ -91,9 +89,12 @@ ENTER_DESCRIPTION (Timing_engraver, /* descr */ " Responsible for synchronizing timing information from staves. " "Normally in @code{Score}. In order to create polyrhythmic music, " "this engraver should be removed from @code{Score} and placed in " -"@code{Staff}.", +"@code{Staff}. " +"\n\nThis engraver adds the alias @code{Timing} to its containing context." + + , /* creats*/ "", /* accepts */ "", /* acks */ "", -/* reads */ "timeSignatureFraction barNonAuto whichBar barAlways defaultBarType skipBars timing oneBeat measureLength measurePosition currentBarNumber", +/* reads */ "timeSignatureFraction automaticBars whichBar barAlways defaultBarType skipBars timing measureLength measurePosition currentBarNumber", /* write */ "");