lilypond-user
[Top][All Lists]
Advanced

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

Re: compound times and how to get back to normal ?


From: Kieren Richard MacMillan
Subject: Re: compound times and how to get back to normal ?
Date: Thu, 20 Apr 2006 07:58:47 -0400

Hi, Wim:

what is the correct way to go back to the normal notation
when this is embedded inside a piece.

I think you just need to:

1. Add \once before the \override; or,
2. Use \revert Staff.TimeSignature after the hack.

I've included sample code for both options below.

Best regards,
Kieren.

\version "2.8.1"
\layout{ragged-right = ##t}

#(define (compound-time grob one two num)
  (interpret-markup
   (ly:grob-layout grob)
   '(((baseline-skip . 2)
      (word-space . 2)
      (font-family . number)))
   (markup
    #:line ( #:column (one num) #:lower 1 "+" #:column (two num)))))

\markup { "Option 1" }

\relative
{
  \time 4/4
  \repeat "unfold" 3 { c4 c c c }
  \time 6/4
  \once \override Staff.TimeSignature #'stencil
        = #(lambda (grob) (compound-time grob "4" "2" "4"))
        #(override-auto-beam-setting '(end 1 8 5 8) 1 4)
  \repeat "unfold" 3 { c4 c c c c c }
  \time 4/4
  \repeat "unfold" 3 { c4 c c c }
}

\markup { "Option 2" }

\relative
{
  \time 4/4
  \repeat "unfold" 3 { c4 c c c }
  \time 6/4
  \override Staff.TimeSignature  #'stencil
        = #(lambda (grob) (compound-time grob "4" "2" "4"))
        #(override-auto-beam-setting '(end 1 8 5 8) 1 4)
  \repeat "unfold" 3 { c4 c c c c c }
  \revert Staff.TimeSignature #'stencil
  \time 4/4
  \repeat "unfold" 3 { c4 c c c }
}




reply via email to

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