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