Strange bar check error

Thomas Morley <[email protected]> Mon, 3 Aug 2026 10:09:39 +0200
Newsgroups gmane.comp.gnu.lilypond.devel
Message-ID <CABsfGyXMOszazHpfdwgcFGU092Tj6KDwSH7GeBtUGLKUc9-Jyw@mail.gmail.com>
Hi,

this came up in the german forum.

Below returns a bar check error as soon as \midi is uncommented.

\version "2.27.2"

\score {
  \relative c' {
    \partial 4
    \repeat volta 2 {
      e4 | e1 |
    } \alternative { { d2. } { d1 | } } }
  \layout { }
  %\midi {}
}

Same problem if \midi is added to our regtest
/input/regression/bar-check-parallel-alternative-ok.ly

Probably, it could be fixed by deleting `measureLength` from the list
for `alternativeRestores`:

  \midi {
    \context {
      \Score
      alternativeRestores = #'(measurePosition measureStartNow lastChord)
    }
  }

Should this be the default for \midi ?

Cheers,
  Harm