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.
6 lsrtags = "expressive-marks, text"
8 This example provides a function to typeset a hairpin (de)crescendo
9 with some additional text below it, such as \"molto\" or \"poco\".The
10 example also illustrates how to modify the way an object is normally
11 printed, using some Scheme code.
14 hairpinWithCenteredText = #(define-music-function
15 (parser location text) (markup?)
17 \override Voice.Hairpin #'stencil = #(lambda (grob)
18 (ly:stencil-aligned-to
19 (ly:stencil-combine-at-edge
20 (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
23 (ly:stencil-aligned-to (ly:text-interface::print grob) X CENTER))
25 \override Voice.Hairpin #'text = $text
29 hairpinMolto = \hairpinWithCenteredText \markup { \italic "molto" }
30 hairpinMore = \hairpinWithCenteredText \markup { \bigger "moltissimo" }
33 \hairpinMolto c'2\< c'2\f
34 \hairpinMore c'2\< c'2\f