lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond structure / implicit - explicit / with statement


From: David Kastrup
Subject: Re: Lilypond structure / implicit - explicit / with statement
Date: Mon, 04 Apr 2016 22:22:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Noeck <address@hidden> writes:

> Alternatively, you can put this into a layout block:
>
> \layout {
>   \context {
>     \Staff
>     clefPosition = 2
>   }
> }
> %or
> \layout {
>   \set Staff.clefPosition = 2
> }

This is not the same.  The first affects only the "Staff" context
definition.  The second also affects _all_ contexts aliased to "Staff",
namely "TabStaff" and "DrumStaff" and "RhythmicStaff" and "FretBoards"
and "ChordNames" and "Devnull" and "NullVoice" (!) and "VaticanaStaff"
and "GregorianTranscriptionStaff" and "MensuralStaff" and
"PetrucciStaff" and "KievanStaff".

For most of those, you would _not_ want to change their default
clefPosition.

Putting \set/\override straight into a \layout definition has more
thorough effects than in a particular context definition.  Sometimes,
that's what you want.

Often, it's not.

> in with block:
> \with { prop = val }            | \with { \override Ctx.obj.prop = val }
>
> in layout block (variant 1):
> \layout { \context { \Ctx       | \layout { \context { \Ctx
>   prop = val }                  |   \override obj.prop = val }
>
> in layout block (variant 2):
> \layout { \set Ctx.prop = val } | \layout{\override Ctx.obj.prop = val }

That's not a variant but something quite more encompassing.  Note that
"Ctx." can be left off in which case "Bottom." is implied as usual.
Since "Bottom." is only ever an alias, addressing only the named context
would confuse people if they use something like "\omit Accidental" in
the expectation that it would omit accidentals.

-- 
David Kastrup



reply via email to

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