David,

Thanks again.

Just after I posted my previous message I worked it out by myself! Now got 3 
pages of music down to one!

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-------------------------
Saturday, February 18, 2017, 5:37:39 PM, you wrote:

> On Sat, Feb 18, 2017 at 11:14 AM, Peter Toye <lilyp...@ptoye.com> wrote:
>> David, Jeffery,

>> Thanks again. But there's a slight problem: I didn't mention that I'm a
>> pianist, so have 2 separate staves with the same repeat pattern. The snippet
>> below shows some very interesting results, not least at the bar number
>> check.

>> \score {
>>  \new PianoStaff {
>>     \set Score.currentBarNumber=13
>>    <<
>>      \new Staff {
>>        \tempo 4 = 108
>>        \clef "bass"
>>        \time 4/4
>>        \key f \minor
>>        \repeatSect 4 {\rhPatternA } |
>>        \repeatSect  16 { \rhPatternA }
>>        \repeatSect  4 {\rhPatternB }
>>        \repeatSect 2 {\rhPatternA }
>>        R1
>>        \repeatSect 16 { \rhPatternA }
>>        \barNumberCheck 56
>>        \repeatSect 5 { \rhPatternB }
>>        \relative { c16 c bf c r4 r2 }
>>        \repeatSect 2 { \rhPatternB }
>>        \repeatSect 2 { \rhPatternA }
>>        R1
>>        \bar "||"
>>      }

>>      \new Staff {
>>        \clef "bass"
>>        \time 4/4
>>        \key f \minor
>>        \ottava #-1
>>        \repeatSect 4 {\lhPatternA } |
>>        \repeatSect  16 { \lhPatternA }
>>        \repeatSect 4 {\lhPatternB }
>>        \repeatSect 2 {\lhPatternA }
>>        R1
>>        \repeatSect 16 { \lhPatternA }
>>        \repeatSect 5 { \lhPatternB }
>>        \relative { c,16 c bf c r4 r2 }
>>        \repeatSect 2 { \lhPatternB }
>>        \repeatSect 2 { \lhPatternA }
>>        R1
>>      }
>>    >>
>>  }
>> }


> Calling repeatSect actually sets the current bar number.  Calling it
> separately in both staves results in those out of control numbers.

> A simple fix here would be to only call it in the top staff.  You
> don't get the bracket in the lower staff, but it isn't necessary.


> \score {
>  \new PianoStaff {
>     \set Score.currentBarNumber=13
>    <<
>      \new Staff {
>        \tempo 4 = 108
>        \clef "bass"
>        \time 4/4
>        \key f \minor
>        \repeatSect 4 {\rhPatternA } |
>        \repeatSect  16 { \rhPatternA }
>        \repeatSect  4 {\rhPatternB }
>        \repeatSect 2 {\rhPatternA }
>        R1
>        \repeatSect 16 { \rhPatternA }
>        \barNumberCheck 56
>        \repeatSect 5 { \rhPatternB }
>        \relative { c16 c bf c r4 r2 }
>        \repeatSect 2 { \rhPatternB }
>        \repeatSect 2 { \rhPatternA }
>        R1
>        \bar "||"
>      }

>      \new Staff {
>        \clef "bass"
>        \time 4/4
>        \key f \minor
>        \ottava #-1
>        \lhPatternA |
>        \lhPatternA
>        \lhPatternB
>        \lhPatternA
>        R1
>        \lhPatternA
>        \lhPatternB
>        \relative { c,16 c bf c r4 r2 }
>        \lhPatternB
>        \lhPatternA
>        R1
>      }
>    >>
>  }
> }

> %%

> HTH,
> David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to