2002-09-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * 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 <jeremie@lumbroso.fr>
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
@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
\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 "|."
}
>
\translator{ \ScoreContext
\remove "Timing_engraver" }
\translator{ \StaffContext
- \consists "Timing_engraver"}
+ \consists "Timing_engraver"
+ \alias Timing
+}
}
}
{
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.
$$ = 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 ();
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"));
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 ());
$$ = 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"));
}
;
\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"
-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 = {