[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiple timesignatures
From: |
Matthew Collett |
Subject: |
Re: multiple timesignatures |
Date: |
Sat, 23 Jul 2011 10:57:57 +1200 |
On 23/07/2011, at 6:26 am, Ruud van Silfhout wrote:
> I saw that in January of this year a new feature called compoundTime
> signatures
> is introduced in Lilypond. A good effort. compoundTime specified the timing
> of
> each measure. However, for church music (esp. hymns) this does not suffice.
> What
> you see there is that multiple meters are specified a the start of the music.
> This means that the of a song each measure is in one of the initial meters.
Here's how I've been doing it:
\version "2.14.1"
\language "english"
#(define ((dual-time one two denom) grob)
(grob-interpret-markup grob
(markup #:override '(baseline-skip . 0) #:number
(#:line ( (#:column (one denom)) (#:column (two denom)) ) )
)
)
)
dualTime = #(define-music-function (parser location num1 num2 denom) (string?
string? string?) #{
\once\override Staff.TimeSignature #'stencil = #(dual-time $num1 $num2
$denom)
\once\revert TimeSignature #'break-visibility
#})
\layout {
indent = 0.0\cm
\context {
\Staff
\override TimeSignature #'break-visibility = #all-invisible
}
}
\score {
\new Staff \relative { \clef "treble_8" \key f \major
\dualTime "4" "6" "4" \time 4/4 f,2 c'4 c d e f2 |
f2 e4 d c b c2 |
\time 6/4 a2 a4 f bf a \time 4/4 g g f2 \bar"||"
c'2 c4 d c bf a2 |
a2 c4 c bf a g2 |
\time 6/4 a2 bf4 a f a \time 4/4 g g f2 \bar"|." }
}
The tricky bit of Scheme to make the time signature is cribbed from the
"Compound time signatures" snippet that predated the new feature (and is still
the way the 2.14 documentation says to do it!). Other than that, the general
idea is just to suppress the printing of time signatures except where you
explicitly ask for them. It would be nicer for the syntax to be something like
\dualTime 4/4 6/4
without having to quote every number, but it does the job.
Best wishes,
Matthew