From: Han-Wen Nienhuys Date: Fri, 6 Sep 2002 21:13:31 +0000 (+0000) Subject: * input/test/poly-metric.ly: update to use Timing. X-Git-Tag: release/1.6.3~42 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1ecc53c8a315e5a4df6a74b3b5b3f9f44569fff6;p=lilypond.git * input/test/poly-metric.ly: update to use Timing. * lily/bar-number-engraver.cc (process_music): only run barNumberVisibility if currentBarNumber is a number. * lily/parser.yy (chord_inversion): use CHORD_SLASH for '/' (command_element): use Timing as alias for Score. --- diff --git a/ChangeLog b/ChangeLog index 91da130e10..8c7647c44c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2002-09-06 Han-Wen Nienhuys + * input/test/poly-metric.ly: update to use Timing. + + * lily/bar-number-engraver.cc (process_music): only run + barNumberVisibility if currentBarNumber is a number. + * lily/parser.yy (chord_inversion): use CHORD_SLASH for '/' + (command_element): use Timing as alias for Score. 2002-09-06 Jérémie Lumbroso diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 05d42eba2e..8ddd5a837d 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -929,7 +929,8 @@ many more options for its layout. They are selected through the examples. This command sets the property @code{timeSignatureFraction}, -@code{beatLength} and @code{measureLength}. The property +@code{beatLength} and @code{measureLength} in the @code{Timing} +context, which is normally aliased to @internalsref{Score}. The property @code{timeSignatureFraction} determine where bar lines should be inserted, and how automatic beams should be generated. Changing the value of @code{timeSignatureFraction} also causes a time signature @@ -957,7 +958,7 @@ The syntax for this command is @end example This is internally translated into @example - \property Score.measurePosition = -@var{length of duration} + \property Timing.measurePosition = -@var{length of duration} @end example @cindex @code{|} The property @code{measurePosition} contains a rational number diff --git a/input/test/poly-metric.ly b/input/test/poly-metric.ly index 13ea702ef3..7a5b136565 100644 --- a/input/test/poly-metric.ly +++ b/input/test/poly-metric.ly @@ -8,19 +8,15 @@ \notes < \context Staff = SA - { % \time hardcodes \property Score.XXX = YYY - \property Staff.timeSignatureFraction = #'(4 . 4) - \property Staff.measureLength = #(make-moment 1 1) - \property Staff.beatLength = #(make-moment 1 4) + { + \time 4/4 c1 c1 c1 - \property Staff.whichBar = #"|." + \bar "|." } - \context Staff= SB { - \property Staff.timeSignatureFraction = #'(3 . 4) - \property Staff.measureLength = #(make-moment 3 4) - \property Staff.beatLength = #(make-moment 1 4) + \context Staff= SB { + \time 3/4 c2. c2. c2. c2. - \property Staff.whichBar = #"|." + \bar "|." } > @@ -29,6 +25,8 @@ \translator{ \ScoreContext \remove "Timing_engraver" } \translator{ \StaffContext - \consists "Timing_engraver"} + \consists "Timing_engraver" + \alias Timing +} } } diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 4c6a3503a9..10eb2f4551 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -54,7 +54,7 @@ Bar_number_engraver::process_music () { SCM bn = get_property ("currentBarNumber"); SCM proc = get_property ("barNumberVisibility"); - if (to_boolean(gh_call1(proc, bn))) + if (gh_number_p (bn) && to_boolean(gh_call1(proc, bn))) { create_items (); // guh. diff --git a/lily/parser.yy b/lily/parser.yy index 66b2e63568..3e92db7735 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1224,7 +1224,7 @@ command_element: $$ = csm; $$->set_spot (THIS->here_input ()); - csm->set_mus_property ("context-type", scm_makfrom0str ("Score")); + csm->set_mus_property ("context-type", scm_makfrom0str ("Timing")); } | PARTIAL duration_length { Moment m = - unsmob_duration ($2)->length_mom (); @@ -1235,7 +1235,7 @@ command_element: scm_gc_unprotect_object (p->self_scm ()); $$ =sp ; - sp-> set_mus_property ("context-type", scm_makfrom0str ( "Score")); + sp-> set_mus_property ("context-type", scm_makfrom0str ("Timing")); } | CLEF STRING { SCM func = scm_primitive_eval (ly_symbol2scm ("clef-name-to-properties")); @@ -1279,8 +1279,6 @@ command_element: Context_specced_music * sp = new Context_specced_music (SCM_EOL); sp->set_mus_property ("element", seq->self_scm ()); - - scm_gc_unprotect_object (p3->self_scm ()); scm_gc_unprotect_object (p2->self_scm ()); scm_gc_unprotect_object (p1->self_scm ()); @@ -1288,11 +1286,7 @@ command_element: $$ = sp; -/* - TODO: should make alias TimingContext for Score -*/ - - sp-> set_mus_property ("context-type", scm_makfrom0str ( "Score")); + sp-> set_mus_property ("context-type", scm_makfrom0str ( "Timing")); } ; diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 5293c26628..78a2fcb664 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -347,7 +347,13 @@ ScoreContext = \translator { \consists "Repeat_acknowledge_engraver" \consists "Staff_collecting_engraver" + + % move the alias along with the engraver. + + %% TODO? add this alias from Timing_engraver::initialize() ? \consists "Timing_engraver" + \alias Timing + \consists "Output_property_engraver" \consists "System_start_delimiter_engraver" \consists "Mark_engraver" diff --git a/ly/property-init.ly b/ly/property-init.ly index 0afb1888fb..003d54f2de 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -66,10 +66,10 @@ tupletBoth = { -cadenzaOn = \property Score.timing = ##f +cadenzaOn = \property Timing.timing = ##f cadenzaOff = { - \property Score.timing = ##t - \property Score.measurePosition = #(make-moment 0 1) + \property Timing.timing = ##t + \property Timing.measurePosition = #(make-moment 0 1) } newpage = {