X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fbroken-crescendo-hairpin.ly;h=1515b52fa33484719226a9b74237278c66160d21;hb=058370efc7e9710f149d0f444328bb1fcd7bdec1;hp=48f10495df904319b33fdcf3561a8d07a002cade;hpb=0859431a3b2a6c36b2fee643563c6fd914fe9884;p=lilypond.git diff --git a/Documentation/snippets/broken-crescendo-hairpin.ly b/Documentation/snippets/broken-crescendo-hairpin.ly index 48f10495df..1515b52fa3 100644 --- a/Documentation/snippets/broken-crescendo-hairpin.ly +++ b/Documentation/snippets/broken-crescendo-hairpin.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.dsi.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.17.11" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.2 +\version "2.19.2" \header { lsrtags = "contemporary-notation, expressive-marks, symbols-and-glyphs" @@ -12,16 +13,12 @@ texidoc = " 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 postscript code within a text markup. - -To fine-tune the position and size of the markup, the number preceding -@code{setgray} in the postscript definition can be set to a value less -than one, making it grey. The two numbers before @code{scale} in the -postscript code are responsible for the width and height of the -rectangle, the two numbers before @code{translate} change the x- and -y-origin of the rectangle. +part of the crescendo hairpin, making it invisible. +The markup command @code{with-dimensions} tells LilyPond to consider only +the bottom edge of the rectangle when spacing it against the hairpin. +The property @code{staff-padding} prevents the rectangle from fitting +between the hairpin and staff. Make sure to put the hairpin in a lower layer than the text markup to draw the rectangle over the hairpin. @@ -35,7 +32,6 @@ draw the rectangle over the hairpin. << { \dynamicUp - \override DynamicLineSpanner.staff-padding = #4 r2 r16 c'8.\pp r4 } \\ @@ -43,19 +39,12 @@ draw the rectangle over the hairpin. \override DynamicLineSpanner.layer = #0 des,2\mf\< ~ \override TextScript.layer = #2 - des16_\markup { - \postscript #" - 1.9 -8 translate - 5 4 scale - 1 setgray - 0 0 moveto - 0 1 lineto - 1 1 lineto - 1 0 lineto - 0 0 lineto - fill" - } - r8. des4 ~ des16->\sff + \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 ~ 16->\sff } >> }