]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/flags-default.ly
Merge commit 'origin/dev/jneeman' into systems-per-page
[lilypond.git] / input / regression / flags-default.ly
1 \version "2.12.0"
2 #(set-global-staff-size 17)
3
4 \header {
5   texidoc = "Default flag styles: '(), 'mensural and 'no-flag.
6   Compare all three methods to print them: (1) C++ default implementation, 
7   (2) Scheme implementation using the 'flag-style grob property and 
8   (3) setting the 'flag property explicitly to the desired Scheme function.
9   All three systems should be absolutely identical."
10 }
11
12 \paper {
13   line-width = 18\cm
14 }
15
16 % test notes, which will be shown in different style:
17 testnotes = { \autoBeamOff
18   c'8 d'16 c'32 d'64 \acciaccatura {c'8} d'64
19   c''8 d''16 c''32 d''64 \acciaccatura {c''8} d''64
20 }
21
22 % Old settings: flag-style set to default, 'mensural, 'no-flag; using the
23 % default C++ function ly:stem::calc-stem
24 {
25   \override Score.RehearsalMark #'self-alignment-X = #LEFT
26   \time 2/4
27
28   \mark "Default flags (C++)"
29   \testnotes
30
31   \mark "Symbol: 'mensural (C++)"
32   \override Stem #'flag-style = #'mensural
33   \testnotes
34
35   \mark "Symbol: 'no-flag (C++)"
36   \override Stem #'flag-style = #'no-flag
37   \testnotes
38 }
39
40 % The same, but using the Scheme implementation of default-flag
41 {
42   \override Score.RehearsalMark #'self-alignment-X = #LEFT
43   \time 2/4
44
45   \override Stem #'flag = #default-flag
46   \revert Stem #'flag-style
47   \mark "Default flags (Scheme)"
48   \testnotes
49
50   \mark "Symbol: 'mensural (Scheme)"
51   \override Stem #'flag-style = #'mensural
52   \testnotes
53
54   \mark "Symbol: 'no-flag (Scheme)"
55   \override Stem #'flag-style = #'no-flag
56   \testnotes
57 }
58
59 % New scheme functions: normal-flag, mensural-flag, no-flag
60 {
61   \override Score.RehearsalMark #'self-alignment-X = #LEFT
62   \time 2/4
63
64   \mark "Function: normal-flag"
65   \override Stem #'flag = #normal-flag
66   \testnotes
67
68   \mark "Function: mensural-flag"
69   \override Stem #'flag = #mensural-flag
70   \testnotes
71
72   \mark "Function: no-flag"
73   \override Stem #'flag = #no-flag
74   \testnotes
75 }