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