]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/changing-properties-for-individual-grobs.ly
Merge branch 'master' of ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / input / lsr / changing-properties-for-individual-grobs.ly
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.11.64"
4
5 \header {
6   lsrtags = "tweaks-and-overrides"
7
8   texidoc = "
9 The @code{\\applyOutput} command allows the tuning of any layout
10 object, in any context.  It requires a Scheme function with three
11 arguments."
12
13   doctitle = "Changing properties for individual grobs"
14 } % begin verbatim
15
16
17 #(define (mc-squared grob grob-origin context)
18   (let*
19     (
20       (ifs (ly:grob-interfaces grob))
21       (sp (ly:grob-property grob 'staff-position))
22     )
23     (if (memq 'note-head-interface ifs)
24       (begin
25         (ly:grob-set-property! grob 'stencil
26           (grob-interpret-markup grob
27             (make-lower-markup 0.5
28               (case sp
29                 ((-5) "m")
30                 ((-3) "c ")
31                 ((-2) (make-smaller-markup (make-bold-markup "2")))
32                 (else "bla")
33                 ))))
34         ))))
35
36 \relative c' {
37   <d f g b>2
38   \applyOutput #'Voice #mc-squared
39   <d f g b>2
40 }