lilypond-user
[Top][All Lists]
Advanced

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

Re: Any way to turn of "strange time signature found" warnings?


From: Neil Puttock
Subject: Re: Any way to turn of "strange time signature found" warnings?
Date: Tue, 31 May 2011 22:46:34 +0100

On 12 May 2011 19:42, Trevor Bača <address@hidden> wrote:

> Is there any way to turn these warnings off?

It's a bit convoluted, but you could redefine the
Time_signature_engraver in Scheme, removing the warning:

\version "2.15.0"

#(define (funky-time-signature-engraver ctx)
   (let ((time-signature '())
         (last-fraction #f))
     `((process-music
        . ,(lambda (trans)
             (let ((frac (ly:context-property ctx 'timeSignatureFraction)))
               (if (and (null? time-signature)
                        (not (equal? last-fraction frac))
                        (pair? frac))
                   (begin
                     (set! time-signature
                           (ly:engraver-make-grob trans 'TimeSignature '()))
                     (set! (ly:grob-property time-signature 'fraction) frac)

                     (and (not last-fraction)
                          (set! (ly:grob-property time-signature
'break-visibility)
                                (ly:context-property ctx
'implicitTimeSignatureVisibility)))

                     (set! last-fraction frac))))))

       (stop-translation-timestep
        . ,(lambda (trans)
             (set! time-signature '()))))))

\layout {
  \context {
    \Staff
    \remove "Time_signature_engraver"
    \consists #funky-time-signature-engraver
  }
}

\relative c' {
  \time 5/6
  c4*2/3 d e f g
}

Cheers,
Neil



reply via email to

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