lilypond-learning: Types of properties
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
(lilypond-extending)Calculations in Scheme.
Property Rules Examples
type
--------------------------------------------------------------------------
Boolean Either True or False, ‘#t’, ‘#f’
represented by #t or #f
Dimension A decimal number (in units of ‘2.5’, ‘0.34’
(in staff staff space)
space)
Direction A valid direction constant or ‘LEFT’, ‘CENTER’, ‘UP’,
its numerical equivalent (‘0’ ‘1’, ‘-1’
or ‘CENTER’ indicate a neutral
direction)
Integer A whole number ‘3’, ‘-1’
List A sequence of constants or ‘'(left-edge
symbols separated by spaces, staff-bar)’, ‘'(1)’,
enclosed in parentheses and ‘'()’, ‘'(1.0 0.25
preceded by an apostrophe 0.5)’
(quote mark)
Markup Any valid markup ‘\markup { \italic
"cresc." }’,
‘"bagpipe"’
Moment A fraction of a whole note ‘(ly:make-moment 1/4)’,
constructed with the ‘(ly:make-moment 3/8)’
make-moment function
Number Any positive or negative, ‘3’, ‘-2.45’
possibly decimal, value
Pair (of Two numbers separated by a ‘'(2 . 3.5)’, ‘'(0.1 .
numbers) ‘space . space’ and enclosed -3.2)’
in brackets preceded by an
apostrophe
Symbol Any of the set of permitted ‘'italic’, ‘'inside’
symbols for that property,
preceded by an apostrophe
Unknown A procedure, or ‘#f’ to cause ‘bend::print’,
no action ‘ly:text-interface::print’,
‘#f’
Vector Constants enclosed in ‘#(#t #t #f)’
‘#(’...‘)’.
See also
........
Extending: (lilypond-extending)Scheme tutorial.