Hi Thibault, hi Carl, Carl, your workaround's find but the hidden stem and flag could affect the staff-staff spacings. (A hidden whole/half note would affect the horizontal spacing) E.g. :
\version "2.22.0" \new PianoStaff << \new Staff << \relative { e'16 f g e e f g e } \\ d'2 >> \new Staff { \clef bass e8 g e c } >> \new PianoStaff << \new Staff << \relative { e'16 f g e e f g e } \\ d'2 s >> \new Staff { \clef bass << { \hideNotes f16 } \\ { e8 g e c } >> } >> % vs: \new PianoStaff << \new Staff << \relative { e'16 f g e e f g e } \\ d'2 s >> \new Staff { \clef bass << { \hideNotes\omit Stem f4 } \\ { e8 g e c } >> } >> % vs: \new PianoStaff << \new Staff << \relative { e'16 f g e e f g e } \\ d'2 s >> \new Staff { \clef bass << { \hideNotes f1 } \\ { e8 g e c } >> } >> BTW, one basic question : is it a convention that an alto voice be align to the lower voice ? Cheers, Pierre Le mar. 2 févr. 2021 à 19:28, Thibaut Horel <thibaut.ho...@gmail.com> a écrit : > When trying to typeset the attached bit of music (this is bar 18 of the > Fugue in BWV 881), I encountered a problem captured by the following > minimal example: > > ------ > \version "2.22.0" > \new PianoStaff << > \new Staff << \relative{e'16 f g e} \\ d'4 >> > \new Staff { \clef bass e8[ g] } > >> > ------ > > In this example, I would like the e8 in the lower staff to be aligned > with the d4 in the upper staff. However, because of a note head > collision, the d4 in the upper staff is shifted to the right, and the e8 > from the lower staff is instead aligned with the e16 in the upper staff. > > I was able to obtain the correct behavior by adding \once\override > NoteColumn.X-offset = 1.25 before the e8 in the lower staff. But there > are two things I don't like about this solution: > > 1. if I understand correctly, X-offset is measured in staff-space, so I > am worried this might not scale properly when changing the note head > size (for example by using a different font). It would be nicer to be > able to express the offset in note head width, as for the force-hshift > property for example. > > 2. My solution requires trial and error to find the correct value for > the X-offset, whereas what I am trying to achieve can be expressed > easily at the semantic level: I would like the e8 in the lower staff to > be considered part of the second voice of the upper staff for vertical > alignment purposes (in particular it should be shifted at the same time > in case of a collision). > > Is there a better way to achieve what I am trying to do? Any insight > into this problem would be greatly appreciated. > > Thanks, > Thibaut > >