On 2019-04-01 11:19 pm, Gianmaria Lari wrote:
AAron, is there any way to move the bend code outside the score part?
That's almost always possible. Here it is wrapped up in a custom event
function:
%%%%
\version "2.19.82"
zigzagBendAfter = #(define-event-function (steps) (number?)
(define (zigzag-stencil grob)
(let* ((sten (bend::print grob))
(xex (ly:stencil-extent sten X))
(yex (ly:stencil-extent sten Y)))
(ly:grob-set-property! grob 'style 'zigzag)
(ly:grob-set-property! grob 'thickness 1)
(ly:line-interface::line grob
(car xex) (cdr yex) (cdr xex) (car yex))))
#{ -\tweak stencil #zigzag-stencil -\bendAfter $steps #} )
\fixed c'' { c \zigzagBendAfter #-6 d e f }
%%%%
I switched from grob-transformer to explicitly referencing bend::print.
This is probably a little safer, since one can then override BendAfter's
stencil to something else as needed without impacting this zigzag
variant.
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user