On Mon, Jan 7, 2013 at 5:25 PM, David G
<address@hidden> wrote:
What's the best way to achieve this in 2.16? I couldn't work out a way to change the numbers generated by the PercentRepeatCounter. Alternatively if there is an easy way to manually insert a number 1 centred on the first bar at the correct height, that would be fine. I tried using markup above the invisible rest but this was not centred.
You could do it by creating a full-measure rest in the first measure of the count, changing the property `restNumberThreshold' to zero (so that a number will be printed on a rest lasting a single bar), hiding the rest, and then altering properties of the number to match the ones from the percent repeat count. (I forget where I learned of this trick.)
Here's what I come up with:
\new Staff <<
\context Voice = "foo" {
\clef bass
c4 r g r
c4 r g r
c4 r g r
c4 r g r
}
\context Voice = "foo" {
\set countPercentRepeats = ##t
\override PercentRepeat #'transparent = ##t
\override PercentRepeatCounter #'staff-padding = #1
\repeat percent 4 { s1 }
}
\context Voice = "firstnum" {
\set restNumberThreshold = #0
\override MultiMeasureRest #'transparent = ##t
\override MultiMeasureRestNumber #'staff-padding = #1
\override MultiMeasureRestNumber #'font-size = #-2
R1
}
>>
-David