lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

intercepting implicit/explicit page breaks


From: Knut Petersen
Subject: intercepting implicit/explicit page breaks
Date: Sun, 4 Sep 2016 16:31:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2

Hi everybody!

I use

#(define (display-breaks grob)
   (if (and (grob::has-interface grob 'paper-column-interface)
            (eq? #t (ly:grob-property grob 'non-musical)))
       (if (eq? 1 (ly:item-break-dir grob))
           (let* ((moment (ly:grob-property grob 'when))(m moment)
                  (bar (ly:grob-property grob 'rhythmic-location))(b (car bar)))
                 (format out "~a new system at bar ~a~%" (format-moment m) b)
             ))
       (ly:message "Need NonMusicalPaperColumn grob to determine line 
breaks.")))

activated by

     \override NonMusicalPaperColumn #'after-line-breaking = #display-breaks

That reliably gives the moment and bar number of an implicit or explicit break,
but I also need to know if this break is a PAGE break.

I assume the information is not available at the time of the callback used 
above, but
that isn't a problem as it would be used by a script after lilypond has 
finished.

Any idea where/when to get that information from lilypond?

thx,
 Knut






reply via email to

[Prev in Thread] Current Thread [Next in Thread]