ssb22 / jianpu-ly

Jianpu in Lilypond
http://ssb22.user.srcf.net/mwrhome/jianpu-ly.html
Apache License 2.0
70 stars 18 forks source link

barcheck fail: note crosses barline when repeating #45

Closed suntong closed 10 months ago

suntong commented 11 months ago

Please take a look

4/4,4

KeepLength

R{
1' 5. q3 c3 1   2. q1 c2 3

} A{
1. q1 c6, 5, 5, - - %|
%1. q1 c6, 5, 5, - -
}

It works, but when uncommenting those "%" then I'll get

Error: (notesHad=1 5 3 3 1 2 1 2 3 1 1 6 5 5 - - 1) barcheck fail: note crosses barline at "1" with 0 beams (24 skipped from 48 to 72, bypassing 64), scoreNo=1 barNo=5 (but the error could be earlier)

This looks like a bug to me, or ...? Thanks.

ssb22 commented 11 months ago

Yes it's a bug, it's not resetting notehead_markup.barPos in the repeatStack and repeatStack[-1][0] part, which means the bar-check gets thrown off if you end the first-time on an incomplete bar (which you're doing here because of a pickup). I'll try to fix this later, meanwhile you can just comment out the line of code with barcheck fail in it and it should work (although if you then run that version on input with any real barcheck errors, it won't pick them up and you'll get Lilypond warnings and messed-up output)

suntong commented 11 months ago

Ok, will do. thx, take your time.

suntong commented 11 months ago

Hmm... Having disabled this line

https://github.com/ssb22/jianpu-ly/blob/696c9f5e6b21ff8c3b42cc12ad44d0fcf9780545/jianpu-ly.py#L527

I now get:

Error: Incomplete bar at end of score 1 (pos 32)

So I think I'll wait for your official fix.

suntong commented 10 months ago

yes, problem fixed! Hope #46 can be fixed soon as well. thx.