[ << Tweaking output ] | [Top][Contents][Index][ ? ] | [ Templates >> ] | ||
[ < Properties found in interfaces ] | [ Up : The Internals Reference manual ] | [ Appearance of objects > ] |
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 type | Rules | Examples |
---|---|---|
Boolean | Either 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 |
Direction | A valid direction constant or its numerical equivalent
(0 or CENTER indicate a neutral direction) | LEFT , CENTER , UP ,
1 , -1 |
Integer | A whole number | 3 , -1 |
List | A 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) |
Markup | Any valid markup | \markup { \italic "cresc." } , "bagpipe" |
Moment | A fraction of a whole note constructed with the make-moment function | (ly:make-moment 1/4) ,
(ly:make-moment 3/8) |
Number | Any positive or negative, possibly decimal, value | 3 , -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) |
Symbol | Any of the set of permitted symbols for that property, preceded by an apostrophe | 'italic , 'inside |
Unknown | A procedure, or #f to cause no action | bend::print , ly:text-interface::print ,
#f |
Vector | Constants
enclosed in #( …) . | #(#t #t #f) |
See also
Extending: Scheme tutorial.
[ << Tweaking output ] | [Top][Contents][Index][ ? ] | [ Templates >> ] | ||
[ < Properties found in interfaces ] | [ Up : The Internals Reference manual ] | [ Appearance of objects > ] |
Más nyelvek: català, česky, deutsch, español, français, italiano, 日本語, nederlands.
About automatic language selection.