lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move Tweak_engraver to Score level (issue 8340044)


From: dak
Subject: Re: Move Tweak_engraver to Score level (issue 8340044)
Date: Thu, 04 Apr 2013 10:30:39 +0000

Reviewers: janek,

Message:
Regarding the description: "Acknowledgers should usually just register a
grob (or write grob data) with any actual reading of grob data occurring
at the end of the timestep instead."

Strictly speaking, this principle has been violated already by allowing
subproperty tweaks, as tweaking a subproperty requires reading the main
property first.

Moving the Tweak_engraver to Score level actually makes it more likely
that other acknowledgers potentially writing a main property will have
acted before a subproperty tweak is attempted.

In this respect, this patch should decrease the likelihood of surprises
(though not ruling them out altogether).

Description:
Move Tweak_engraver to Score level

This makes it possible to tweak items announced at Score level, like
MetronomeMark and RehearsalMark.

The advantage is that tweaks will be applied once regardless of the
context structure (the Score context should exist only once).

Due to the hierarchical nature of acknowledgers, acknowledgers in
lower contexts will now get to see the grobs before tweaks have been
applied.  However, grobs are still unfinished (except for type,
properties initialized via context properties and cause) at the time
they are announced, with other details only getting filled in by the
engraver after announcement, so the potential for trouble seems low.
Acknowledgers should usually just register a grob (or write grob data)
with any actual reading of grob data occurring at the end of the
timestep instead.

Please review this at https://codereview.appspot.com/8340044/

Affected files:
  M ly/engraver-init.ly


Index: ly/engraver-init.ly
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index 58ee39a12304b4acf61aa4bbad4c76b683235829..c2b16715fa300214e0f9e75f21ae38adc1889710 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -231,7 +231,6 @@ multiple voices on the same staff."
   \consists "Note_heads_engraver"
   \consists "Dots_engraver"
   \consists "Rest_engraver"
-  \consists "Tweak_engraver"

   %% switch on to make stem directions interpolate for the
   %% center line.
@@ -404,7 +403,6 @@ a collection of staves, with a bracket in front and spanning bar lines."
   \consists "Text_spanner_engraver"
   \consists "Font_size_engraver"
   \consists "Axis_group_engraver"
-  \consists "Tweak_engraver"

   pedalSustainStrings = #'("Ped." "*Ped." "*")
   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
@@ -437,7 +435,6 @@ printing of a single line of lyrics."
   \consists "Lyric_engraver"
   \consists "Extender_engraver"
   \consists "Hyphen_engraver"
-  \consists "Tweak_engraver"
   \consists "Stanza_number_engraver"
   \consists "Instrument_name_engraver"
   \consists "Font_size_engraver"
@@ -545,6 +542,7 @@ automatically when an output definition (a @code{\\score} or
   \consists "Timing_translator"
   \consists "Default_bar_line_engraver"
   \consists "Output_property_engraver"
+  \consists "Tweak_engraver"
   \consists "System_start_delimiter_engraver"
   \consists "Mark_engraver"
   \consists "Volta_engraver"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]