]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/cross-staff-chords---beaming-problems-workaround.ly
3385bf5b73bd826ec2d58d0efcd554691a5c1242
[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.dsi.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.14.2"
8
9 \header {
10   lsrtags = "tweaks-and-overrides, workaround, chords, keyboards"
11
12 %% Translation of GIT committish: 1cda7b7b8219cb97399b8e7b56c1115aaf82c002
13   texidocfr = "
14 Il est parfois préférable d'utiliser les hampes de la portée supérieure
15 pour créer des accords distribués, afin d'éviter tout risque de
16 collision au niveau des ligatures automatiques.  Dans l'exemple suivant,
17 le fait de partir des hampes de la portée inférieure aurait rendu
18 nécessaire l'adaptation du détecteur de collision des ligatures, par une
19 clause @code{\\override Staff.Beam #'collision-voice-only = ##t}, afin
20 qu'il ne tienne pas compte des collisions entre portées.
21
22 "
23   doctitlefr = "Accord distribué et problème de hampe - solution"
24
25   texidoc = "
26 Sometimes it is better to use stems from the upper staff for creating
27 cross-staff chords, because no problems with automatic beam collision
28 avoidance then arise.  If the stems from the lower staff were used in
29 the following example, it would be necessary to change the automatic
30 beam collision avoidance settings so that it doesn't detect collisions
31 between staves using @code{\\override Staff.Beam #'collision-voice-only
32 = ##t}
33
34 "
35   doctitle = "Cross-staff chords - beaming problems workaround"
36 } % begin verbatim
37
38
39 \new PianoStaff <<
40   \new Staff = up
41     \relative c' {
42       <<
43         { r4
44           \override Stem #'cross-staff = ##t
45           \override Stem #'length = #19 % this is in half-spaces,
46               % so it makes stems 9.5 staffspaces long
47           \override Stem #'Y-offset = #-6 % stems are normally lengthened
48               % upwards, so here we must lower the stem by the amount
49               % equal to the lengthening - in this case (19 - 7) / 2
50               % (7 is default stem length)
51           e e e }
52         { s4
53           \change Staff = "bottom"
54           \override NoteColumn #'ignore-collision = ##t
55           c, c c
56         }
57       >>
58     }
59   \new Staff = bottom
60     \relative c' {
61       \clef bass
62       \voiceOne
63       g8 a g a g a g a
64     }
65 >>