[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Subtracting one from the measure number
From: |
David Kastrup |
Subject: |
Re: Subtracting one from the measure number |
Date: |
Wed, 26 Jun 2013 12:09:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
"Phil Holmes" <address@hidden> writes:
> I've got a piece of music that has a dotted bar and a (hidden) time
> signature change at a place where the bar number is not incremented.
> I know I could explicitly set the bar number to the new correct number
> (calculated number minus one) but is there a way of subtracting one
> from the existing bar number?
Probably less than pretty, but here you go:
{ \repeat unfold 40 c4
\applyContext #(lambda (c)
(set! (ly:context-property
(ly:context-find c 'Timing)
'currentBarNumber)
(1- (ly:context-property c 'currentBarNumber))))
\repeat unfold 40 c4
}
--
David Kastrup