[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glissando
From: |
Aaron Hill |
Subject: |
Re: glissando |
Date: |
Mon, 01 Apr 2019 23:34:10 -0700 |
User-agent: |
Roundcube Webmail/1.3.8 |
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
- glissando, Gianmaria Lari, 2019/04/01
- Re: glissando, Colin Campbell, 2019/04/01
- Re: glissando, Aaron Hill, 2019/04/01
- Re: glissando, Gianmaria Lari, 2019/04/02
- Re: glissando, Gianmaria Lari, 2019/04/02
- Re: glissando, Gianmaria Lari, 2019/04/02
- Re: glissando, Aaron Hill, 2019/04/02
- Re: glissando, Gianmaria Lari, 2019/04/02
- Re: glissando,
Aaron Hill <=