5.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 parentheses 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. If you use a Scheme expression you must add a hash symbol, ‘#’, 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 typeRulesInput examples
Booleaneither ‘true’ or ‘false’, represented by #t or #f##t, ##f
(in staff spaces)
a decimal number (in units of staff spaces)2.5, 0.34
directiona valid direction constant or its numerical equivalent (value 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." },
momenta musical length; this type is distinct from a note duration\musicLength 4.,
\musicLength { 2 2. }
numberany positive or negative, possibly decimal, value3, -2.45
(of numbers)
two numbers separated by the sequence ‘whitespace’, ‘.’, ‘whitespace’, enclosed in parentheses, and 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 action#bend::print,
vectorconstants enclosed in #().##(#t #t #f)

Note that number arguments to markup functions within a \markup block need a leading hash mark.

See also

Extending: Scheme tutorial.

LilyPond Learning Manual v2.25.18 (development-branch).