%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


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

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  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 "snippets/marking-notes-of-spoken-parts-with-a-cross-on-the-stem-sprechstimme.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

\header {
%% Translation of GIT committish: 1abe87de51b9b00a391da1be4cf4b5ebe4021ca9
  texidocfr = "
Voici comment ajouter une croix aux hampes. Le début du fragment parlé
est stipulé par une commande @code{\\speakOn}, et la fin par une
commande @code{\\speakOff}.

"
  doctitlefr = "Adjonction d'une croix sur la hampe des notes d'un fragment parlé"

%% Translation of GIT committish: cd3e2b0177d366d0a25b4c7628b26455e52175cd
  texidoces = "
Este ejemplo muestra cómo añadir aspas sobre las plicas.  Marcamos
el comienzo de una sección hablada con la instrucción
@code{\\speakOn}, y el final con @code{\\speakOff}.

"
  doctitlees = "Marcar notas de las partes habladas con unas aspas en la plica"

  categories = "Contemporary notation, Editorial annotations, Vocal
                music, Workaround"

  texidoc = "
This example shows how to put crosses on stems. Mark the beginning of a
spoken section with the command @code{\\speakOn} and end it with
@code{\\speakOff}.
"

  doctitle = "Marking notes of spoken parts with a cross on the stem (Sprechstimme)"
} % begin verbatim


speakOn = \override Stem.stencil =
  #(lambda (grob)
     (let* ((x-parent (ly:grob-parent grob X))
            (is-rest? (ly:grob? (ly:grob-object x-parent 'rest))))
       (if is-rest?
           empty-stencil
           (ly:stencil-combine-at-edge
            (ly:stem::print grob)
            Y
            (- (ly:grob-property grob 'direction))
            (grob-interpret-markup
	     grob
             (markup #:center-align #:fontsize -4
                     #:musicglyph "noteheads.s2cross"))
            -1.7))))

speakOff = \revert Stem.stencil

\new Staff {
  \relative c'' {
    a4 b a c
    \speakOn
    g4 f r g8 a
    b4 r r8 d e4
    \speakOff
    c4 a g f
  }
}



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