On Mon 12 Oct 2020 at 14:46:43 (-0700), Knute Snortum wrote:
> On Mon, Oct 12, 2020 at 10:03 AM Aaron Hill <[email protected]> wrote:
> > On 2020-10-12 9:56 am, Knute Snortum wrote:
> > >
> > > I think I've run into a bug. It's hard to explain so I will post the
> > > MWE (it's as minimal as I could make it):
> > >
> > > %%% Start
> > > \version "2.20.0"
> > >
> > > rightHand = \relative c' {
> > > \partial 4 c4
> > > c4 c c
> > >
> > > \repeat volta 2 {
> > > c4 |
> > > c4 c c c |
> > > }
> > > \alternative {
> > > { c4 c c }
> > > { c4 c c c }
> > > }
> > >
> > > c1 |
> > > }
> > >
> > > \score {
> > > \new Staff \rightHand
> > > \midi {
> > > }
> > > }
> > > %%% End
> > >
> > > The c1 at the end of the music produces a bar line check warning. It
> > > only happens when creating a MIDI file. It only happens when the volta
> > > is in the middle of the measure. It only happens when an alternate
> > > ending doesn't contain a full measure of notes.
> > >
> > > Any thoughts? I really appreciate you guys.
> >
> > Don't you need to \unfoldRepeats when doing MIDI output?
> >
> > %%%%
> > \score {
> > \new Staff \unfoldRepeats \rightHand
> > \midi { }
> > }
> > %%%%
>
> Thanks, Aaron Hill. The only problem is this messes up my \barNumberChecks
>
> %%% Start
> \version "2.20.0"
>
> rightHand = \relative c' {
> \partial 4 c4
> c4 c c
>
> \repeat volta 2 {
> c4 |
> c4 c c c |
> }
> \alternative {
> { c4 c c }
> { c4 c c c }
> }
>
> \barNumberCheck 5
> c1 |
> }
>
> \score {
> \new Staff \rightHand
> }
>
> \score {
> \new Staff \unfoldRepeats \rightHand
> \midi {
> }
> }
> %%% End
Your \barNumberCheck, as you placed it, should be expecting 4 or 6,
as in the attached, but not 5. A \barNumberCheck placed at the
barline should be set to the number of the next measure, not the
previous one.
However, I agree that LP's a bit messy when you generate MIDI with
folded repeats, which is something I regularly do in order to
proof-read by ear. In this case, you get the barcheck shown by
your version at the top of the quote above.
My workaround is the same as previously: generate the MIDI first,
then the score. My \barNumberChecks are naturally set to agree with
the printed/folded bar numbers, so all the noise goes into the
MIDI part of the console log, and the \layout part should be clean.
Cheers,
David.
rightHand = \relative c' {
\partial 4 a4
b4 c d
\repeat volta 2 {
e4 |
f4 g a b |
}
\alternative {
{ c4 d e }
{ f4 g a b }
}
\barNumberCheck #4 \barNumberCheck #6
c1 |
}
\layout {
\context {
\Score
\override BarNumber.break-visibility = #end-of-line-invisible
barNumberVisibility = #(every-nth-bar-number-visible 1)
}
}
\score {
\new Staff \unfoldRepeats \rightHand
\layout { }
}
\score {
\new Staff \rightHand
\layout { }
}
\score {
\new Staff \rightHand
\midi { }
}
\score {
\new Staff \unfoldRepeats \rightHand
\midi { }
}