]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/center-text-below-hairpin-dynamics.ly
48c1469a3c73050d9b3abd7ad8a7f5e618dd6861
[lilypond.git] / input / lsr / center-text-below-hairpin-dynamics.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.13.1"
4
5 \header {
6   lsrtags = "expressive-marks, text"
7
8 %% Translation of GIT committish: dff50e8e1d3134657a6b6203b9c93826dc4cef65
9   texidoces = "
10 Este ejemplo proporciona una función para tipografiar un regulador
11 con texto por debajo, como \"molto\" o \"poco\". El ejemplo
12 ilustra también cómo modificar la manera en que se imprime
13 normalmente un objeto, utilizando código de Scheme.
14
15 "
16   doctitlees = "Centrar texto debajo de un regulador"
17
18   texidoc = "
19 This example provides a function to typeset a hairpin (de)crescendo
20 with some additional text below it, such as \"molto\" or \"poco\". The
21 example also illustrates how to modify the way an object is normally
22 printed, using some Scheme code.
23
24 "
25   doctitle = "Center text below hairpin dynamics"
26 } % begin verbatim
27
28 hairpinWithCenteredText =
29 #(define-music-function (parser location text) (markup?)
30 #{
31   \override Voice.Hairpin #'stencil = #(lambda (grob)
32     (ly:stencil-aligned-to
33      (ly:stencil-combine-at-edge
34       (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
35       Y DOWN
36       (ly:stencil-aligned-to (grob-interpret-markup grob $text) X CENTER))
37      X LEFT))
38 #})
39
40 hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
41 hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
42
43 \layout { ragged-right = ##f }
44
45 \relative c' {
46   \hairpinMolto
47   c2\< c\f
48   \hairpinMore
49   c2\< c\f
50 }