1\version "2.19.34"
2
3\header {
4  texidoc = "Whether simultaneous notes are identified as
5  vertically colliding or not depends on the value of the
6  @code{note-collision-threshold} property of the @code{Stem}
7  grob (for notes in the same voice) and the @code{NoteCollision}
8  grob (for notes in different voices)."
9}
10
11music = <<
12  \new Voice \relative {
13    \voiceOne
14    <c' d>4 <d e> <f g> <g a>
15    e g g a
16
17  }
18  \new Voice \relative {
19    \voiceTwo
20    s4 s s s
21    d' f a b
22  }
23>>
24
25customizations = \with {
26  staffLineLayoutFunction = #ly:pitch-semitones
27  \override StaffSymbol.staff-space = #0.7
28  \override StaffSymbol.line-positions = #'(-4 0 4)
29}
30
31
32\markup "collisions"
33
34\new Staff \with {
35  \customizations
36}
37\music
38
39\markup "collisions prevented"
40
41\new Staff \with {
42  \customizations
43  \override Stem.note-collision-threshold = #2
44  \override NoteCollision.note-collision-threshold = #2
45}
46\music
47