see attached file.
Oh sorry.
I send a not cleaned file.
Please, take this one instead.
Gilles
myfunction = #(define-music-function (parser location event-chord numx)
(ly:music? number?)
#{
\once \override TextScript #'outside-staff-priority = ##f
\once \override TextScript #'X-offset = $numx
\once \override TextScript #'Y-offset =
#(lambda (grob)
(let* ((paper-col (ly:grob-parent grob X))
(elts (ly:grob-object paper-col 'elements))
(rhythmic-head grob))
(for-each
(lambda (idx)
(let ((elt (ly:grob-array-ref elts idx)))
(if (grob::has-interface elt 'rhythmic-grob-interface)
(set! rhythmic-head elt))))
(reverse (iota (ly:grob-array-length elts))))
(- (/ (ly:grob-staff-position rhythmic-head) 2) ; well, don't know why
; we have to divide by 2?
(interval-center
(ly:grob-robust-relative-extent grob grob Y)))))
$event-chord
#})
\score{
\relative c'{
\myfunction c1-\markup{\sans "<-"} #3
\myfunction g'1-\markup{\sans "<-"} #3
\myfunction c1-\markup{\sans "<-"} #3
}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user