hi jonatan and han-wen,

works just right.

is the language for the definitions scheme? is the syntax lilypond-specific? where would i look to learn a bit on my own about the syntax and structure of such definitions and its integration into lilypond? (is it in the documentation on the lilypond website?)

thanks!

-sean

--------------------------------------------
Sean Reed
Hamburg, Germany
Web: www.seanreed.de

On 02.05.2005, at 05:13, Jonatan Liljedahl wrote:

There was someone who requested a cross on the stems a while ago, and I
posted something which might be what your want. Try this:

%%% tested with 2.5.18 %%%
#(define (cross-callback callback)
   (define (cross-stencil grob)
     (let* ((cross (ly:font-get-glyph
              (ly:get-default-font grob) "noteheads.s2cross"))
            (s (callback grob))
            (sx (ly:stencil-extent s 0))
            (sy (ly:stencil-extent s 1))
            (cx (ly:stencil-extent cross 0))
            (xadj (/ (interval-length cx) 2))
            (midy (+ (car sy) (/ (interval-length sy) 2))))
        (set! s (ly:stencil-add s
            (ly:stencil-translate cross (cons (- xadj) midy))))
       (ly:make-stencil (ly:stencil-expr s) sx sy)))
   cross-stencil)

stemCrossStart = \override Stem  #'print-function
    = #(cross-callback Stem::print)
stemCrossStop = \revert Stem #'print-function





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

Reply via email to