]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/cross-staff-stems.ly
Merge remote-tracking branch 'origin/master' into translation
[lilypond.git] / Documentation / snippets / cross-staff-stems.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.16.0
8 \version "2.16.0"
9
10 \header {
11   lsrtags = "staff-notation, tweaks-and-overrides, contexts-and-engravers"
12   texidoc = "
13 This snippet shows the use of the @code{Span_stem_engraver}
14 and @code{\\crossStaff} to connect stems across staves automatically.
15 The stem length need not be specified, as the variable distance
16 between noteheads and staves is calculated automatically.
17 "
18   doctitle = "Cross staff stems"
19 } % begin verbatim
20
21
22 \layout {
23   \context {
24     \PianoStaff
25     \consists #Span_stem_engraver
26   }
27 }
28
29 {
30   \new PianoStaff <<
31     \new Staff {
32       <b d'>4 r d'16\> e'8. g8 r\!
33       e'8 f' g'4 e'2
34     }
35     \new Staff {
36       \clef bass
37       \voiceOne
38       \autoBeamOff
39       \crossStaff { <e g>4 e, g16 a8. c8} d
40       \autoBeamOn
41       g8 f g4 c2
42     }
43   >>
44 }