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
6 %% This file is in the public domain.
10 lsrtags = "expressive-marks, really-cool, scheme-language, text"
13 This example provides a function to typeset a hairpin (de)crescendo
14 with some additional text below it, such as @qq{molto} or @qq{poco}.
15 The example also illustrates how to modify the way an object is
16 normally printed, using some Scheme code.
19 doctitle = "Center text below hairpin dynamics"
23 hairpinWithCenteredText =
24 #(define-music-function (parser location text) (markup?)
26 \override Voice.Hairpin #'stencil = #(lambda (grob)
27 (ly:stencil-aligned-to
28 (ly:stencil-combine-at-edge
29 (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
31 (ly:stencil-aligned-to (grob-interpret-markup grob text) X CENTER))
35 hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
36 hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
38 \layout { ragged-right = ##f }