Updates: Owner: percival.music.ca Comment #1 on issue 355 by markpolesky: \repeat bar lines get messed up http://code.google.com/p/lilypond/issues/detail?id=355
Neither of these workarounds is fully sufficient. The \partial command seems to have the effect of nullifying the "reset" properties of the preceding barline, while still printing it. I can see at least three consequences of this: 1) The currentBarNumber value doesn't get incremented at the moment where the \partial command was issued. 2) The bar number will only print when the value passed to the \partial command is "moment 0". 3) Any notes following the \partial command behave as if they are part of the previous measure, eg. accidentals are wrongly suppressed if they are found in the previous measure. To demonstrate this, I've modified the above workarounds: To the top of each relative block, add: \override Score.BarNumber #'break-visibility = #'#(#f #t #t) Change the following notes to "fis": 1) the last note of the \repeat block, and 2) the first note of the first \alternative block, and 3) the first note of the second \alternative block. So the first workaround becomes: \new Staff \relative { \override Score.BarNumber #'break-visibility = #'#(#f #t #t) \partial 4 \repeat volta 4 { e4 | c2 d2 | e2 fis2 | } \alternative { { fis4 g g } { \partial 4*0 fis4 a a a } } a b2. } and the second workaround becomes: \new Staff \relative { \override Score.BarNumber #'break-visibility = #'#(#f #t #t) \partial 4 \repeat volta 4 { e4 | c2 d2 | e2 fis2 | } \alternative { { \partial 4*3 fis4 g g } { fis4 a a a } } a b2. } Now the first one, at the start of the last ending: 1) fails to print the accidental, and 2) fails to increment the currentBarNumber sign And the second one, at the start of the first ending: 1) fails to print the accidental, 2) fails to increment the currentBarNumber, and 3) fails to print the bar number (since the moment is not 0) Currently the docs suggest workaround #2 above: NR 1.4.1 Long repeats * Normal repeats And this may have misled at least one user recently: http://lists.gnu.org/archive/html/lilypond-user/2010-05/msg00037.html Of the two workarounds, #1 (with the "\partial 4*0") is superior, since it causes every measure to start with a "0" moment. Until someone makes the \partial command smarter, I think we should make this a known issue and recommend forcing the affected accidentals with "!". And here's a workaround to force the bar number to increment, using a function (to be entered immediately after the \partial command): incrBarNum = \applyContext #(lambda (x) (ly:context-set-property! (ly:context-find x 'Score) 'currentBarNumber (+ 1 (ly:context-property x 'currentBarNumber)))) And here's the example rewritten with both workarounds: \new Staff \relative c' { % \override Score.BarNumber #'break-visibility = #'#(#f #t #t) \partial 4 \repeat volta 4 { e4 | c2 d2 | e2 fis2 | } \alternative { { % do not use \partial here fis4 g g % do not use a bar check here } { \partial 4*0 \incrBarNum fis!4 a a a | } } a b2. | } One thing I can't figure out is how to get the bar number for measure 1 to print. If anyone knows, let me know. Should I incorporate this in the docs? Would someone like to comment on the feasibility of making the \partial command smart enough to render these workarounds unnecessary? - Mark Attachments: partial.png 19.0 KB _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond