]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly
Merge branch 'master' of ssh+git://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / input / lsr / marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.11.66"
4
5 \header {
6   lsrtags = "editorial-annotations, vocal-music"
7
8   texidoc = "
9 This example shows how to put crosses on stems. Mark the beginning
10 of a spoken section with the @code{\\speakOn} keyword, and end it
11 with the @code{\\speakOff} keyword.  Remember to end cross sections
12 before entering any rest: this function also adds crosses to the
13 invisible stems of rests.
14 "
15   doctitle = "Marking notes of spoken parts with a cross on the stem"
16 } % begin verbatim
17
18
19 speakOn = {
20   \override Stem #'stencil = #(lambda (grob)
21   (ly:stencil-combine-at-edge
22     (ly:stem::print grob)
23     Y
24     (- (ly:grob-property grob 'direction))
25     (grob-interpret-markup grob
26       (markup #:hspace -1.025 #:fontsize -4
27         #:musicglyph "noteheads.s2cross"))
28     -2.3 0))
29 }
30
31 speakOff = {
32   \revert Stem #'stencil
33 }
34
35 \score {
36   \new Staff {
37     \relative c'' {
38       a4 b a c
39       \speakOn
40       g4 f r g
41       b4 r d e
42       \speakOff
43       c4 a g f
44     }
45   }
46 }