%% Generated by lilypond-book.py
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}





% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "broken-crescendo-hairpin.ly"
\sourcefileline 0
%% 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.16.0"

\header {
%% Translation of GIT committish: 26a079ca2393d053315ef8dbef626c897dc9645a
  texidoces = "
Para hacer invisibles partes de un regulador de crescendo, se usa
el método de dibujar un rectángulo blanco encima de la parte
respectiva del regulador, tapándola.  El rectángulo se define como
código PostScript dentro de un elemento de marcado de texto.

Para realizar un ajuste fino de la posición y el tamaño del
elemento de marcado, se puede establecer el número que precede a
@code{setgray} en la definición de PostScript a un valor menor que
la unidad, haciendo que sea de color gris.  Los dos números que
están antes de @code{scale} en el código PostScript son los
responsables del ancho y la altura del rectángulo, y los dos
números que están antes de @code{translate} cambian las
coordenadas X e Y de origen del rectángulo.

Asegúrse de poner el regulador en una capa más baja que el
elemento de marcado de texto para trazar el rectángulo encima del
regulador.

"
  doctitlees = "Regulador interrumpido"

%% Translation of GIT committish: e99967817ff985eb5bd5b0220b2fbf552963f9de
  texidocfr = "
Une portion d'un soufflet de crescendo peut être rendue invisible.
Il suffit pour cela de dessiner un rectangle par dessus cette partie, ce
qui aura pour effet de la rendre invisible.  Le rectangle est défini par
un @emph{markup} contenant du code PostScript.

La taille et le positionnement de ce @emph{markup} sont ajustables grâce
à certaiins composants du code PostScript@tie{}: le nombre précédant
@code{setgray} donnera du gris s'il est inérieur à@tie{}1@tie{}; les
deux nombres précédant @code{scale} définissent la largeur et la hauteur
du rectangle@tie{}; les deux nombres précédant @code{translate}
modifient le point d'ancrage (en abscisse et en ordonnée) du rectangle.

Le soufflet doit se trouver à un niveau inférieur à celui du @emph{markup}
afin que le dessin du rectangle puisse effectivement le recouvrir.

"
  doctitlefr = "Soufflet de crescendo partiellement interrompu"

  lsrtags = "contemporary-notation, expressive-marks, symbols-and-glyphs"

  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.


Make sure to put the hairpin in a lower layer than the text markup to
draw the rectangle over the hairpin.

"
  doctitle = "Broken Crescendo Hairpin"
} % begin verbatim


\relative c' {
  <<
    {
      \dynamicUp
      \override DynamicLineSpanner #'staff-padding = #4
      r2 r16 c'8.\pp r4
    }
    \\
    {
      \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
    }
  >>
}



% ****************************************************************
% end ly snippet
% ****************************************************************
