lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

battuto definition-- stem print-function change?


From: Sean Reed
Subject: battuto definition-- stem print-function change?
Date: Mon, 11 Jun 2007 19:25:16 +0100

Hi,

I had used a snip of code sent to me by someone on the the list a while back (Jonatan Liljedahl?) to create an x on stems for battuto marking, and it no longer seems to work.

Has there been a syntax change in the Stem print-function?
Could anybody suggest a way to get something like this to work again?

This was the old code:
%%% 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

This is the goal:

image/pict


I'm currently using 2.11.26 on MacIntel with 10.4.9.

Thanks,
Sean



-------------------------
Sean Reed
Dublin
www.seanreed.ie





reply via email to

[Prev in Thread] Current Thread [Next in Thread]