David Nalesnik <david.nalesnik <at> gmail.com> writes: > Attempting to put dynamics above cross-staff notes using the code below leads to some awful collisions.
LilyPond postpones deciding the placement of things that cross staves, until the staff-spacing is known. A minor variation of your example, with the notes a little closer together, might need to be set with the stems all up, if the music is on a page with tight spacing between staves, and then the accent would go below the note, but the slur would need to clear the beam. Some of the postponed placements collide with other objects, because so far we haven't worked out all the interdependencies between placements of objects. The manual suggests telling LilyPond how far to put the dynamics from the nearest staff. http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for- keyboards#changing-staff-manually The "My pure_y_common.. might contain several staves" indicates an unsolved problem that LilyPond can't figure out which Staff needs to get space around it to place the dynamics. When that error appears, the dynamics might hit another staff, so I would use : up = \change Staff = "up" dn = \change Staff = "down" \new PianoStaff << \new Staff = "up" { \once\override DynamicLineSpanner #'padding = #5 s8*7^\p^\< s8^\f } \new Staff = "down" { e'8[ ( \up b' \dn g' \up d'' \dn b' \up f'' \dn d'' \up a''\marcato\fermata]) } >> %% Just as an experiment, this is my best attempt %% to help LilyPond make the placement decisions on her own \new PianoStaff << \new Staff = "up" { s8*7^\p^\< s8^\f } \new Staff = "down" { e'8[ ( \up b' \dn g' \up d'' \dn b' \up f'' \dn d'' \up \once \stemDown \once \override Script #'cross-staff = ##f a''-\tweak #'avoid-slur #'ignore \marcato -\tweak #'avoid-slur #'ignore \fermata]) }>> _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user