4.2.3 Types of properties

So far we have seen two types of property: number and symbol. To be valid, the value given to a property must be of the correct type and obey the rules for that type. The type of property is always shown in brackets after the property name in the IR. Here is a list of the types you may need, together with the rules for that type, and some examples. You must always add a hash symbol, #, of course, to the front of these values when they are entered in the \override command, even if the value itself already starts with #. We only give examples for constants here: if you want to compute a value using Scheme, see Calculations in Scheme.

Property typeRulesExamples
BooleanEither True or False, represented by #t or #f#t, #f
Dimension (in staff space)A decimal number (in units of staff space)2.5, 0.34
DirectionA valid direction constant or its numerical equivalent (0 or CENTER indicate a neutral direction)LEFT, CENTER, UP, 1, -1
IntegerA whole number3, -1
ListA sequence of constants or symbols separated by spaces, enclosed in parentheses and preceded by an apostrophe (quote mark)'(left-edge staff-bar), '(1), '(), '(1.0 0.25 0.5)
MarkupAny valid markup\markup { \italic "cresc." }, "bagpipe"
MomentA fraction of a whole note constructed with the make-moment function(ly:make-moment 1/4), (ly:make-moment 3/8)
NumberAny positive or negative, possibly decimal, value3, -2.45
Pair (of numbers)Two numbers separated by a ‘space . space’ and enclosed in brackets preceded by an apostrophe'(2 . 3.5), '(0.1 . -3.2)
SymbolAny of the set of permitted symbols for that property, preceded by an apostrophe'italic, 'inside
UnknownA procedure, or #f to cause no actionbend::print, ly:text-interface::print, #f
VectorConstants enclosed in #().#(#t #t #f)

See also

Extending: Scheme tutorial.


Other languages: česky, deutsch, español, français, italiano, 日本語, nederlands.
About automatic language selection.

LilyPond — Learning Manual v2.19.15 (development-branch).