]> git.donarmstrong.com Git - lilypond.git/commitdiff
NR 6.5.2: Correct and clarify \applyOutput example.
authorMark Polesky <markpolesky@yahoo.com>
Sun, 14 Jun 2009 00:14:24 +0000 (17:14 -0700)
committerTrevor Daniels <t.daniels@treda.co.uk>
Sun, 14 Jun 2009 08:24:23 +0000 (09:24 +0100)
Documentation/user/programming-interface.itely

index 69397cfb78f6ee61d0a25d9c9e84d388562b4d00..2d28412eabf138715b88cfcdfe1d2fec21d176e7 100644 (file)
@@ -1291,13 +1291,16 @@ this is a @rinternals{NoteHead} object.
 Here is a function to use for @code{\applyOutput}; it blanks
 note-heads on the center-line:
 
-@example
-(define (blanker grob grob-origin context)
- (if (and (memq (ly:grob-property grob 'interfaces)
-                note-head-interface)
-          (eq? (ly:grob-property grob 'staff-position) 0))
-     (set! (ly:grob-property grob 'transparent) #t)))
-@end example
+@lilypond[quote,verbatim,ragged-right]
+#(define (blanker grob grob-origin context)
+   (if (and (memq 'note-head-interface (ly:grob-interfaces grob))
+            (eq? (ly:grob-property grob 'staff-position) 0))
+       (set! (ly:grob-property grob 'transparent) #t)))
+
+\relative {
+  e4 g8 \applyOutput #'Voice #blanker b d2
+}
+@end lilypond
 
 
 @node Scheme procedures as properties