2009/4/20 Reinhold Kainhofer <reinh...@kainhofer.com>: > Is there any way to position a dynamic sign at an explicit staff-relative (not > note-relative) vertical position?
Since the dynamic's X-parent is the notehead, you can normalize its position by retrieving the notehead's Y-offset: dynamicsAllInside = #(define-music-function (parser location offsetX shiftY) (number? number?) #{ \once \override DynamicText #'X-offset = $offsetX % \once \override DynamicLineSpanner #'Y-offset = #0 \once \override DynamicText #'Y-extent = #(cons 1 -1) \once \override DynamicLineSpanner #'Y-extent = #(cons 1 -1) \once \override DynamicText #'Y-offset = $(lambda (grob) (let* ((head (ly:grob-parent grob X)) (offset (ly:grob-property head 'Y-offset))) (- (/ shiftY 2) offset 0.75))) #}) Regards, Neil _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user