]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/markup-note-styles.ly
Merge branch 'translation' into staging
[lilypond.git] / input / regression / markup-note-styles.ly
1 \version "2.17.19"
2
3 \header {
4   texidoc = "@code{\\note-by-number} and @code{\\note} support
5 all note head styles and straight flags."
6 }
7
8 #(define styles-list
9   '(default altdefault
10     baroque neomensural
11     mensural petrucci
12     harmonic harmonic-black
13     harmonic-mixed diamond
14     cross xcircle
15     triangle slash))
16
17 #(define-markup-command (show-note-styles layout props styles) (list?)
18    (interpret-markup layout props
19                      (make-column-markup
20                       (map
21                        (lambda (style)
22                          (make-line-markup
23                           (list
24                            (make-pad-to-box-markup '(0 . 20) '(0 . 0)
25                                                    (symbol->string style))
26                            (make-override-markup
27                             (cons 'line-width 60)
28                             (make-override-markup
29                              (cons 'style style)
30                              (make-fill-line-markup
31                               (map
32                                (lambda (dur-log)
33                                  (make-note-by-number-markup
34                                   dur-log 0 UP))
35                                '(-3 -2 -1 0 1 2 3 4 5 6))))))))
36                        styles))))
37
38 \markup {
39   \column {
40     \combine \null \vspace #1
41     \underline "Note-head-styles:"
42     \override #'(baseline-skip . 6)
43     \show-note-styles #styles-list
44   }
45 }
46
47 \markup {
48   \column {
49     \combine \null \vspace #1
50     \underline "Modern-straight-flag:"
51     \override #'(flag-style . modern-straight-flag)
52     \show-note-styles #'(default)
53   }
54 }
55
56 \markup {
57   \column {
58     \combine \null \vspace #1
59     \underline "Old-straight-flag:"
60     \override #'(flag-style . old-straight-flag)
61     \show-note-styles #'(default)
62   }
63 }
64
65 \markup {
66   \column {
67     \combine \null \vspace #1
68     \underline "Flat-flag:"
69     \override #'(flag-style . flat-flag)
70     \show-note-styles #'(default)
71   }
72 }