|
|
GNU LilyPondWelcome to the home of the GNU Music Typesetter |
||||||||||
|
Node:Tuning per grob, Next:What to tune?, Previous:Tuning groups of grobs, Up:Tuning output Tuning per grobA second way of tuning grobs is the more arcane \outputproperty predicate symbol = valueHere predicate is a Scheme function taking a grob argument, and
returning a boolean. This statement is processed by the
Output_property_engraver
. It instructs the engraver to feed all
grobs that it sees to predicate. Whenever the predicate returns
true, the grob property symbol will be set to value.
You will need to combine this statement with Here are some random examples. 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)
<c8 e g> }
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 lilypond@packages.debian.org Copyright (c) 1997--2001 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.4.12 (stable-branch) by