![]() |
GNU LilyPond-- -- |
||||||||||
|
Tuning groups of objectsA object definition is a Scheme association list, that is stored in a
context property. By assigning to that property (using plain
c'4 \property Voice.NoteHead = #'() c'4 This mechanism is fairly crude, since you can only set, but not modify, the definition of an object. Also, it will thoroughly confuse LilyPond. The definition of an object is actually a list of default object
properties. For example, the definition of the Stem object (available
in (thickness . 0.8) (beamed-lengths . (0.0 2.5 2.0 1.5)) (Y-extent-callback . ,Stem::height) ... You can add a property on top of the existing definition, or remove a property, thus overriding the system defaults: c'4 \property Voice.Stem \override #'thickness = #4.0 c'4 \property Voice.Stem \revert #'thickness c'4 You should balance \override and \revert . If that's too
much work, you can use the \set shorthand. It performs a revert
followed by an override. The following example gives exactly the same
result as the previous one.
c'4 \property Voice.Stem \set #'thickness = #4.0 c'4 \property Voice.Stem \set #'thickness = #0.8 c'4 If you use \set , you must explicitly restore the default.
Formally the syntax for these constructions is \property context.grobname \override symbol = value \property context.grobname \set symbol = value \property context.grobname \revert symbolHere symbol is a Scheme expression of symbol type, context and grobname are strings and value is a Scheme expression. If you revert a setting which was not set in the first place, then it
has no effect. However, if the setting was set as a system default, it
may remove the default value, and this may give surprising results,
including crashes. In other words, These are examples of correct nesting of A clumsy but correct form: \override \revert \override \revert \override \revert Shorter version of the same: \override \set \set \revert A short form, using only \set \set \set \set to default value If there is no default (i.e. by default, the object property is unset), then you can use \set \set \set \revert For the digirati, the object description is an Scheme association
list. Since a Scheme list is a singly linked list, we can treat it as a
stack, and BUGS LilyPond will hang or crash if value contains cyclic references.
The backend is not very strict in type-checking object properties. If you
|
||||||||||
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to (address unknown) Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
This page was built from LilyPond-1.7.14 (development-branch) by