Comment #3 on issue 1127 by [email protected]: Piano staff centred dynamics
http://code.google.com/p/lilypond/issues/detail?id=1127

Attached is a hand-engraved example of centred dynamics from a piano score [1]. The individual dynamic marks are centred between the skylines by shifting the baseline as needed. In contrast, the current behaviour [2] uses a Dynamic context that aligns every dynamic to the same baseline, often forcing the music to take up much more space than necessary.

In principle, the desired output could be achieved by using the adjacent system skylines to vertically position the grobs within a Dynamic context and then the existing vertical layout can still be used to position the context between the staves (afinity = #CENTER). The vertical positioning would be taken from the average of the two skyline offsets, e.g. if the right-hand music takes up 3 spaces below its staff, and the left-hand music takes up one space above its staff, the dynamic at that position should be shifted down one space from its default position.
  ((-3) + (+1)) / 2 = -1
The tricky part is that the upper and lower staves must be laid out before the dyanamics, and the Dynamics engraver must have access to those skylines.

At least, that's how I understand this issue.

-Andrew


[1] Beethoven, Sonata 13, Edition Peters. <http://imslp.org/wiki/Special:ImagefromIndex/30364> This edition is also an excellent example of dynamics that intentionally impinge on the staff lines to allow tighter page layout.

[2] e.g. http://lilypond.org/doc/v2.14/Documentation/learning/piano-templates

Attachments:
        piano-centred-dynamics.png  23.6 KB


_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to