File: beam-collision-basic.ly

package info (click to toggle)
lilypond 2.24.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 70,352 kB
  • sloc: cpp: 87,962; lisp: 43,344; xml: 31,269; python: 22,974; sh: 4,090; yacc: 4,080; perl: 2,873; lex: 1,387; makefile: 76
file content (90 lines) | stat: -rw-r--r-- 1,347 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
\version "2.19.21"
\header {
  texidoc = "Manual beams do not collide with notes."
}

\layout {
%  debug-beam-scoring = ##t
  indent = #0.0
}

\relative \new Staff {

  <<
    \new Voice {
    \voiceOne
    \repeat unfold 8 { c'8[ c] }
  }
    \new Voice \relative {
      \voiceThree
      \autoBeamOff
      f'' r e r
      d r c r
      b r a r
      g r f r
    } 
  >>
  \break

  %% The same with double collisions, to check for scaling problems.
  <<
    \new Voice {
    \voiceOne
    \repeat unfold 8 { c8[ c] }
  }
    \new Voice \relative {
      \voiceThree
      \autoBeamOff
      f'' f e e
      d d c c
      b b a a
      g g f f
    } 
  >>
  \break
  
  <<
     \new Voice {
       \repeat unfold 8 \relative {
	 \voiceOne
	 c'8[
	 \voiceTwo
	 c'']
       }
     }
     \new Voice \relative {
       \voiceFour
       s8 f' 
       s8 g
       s8 a
       s8 b
       s8 c
       s8 d
       s8 e
     }
   >>

  \break
   <<
     \new Voice {
       \repeat unfold 8 \relative {
	 \voiceOne

	 %% We must use a wider interval, otherwise the beam will be
	 %% positioned to descend.
	 a8[
	 \voiceTwo
	 c'']
       }
     }
     \new Voice \relative {
       \voiceFour
       \autoBeamOff
       \stemUp f'' \stemDown f,
       \stemUp e' \stemDown g,
       \stemUp d' \stemDown a
       \stemUp c \stemDown b
     }
   >>
}