]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/changing-properties-for-individual-grobs.ly
Doc-es: pre-merge update of texidoc committishes.
[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 %% Note: this file works from version 2.12.0
4 \version "2.12.0"
5
6 \header {
7   lsrtags = "tweaks-and-overrides"
8
9   texidoc = "
10 The @code{\\applyOutput} command allows the tuning of any layout
11 object, in any context.  It requires a Scheme function with three
12 arguments."
13
14   doctitle = "Changing properties for individual grobs"
15 } % begin verbatim
16
17
18 #(define (mc-squared grob grob-origin context)
19   (let*
20     (
21       (ifs (ly:grob-interfaces grob))
22       (sp (ly:grob-property grob 'staff-position))
23     )
24     (if (memq 'note-head-interface ifs)
25       (begin
26         (ly:grob-set-property! grob 'stencil
27           (grob-interpret-markup grob
28             (make-lower-markup 0.5
29               (case sp
30                 ((-5) "m")
31                 ((-3) "c ")
32                 ((-2) (make-smaller-markup (make-bold-markup "2")))
33                 (else "bla")
34                 ))))
35         ))))
36
37 \relative c' {
38   <d f g b>2
39   \applyOutput #'Voice #mc-squared
40   <d f g b>2
41 }