bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

\autoChange behaves inconsistently when rests are present


From: Gilberto Agostinho
Subject: \autoChange behaves inconsistently when rests are present
Date: Sat, 8 Apr 2023 18:39:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

Hi all,

I've came across a strange bug with \autoChange which was not present in version 2.22.2 but is present in version 2.24.1 (and was probably introduced somewhere in between these two versions). Basically, autoChange will sometimes change staves inconsistently and display some notes in the wrong staff depending on whether a)rests are present in the preceding music, or b) whether the affected note is the last one of the staff, in which case it seems to behave normally. It seems like a complex behaviour and I haven't been able to pin it down completely, but here are two screenshots showing the output of the two versions.

Version 2.22.2: https://i.postimg.cc/bvnV7JKG/ly2-22-2.png
Version 2.24.1: https://i.postimg.cc/B6G7430m/ly2-24-1.png

The example used is:

   \new PianoStaff {
      \autoChange {
        g4 a b c'
        d'4 r a g
        g4 c' d' e'
      }
    }
    \new PianoStaff {
      \autoChange {
        g4 a b c'
        d'4 r a g
        g4 c' d' e'
        g4 c' d' e'
      }
    }
    \new PianoStaff {
      \autoChange {
        g4 a b c'
        d'4 g a g
        g4 c' d' e'
        g4 c' d' e'
      }
    }
    \new PianoStaff {
      \autoChange {
        g4 a b c'
        d'4 r a g
        g4 c' d' e'
        R1
        g4 c' d' e'
      }
    }

The behaviour in 2.22.2 is exactly as expected, with changes happening around middle C by default; C4's stay in the current staff of previous notes, and rests are placed in the staff corresponding to the next pitched note.

The list of issues in version 2.24.1 in my minimal example are:

 * Stave 1: due to the presence blue rest, the next C4 is placed in the
   wrong staff. Notice how the last E4 is correctly place for now
 * Stave 2: once again, due to the rest present, the C4s are
   incorrectly placed, and so is now the E4 (which is not the last note
   of the staff any longer)
 * Stave 3: there are no rests any more, so the behaviour is as
   expected and identical to version 2.22.2
 * Stave 4: once again, the presence of rests messes some notes up,
   this time also affecting the G4 in the final bar


Best wishes,
Gilberto


reply via email to

[Prev in Thread] Current Thread [Next in Thread]