]> git.donarmstrong.com Git - lilypond.git/blob - input/test/count-systems.ly
ab4fc82b5f27d9f3a396e699e45d7bbb30346bf1
[lilypond.git] / input / test / count-systems.ly
1 \version "1.7.18"
2 \header{
3     
4     texidoc="@cindex Count Systems
5 Display the number of systems, or the system number of a
6 Grob.  This can be most useful to assertain that a piece uses a
7 specified number of lines.
8 " }
9
10 #(define (display-systemno smob)
11   (let* ((this-system (ly:get-system smob))
12          (systems (ly:get-broken-into
13                    (ly:get-original this-system))))
14     (display smob)
15     (display (list-index systems this-system))
16     (newline)))
17   
18
19 #(define (display-system-count smob)
20   (display (length
21             (ly:get-broken-into
22              (ly:get-original
23               (ly:get-system smob))))))
24
25   
26   
27 \score{
28     \notes\relative c''{
29         \property Thread.NoteHead \override #'after-line-breaking-callback
30         % = #display-system-count
31         = #display-systemno
32         c1
33         d
34     }
35     \paper{ indent = 0.0\mm
36             linewidth = 10.0\mm
37                 raggedright = ##t
38         }
39 }
40 %% new-chords-done %%