lilypond-user
[Top][All Lists]
Advanced

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

Re: suppress time sig automatically


From: David Nalesnik
Subject: Re: suppress time sig automatically
Date: Sun, 24 Jun 2012 09:20:52 -0500

Hi again,


Here's a Scheme engraver which should hopefully do what you want:

The logic of that last engraver seemed a little convoluted to me, so not wanting to leave well enough alone:)  I  came up with this:

\version "2.14.2"

suppressExtraTimeSig =
#(lambda (ctx)
  (let ((time-sig '()))

   `((acknowledgers
      (time-signature-interface
       . ,(lambda (engraver grob source-engraver)
           (set! time-sig (cons grob time-sig)))))

     (finalize
      . ,(lambda (trans)
          (reduce
            (lambda (elem prev)
              (if (equal? (ly:grob-property elem 'fraction)
                          (ly:grob-property prev 'fraction))
                  (begin
                    (ly:grob-suicide! elem)
                    prev)
                  elem))
              '()
              (reverse time-sig))
            (set! time-sig '()))))))


-David


reply via email to

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