]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/beam-concave-chord.ly
Fix #789.
[lilypond.git] / input / regression / beam-concave-chord.ly
1 \version "2.12.0"
2
3 morgenliedBeam = \relative c'' \new Voice {
4   \time 3/8
5   % morgenlied
6   c16 b c e g <e b'> |
7   \stemUp
8   c16 b c e g <e b'> |
9 }
10
11 rachmaninovBeams = \relative c' \new Voice {
12   \voiceOne
13   \time 4/4
14   \key c \minor
15   <c' e c'>8[ <g c g'> <c f> <ees, ees'>] ~
16   <ees ees'>8[ <c c'> <des des'> <d d'>]
17 }
18
19 horizontalBeams = {
20   % todo.
21 }
22
23 nonHorizontalBeams = {
24   \morgenliedBeam
25   \rachmaninovBeams
26 }
27 \layout {
28   ragged-right = ##t
29 }
30
31 % cut & paste from beam-concave.ly
32
33 #(define (<> x y) (not (= x  y)))
34 mustBeHorizontal = {
35   \override Staff.Beam #'positions =
36     #(ly:make-simple-closure
37       (ly:make-simple-closure
38        (append
39         (list chain-grob-member-functions `(,cons 0 0))
40         (check-slope-callbacks =))))
41 }
42 mustNotBeHorizontal = {
43   \override Staff.Beam #'positions =
44     #(ly:make-simple-closure
45       (ly:make-simple-closure
46        (append
47         (list chain-grob-member-functions `(,cons 0 0))
48         (check-slope-callbacks <>))))
49 }
50
51 \new Voice {
52   \mustBeHorizontal
53   R1
54   \horizontalBeams
55   \mustNotBeHorizontal
56   \nonHorizontalBeams
57 }