]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/broken-crescendo-hairpin.ly
Merge remote-tracking branch 'origin/translation' into staging
[lilypond.git] / Documentation / snippets / new / broken-crescendo-hairpin.ly
1 \version "2.19.2"
2
3 \header {
4   lsrtags = "contemporary-notation, expressive-marks, symbols-and-glyphs"
5
6   texidoc = "
7 In order to make parts of a crescendo hairpin invisible, the following
8 method is used: A white rectangle is drawn on top of the respective
9 part of the crescendo hairpin, making it invisible.
10
11 The markup command @code{with-dimensions} tells LilyPond to consider only
12 the bottom edge of the rectangle when spacing it against the hairpin.
13 The property @code{staff-padding} prevents the rectangle from fitting
14 between the hairpin and staff.
15
16 Make sure to put the hairpin in a lower layer than the text markup to
17 draw the rectangle over the hairpin.
18
19 "
20   doctitle = "Broken Crescendo Hairpin"
21 }
22
23 \relative c' {
24   <<
25     {
26       \dynamicUp
27       r2 r16 c'8.\pp r4
28     }
29     \\
30     {
31       \override DynamicLineSpanner.layer = #0
32       des,2\mf\< ~
33       \override TextScript.layer = #2
34       \once\override TextScript.staff-padding = #6
35       \once\override TextScript.vertical-skylines = #'()
36       des16_\markup \with-dimensions #'(2 . 7) #'(0 . 0)
37                     \with-color #white
38                     \filled-box #'(2 . 7) #'(0 . 2) #0
39       r8. des4 ~ 16->\sff
40     }
41   >>
42 }