4 lsrtags = "expressive-marks, text"
7 This example provides a function to typeset a hairpin (de)crescendo
8 with some additional text below it, such as \"molto\" or \"poco\". The
9 example also illustrates how to modify the way an object is normally
10 printed, using some Scheme code.
12 doctitle = "Center text below hairpin dynamics"
15 hairpinWithCenteredText =
16 #(define-music-function (parser location text) (markup?)
18 \override Voice.Hairpin #'stencil = #(lambda (grob)
19 (ly:stencil-aligned-to
20 (ly:stencil-combine-at-edge
21 (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
23 (ly:stencil-aligned-to (grob-interpret-markup grob $text) X CENTER))
27 hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
28 hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
30 \layout { ragged-right = ##f }
33 \hairpinMolto c'2\< c'\f
34 \hairpinMore c'2\< c'\f