Broken crescendo hairpin: Difference between revisions
Appearance
m New category |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
In order to make parts of a crescendo hairpin invisible, the following method is used: A white rectangle is drawn on top of the respective part of the crescendo hairpin, making it invisible. The rectangle is defined as | In order to make parts of a crescendo hairpin invisible, the following method is used: A white rectangle is drawn on top of the respective part of the crescendo hairpin, making it invisible. The rectangle is defined as a text markup. | ||
The markup command <code>with-dimensions</code> tells LilyPond to consider only the bottom edge of the rectangle when spacing it against the hairpin. The property <code>staff-padding</code> prevents the rectangle from fitting between the hairpin and staff. | The markup command <code>with-dimensions</code> tells LilyPond to consider only the bottom edge of the rectangle when spacing it against the hairpin. The property <code>staff-padding</code> prevents the rectangle from fitting between the hairpin and staff. | ||
| Line 30: | Line 30: | ||
[[Category:Expressive marks]] | [[Category:Expressive marks]] | ||
[[Category:Contemporary notation]] | [[Category:Contemporary notation]] | ||
[[Category:Symbols and glyphs]] | |||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | [[Category:Snippet]] | ||
Latest revision as of 13:29, 3 December 2025
In order to make parts of a crescendo hairpin invisible, the following method is used: A white rectangle is drawn on top of the respective part of the crescendo hairpin, making it invisible. The rectangle is defined as a text markup.
The markup command with-dimensions tells LilyPond to consider only the bottom edge of the rectangle when spacing it against the hairpin. The property staff-padding prevents the rectangle from fitting between the hairpin and staff.
Make sure the hairpin is in a lower layer than the text markup to draw the rectangle over the hairpin.
\version "2.24"
\relative c' {
<<
{
\dynamicUp
r2 r16 c'8.\pp r4
}
\\
{
\override DynamicLineSpanner.layer = #0
des,2\mf\< ~
\override TextScript.layer = #2
\once\override TextScript.staff-padding = #6
\once\override TextScript.vertical-skylines = #'()
des16_\markup \with-dimensions #'(2 . 7) #'(0 . 0)
\with-color #white
\filled-box #'(2 . 7) #'(0 . 2) #0
r8. des4 ~ des16->\sff r8.
}
>>
}