]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/changing-properties-for-individual-grobs.ly
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / changing-properties-for-individual-grobs.ly
1 %% Do not edit this file; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% This file is in the public domain.
4 \version "2.13.16"
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 "
15   doctitle = "Changing properties for individual grobs"
16 } % begin verbatim
17
18 #(define (mc-squared grob grob-origin context)
19   (let ((sp (ly:grob-property grob 'staff-position)))
20     (if (grob::has-interface grob 'note-head-interface)
21       (begin
22         (ly:grob-set-property! grob 'stencil
23           (grob-interpret-markup grob
24             (make-lower-markup 0.5
25               (case sp
26                 ((-5) "m")
27                 ((-3) "c ")
28                 ((-2) (make-smaller-markup (make-bold-markup "2")))
29                 (else "bla")))))))))
30
31 \relative c' {
32   <d f g b>2
33   \applyOutput #'Voice #mc-squared
34   <d f g b>2
35 }