]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/center-text-below-hairpin-dynamics.ly
Doc: run makelsr locally
[lilypond.git] / Documentation / snippets / center-text-below-hairpin-dynamics.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.15.32"
8
9 \header {
10   lsrtags = "text, really-cool, expressive-marks, scheme-language"
11
12 %% Translation of GIT committish: b482c3e5b56c3841a88d957e0ca12964bd3e64fa
13   texidoces = "
14 Este ejemplo proporciona una función para tipografiar un regulador con
15 texto por debajo, como @qq{molto} o @qq{poco}. El ejemplo ilustra
16 también cómo modificar la manera en que se imprime normalmente un
17 objeto, utilizando código de Scheme.
18
19 "
20   doctitlees = "Centrar texto debajo de un regulador"
21
22   texidoc = "
23 This example provides a function to typeset a hairpin (de)crescendo
24 with some additional text below it, such as @qq{molto} or @qq{poco}.
25 The example also illustrates how to modify the way an object is
26 normally printed, using some Scheme code.
27
28 "
29   doctitle = "Center text below hairpin dynamics"
30 } % begin verbatim
31
32
33 hairpinWithCenteredText =
34 #(define-music-function (parser location text) (markup?)
35 #{
36   \override Voice.Hairpin #'stencil = #(lambda (grob)
37     (ly:stencil-aligned-to
38      (ly:stencil-combine-at-edge
39       (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
40       Y DOWN
41       (ly:stencil-aligned-to (grob-interpret-markup grob text) X CENTER))
42      X LEFT))
43 #})
44
45 hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
46 hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
47
48 \layout { ragged-right = ##f }
49
50 \relative c' {
51   \hairpinMolto
52   c2\< c\f
53   \hairpinMore
54   c2\< c\f
55 }