]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/cross-staff-chords---beaming-problems-workaround.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / cross-staff-chords---beaming-problems-workaround.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "chords, keyboards, tweaks-and-overrides, workaround"
11
12   texidoc = "
13 Sometimes it is better to use stems from the upper staff for creating
14 cross-staff chords, because no problems with automatic beam collision
15 avoidance then arise.  If the stems from the lower staff were used in
16 the following example, it would be necessary to change the automatic
17 beam collision avoidance settings so that it doesn't detect collisions
18 between staves using @code{\\override Staff.Beam.collision-voice-only =
19 ##t}
20
21 "
22   doctitle = "Cross-staff chords - beaming problems workaround"
23 } % begin verbatim
24
25 \new PianoStaff <<
26   \new Staff = up
27     \relative c' {
28       <<
29         { r4
30           \override Stem.cross-staff = ##t
31           \override Stem.length = #19 % this is in half-spaces,
32               % so it makes stems 9.5 staffspaces long
33           \override Stem.Y-offset = #-6 % stems are normally lengthened
34               % upwards, so here we must lower the stem by the amount
35               % equal to the lengthening - in this case (19 - 7) / 2
36               % (7 is default stem length)
37           e e e }
38         { s4
39           \change Staff = "bottom"
40           \override NoteColumn.ignore-collision = ##t
41           c, c c
42         }
43       >>
44     }
45   \new Staff = bottom
46     \relative c' {
47       \clef bass
48       \voiceOne
49       g8 a g a g a g a
50     }
51 >>