lilypond-user
[Top][All Lists]
Advanced

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

Re: Bar counts and repeats in repetitive music


From: David Nalesnik
Subject: Re: Bar counts and repeats in repetitive music
Date: Sat, 18 Feb 2017 11:37:39 -0600

On Sat, Feb 18, 2017 at 11:14 AM, Peter Toye <address@hidden> 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



reply via email to

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