Looks like adding "|" = \bar "|" before the PianoStaff solves the
issue. Don't ask me why.
Hope this helps,
Jean Brefort
Le jeudi 11 septembre 2025 à 14:35 +0200, Volodymyr Prokopyuk a écrit :
> Hi,
>
> How to correctly place bar lines when using a compound meter?
>
> I want
>
> image.png
> The code
>
> \version "2.25.28"
> \new PianoStaff = bayan <<
> \new Staff = rightHand {
> \relative {
> \tempo Adagio
> \clef treble
> \key e \minor
> \compoundMeter #'((4 4) (2 4))
> b=4(\p g' fis8 a g fis | e2) | b4( g' a8 g fis d | g2) |
> }
> }
> \new Staff = leftHand {
> \relative {
> \clef bass
> \key e \minor
> }
> }
> > >
>
> renders without bar lines after \time 4/4
> image.png
>
>
> and gives this error
>
> warning: bar check failed at: 1
> b=4(\p g' fis8 a g fis
> | e2) | b4( g' a8 g fis d | g2) |
>
> Thank you,
> Vlad