lilypond-devel
[Top][All Lists]
Advanced

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

Re: Fill in section "\set vs \override" (issue 21820045)


From: k-ohara5a5a
Subject: Re: Fill in section "\set vs \override" (issue 21820045)
Date: Thu, 07 Nov 2013 07:25:10 +0000

On 2013/11/07 00:04:43, benrg wrote:
I don't see why tempoHideNote should be a context property
and BarNumber.break-visibility a grob property, for example.

In that example, it would probably have been better design if
tempoHideNote were a property of MetronomeMark, because it applies
conceptually to only that graphical object.

Often, though, the distinction between context properties and grob
properties comes from the fact that each context creates many grobs.
\set... tells the context how to behave, while \override... tells the
context to relay an instruction to each of a particular type of grob
that it makes

\set Score.currentBarNumber = 3
% because the Score holds a single counter

\set Score.barNumberVisibility = #(every-nth-bar-number-visible 5)
% tells Score to create a BarNumber every fifth measure
% (maybe barNumberFrequency would be a better name)

\override Score.BarNumber.break-visibility = #end-of-line-invisible
% Each individual BarNumber is created with this rule and applies
% it after line-breaking to decide what to print

\override Score.BarNumber.color = #blue
% an example that obviously applies to the individual graphical objects

There is one case where the conceptual difference between context
property and grob property is clear, but the naming makes things
confusing.  http://code.google.com/p/lilypond/issues/detail?id=2812

Maybe the text need not describe the implementation of context- and
grob- properties so much, but it is in any case a good addition to the
docs.

https://codereview.appspot.com/21820045/



reply via email to

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