]> git.donarmstrong.com Git - lilypond.git/blob - input/new/broken-crescendo-hairpin.ly
Merge branch 'lilypond/translation'
[lilypond.git] / input / new / broken-crescendo-hairpin.ly
1 \version "2.11.38"\r
2 \r
3 \header {\r
4   doctitle = "Broken crescendo hairpin"\r
5   lsrtags = "expressive-marks"\r
6   texidoc = "\r
7 In order to make parts of a crescendo hairpin invisible, the following\r
8 method is used: A white rectangle is drawn on top of the respective\r
9 part of the crescendo hairpin, making it invisible. The rectangle is\r
10 defined as postscript code within a text markup.\r
11 \r
12 To fine-tune the position and size of the markup, the number\r
13 preceding @code{setgray} in the postscript definition can be set to a\r
14 value <1 making it grey. The two numbers before @code{scale} in the\r
15 postscript code are responsible for the width and height of the\r
16 rectangle, the two numbers before @code{translate} change the x- and\r
17 y-origin of the rectangle. \r
18 \r
19 Make sure to put the hairpin in a lower layer than the text markup to\r
20 actually draw the rectangle above the hairpin. \r
21 " }\r
22 \r
23 \score {\r
24   \relative c' {\r
25     << {\r
26       \dynamicUp\r
27       \override DynamicLineSpanner #'staff-padding = #4\r
28       r2 r16 c'8.\pp r4\r
29     } \\ {\r
30       \override DynamicLineSpanner #'layer = #0\r
31       des,2\mf\< ~\r
32       \override TextScript #'layer = #2\r
33       des16_\markup {\r
34         \postscript #"1.9 -8 translate 5 4 scale 1 setgray 0 0 moveto 0 1\r
35         lineto 1 1 lineto 1 0 lineto 0 0 lineto fill"\r
36       }\r
37       r8. des4 ~ des16->\sff\r
38     } >>\r
39   }\r
40   \layout { ragged-right = ##t }\r
41 }\r