The most versatile way of tuning an object is \applyoutput. Its
syntax is
\applyoutput proc
where proc is a Scheme function, taking three arguments.
When interpreted, the function proc is called for every layout object found in the context, with the following arguments:
\applyoutput is processed.
In addition, the cause of the layout object, i.e. the music
expression or object that was responsible for creating it, is in the
object property cause. For example, for a note head, this is a
NoteHead (lilypond-internals) event, and for a Stem (lilypond-internals) object,
this is a NoteHead (lilypond-internals) object.
Here is a simple example of \applyoutput; it blanks note-heads on the
center-line:
(define (blanker grob grob-origin context)
(if (and (memq (ly:get-grob-property grob 'interfaces)
note-head-interface)
(eq? (ly:get-grob-property grob 'staff-position) 0))
(ly:set-grob-property! grob 'transparent #t)))
|
This page is for LilyPond-2.0.3 (stable-branch). Report errors to <bug-lilypond@gnu.org>. |