https://codereview.appspot.com/554030043
Originally created by: *anonymous
Originally created by: k-ohara5...@oco.net
Sometime since ver 2.18, dynamics on skips began to make cross-staff stems point the wrong way. The ledger line seems to be necessary for the bug.
up = \change Staff = "up"
dn = \change Staff = "down"
\new PianoStaff \transpose c c' << \time 2/4
\new Staff = "up"
s2
\new Staff = "down" <<
{s8*3 s8\p }
{ g8[ \up e \dn g \up c] } >> >
Originally posted by: k-ohara5...@oco.net
There is a bunch of discussion in issue 3363 issue 3385 issue 3503 on how cross-staff things work.
'cross-staff' has come to mean that, as staves are stretched across the page. the object changes shape or position relative to its parent staff. Staff-spacing ignores cross-staff objects, trusting those objects to find what room they can after staff-spacing.
Dynamics in the same voice as the note they attach to, if the note has a cross-staff stem, are themselves cross-staff. Dynamics attached to a spacer, as in this example, should probably not be marked cross-staff.
Probably the change to make dynamics align to note-columns (maybe issue 3254 ?) causes the dynamic placement to find the x-extent of the note-column, which sometimes (chords with a second) depends on stem direction. Usually a cross-staff stem will refuse to commit to a direction, but here something went wrong and the stem attachment point was set wrongly.
Related
Issues:
#3254Issues:
#3363Issues:
#3385Issues:
#3503Originally posted by: k-ohara5...@oco.net
> Usually a cross-staff stem will refuse to commit to a direction,
Oops, that's not true. The layout code follows conventions to avoid looking up the direction of a stem, using get_property_data() instead of get_property() and the various 'pure' versions of functions. There is a leak in those conventions.
I have not found a reasonable way to have the Dynamic 'p' ask for the center of the chord above it "but don't go to the trouble of figuring out cross-staff stem directions" without adding several more 'pure' flags.
I just tried having cross-staff Stems pick a default direction, and then re-computing the directions after line breaking. Some of the stem attachment points to noteheads are then wrong, having depended on the tentative direction of the Stem.
Originally posted by: k-ohara5...@oco.net
At the moment I have trouble seeing how this worked before. The horizontal constraints on spacing notes on a line depend on, and for chords with seconds that depends on whether the stem points up or down, but the stem direction can potentially depend on staff spacing, which depends on how many notes fit on each line.
up = \change Staff = "up"
dn = \change Staff = "down"
\new PianoStaff <<
\new Staff = "up" {
\time 2/4 s2 }
\new Staff = "down" <<
{s8*3 s8\p }
{\clef bass a,8[ \up e' \dn a, \up <c' d' g'>] } >> >>
Workaround: \once\voiceTwo or as appropriate, before any misplaced stems
Data point: occurred between 2.19.6 and 2.19.11
Following a bisection, I can state that the patch in Issue 3978 caused this issue.
Issue 4182: avoid checking the offset of cross-staff stems too early
Calculating the 'X-offset of a cross-staff Stem too early causes the
Stem's 'direction property to be accessed while it is still
"calculation-in-progress" - always returning "UP". This causes the
X-offset to be set incorrectly when the eventual stem direction will be
"DOWN".
This problem occurs in the scenario where the X-offset of a notehead is
calculated early, when NoteHead::stem_x_shift calls
Stem::calc_positioning_done (via get_property).
Update NoteHead::stem_x_shift to only check a stem's "positioning-done"
property if it is not cross-staff. This will prevent the above scenario
from triggering the problem. The Stem's offset will be calculated again
later anyway, and this does not change the return value of
NoteHead::stem_x_shift as it always returns 0.
Add a suitable regression test.
https://codereview.appspot.com/554030043
Diff:
Passes make, make check and a full make doc.
reg rest diffs attached
Fix texidoc style issues in cross-staff-stem-offset.ly
https://codereview.appspot.com/554030043
Passes make, make check and a full make doc. (reg test diffs as commend above)
Patch on countdown for May 11th
Fix style issues
https://codereview.appspot.com/554030043
Passes make, make check and a full make doc. (reg test diffs as commend above)
Oh no, this should not have worked! Please use GitLab
In case you can read this, I still haven't figured out the right way to disable write access...