]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/count-systems.ly
* scm/music-functions.scm (voicify-music): add \context Staff for
[lilypond.git] / input / test / count-systems.ly
index 1717ee753eb1f07a17bd8c4dd2f2855be41ca455..622dba08797f095fc46eb7834d6e02d21765c98e 100644 (file)
@@ -1,15 +1,17 @@
+
+\version "2.1.19"
 \header{
     
-    texidoc="Display the number of systems, or the system number of a
-    Grob.  This can be most useful to assertain that a piece uses a
-    specified number of lines."
-    
-}
+    texidoc="@cindex Count Systems
+Display the number of systems, or the system number of a
+Grob.  This can be most useful to assertain that a piece uses a
+specified number of lines.
+}
 
 #(define (display-systemno smob)
-  (let* ((this-system (get-system smob))
-        (systems (get-broken-into
-                  (get-original this-system))))
+  (let* ((this-system (ly:get-system smob))
+        (systems (ly:get-broken-into
+                  (ly:get-original this-system))))
     (display smob)
     (display (list-index systems this-system))
     (newline)))
 
 #(define (display-system-count smob)
   (display (length
-           (get-broken-into
-            (get-original
-             (get-system smob))))))
+           (ly:get-broken-into
+            (ly:get-original
+             (ly:get-system smob))))))
 
   
   
 \score{
     \notes\relative c''{
-       \property Thread.NoteHead \override #'after-line-breaking-callback
+       \property Voice.NoteHead \override #'after-line-breaking-callback
        % = #display-system-count
        = #display-systemno
        c1
@@ -33,5 +35,7 @@
     }
     \paper{ indent = 0.0\mm
            linewidth = 10.0\mm
+               raggedright = ##t
        }
 }
+