]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/changing-properties-for-individual-grobs.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / changing-properties-for-individual-grobs.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.14.0"
8
9 \header {
10   lsrtags = "tweaks-and-overrides"
11
12   texidoc = "
13 The @code{\\applyOutput} command allows the tuning of any layout
14 object, in any context. It requires a Scheme function with three
15 arguments.
16
17 "
18   doctitle = "Changing properties for individual grobs"
19 } % begin verbatim
20
21 #(define (mc-squared grob grob-origin context)
22   (let ((sp (ly:grob-property grob 'staff-position)))
23     (if (grob::has-interface grob 'note-head-interface)
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 \relative c' {
35   <d f g b>2
36   \applyOutput #'Voice #mc-squared
37   <d f g b>2
38 }