![]() |
GNU LilyPond-- -- |
||||||||||
|
Tuning per objectTuning a single object is most often done with \once \property ...applies a setting only during one moment in the score: notice how the original setting for stem thickness is restored automatically in the following example c4 \once \property Voice.Stem \set #'thickness = #4 c4 c4 A second way of tuning objects is the more arcane \outputproperty predicate symbol = valueHere predicate is a Scheme function taking a object argument, and
returning a boolean. This statement is processed by the
Output_property_engraver . It instructs the engraver to feed all
objects that it sees to predicate. Whenever the predicate returns
true, the object property symbol will be set to value.
This command is only single shot, in contrast to You will need to combine this statement with In the following example, all note heads occurring at current staff
level, are shifted up and right by setting their \relative c'' { c4 \context Staff \outputproperty #(make-type-checker 'note-head-interface) #'extra-offset = #'(0.5 . 0.75) <<c e g>>8 } In this example, the predicate checks the #(define (make-text-checker text) (lambda (grob) (equal? text (ly:get-grob-property grob 'text)))) \score { \notes\relative c''' { \property Voice.Stem \set #'direction = #1 \outputproperty #(make-text-checker "m.d.") #'extra-offset = #'(-3.5 . -4.5) a^2^"m.d." } } BUGS If possible, avoid this feature: the semantics are not very clean, and the syntax and semantics are up for rewrite. |
||||||||||
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to (address unknown) Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
This page was built from LilyPond-1.7.14 (development-branch) by