]> git.donarmstrong.com Git - lilypond.git/blob - input/test/count-systems.ly
add version everywhere.
[lilypond.git] / input / test / count-systems.ly
1 \version "1.7.6"
2 \header{
3     
4     texidoc="Display the number of systems, or the system number of a
5     Grob.  This can be most useful to assertain that a piece uses a
6     specified number of lines."
7     
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         }
38 }
39 %% new-chords-done %%