[ << Scheme tutorial ] | [Top][Contents][Index] | [ Interfaces for programmers >> ] |
[ < Importing Scheme in LilyPond ] | [ Up : Scheme in LilyPond ] | [ LilyPond compound variables > ] |
1.2.6 Object properties
Object properties are stored in LilyPond in the form of alist-chains, which are lists of alists. Properties are set by adding values at the beginning of the property list. Properties are read by retrieving values from the alists.
Setting a new value for a property requires assigning a value to the alist with both a key and a value. The LilyPond syntax for doing this is:
\override Stem.thickness = #2.6
This instruction adjusts the appearance of stems. An alist entry
'(thickness . 2.6)
is added to the property list of the
Stem
object. thickness
is measured relative to the thickness of
staff lines, so these stem lines will be 2.6
times the
width of staff lines. This makes stems almost twice as thick as their
normal size. To distinguish between variables defined in input files (like
twentyFour
in the example above) and variables of internal
objects, we will call the latter ‘properties’ and the former
‘variables.’ So, the stem object has a thickness
property,
while twentyFour
is a variable.
[ << Scheme tutorial ] | [Top][Contents][Index] | [ Interfaces for programmers >> ] |
[ < Importing Scheme in LilyPond ] | [ Up : Scheme in LilyPond ] | [ LilyPond compound variables > ] |