[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \bendBefore
From: |
Nathan |
Subject: |
Re: \bendBefore |
Date: |
Tue, 28 Jan 2014 10:35:09 -0800 |
On Mon, Jan 27, 2014 at 12:38 PM, Xavier Noria <address@hidden> wrote:
> A web search shows \bendBefore is not implemented. I have tried some
> snippets found out there but failed to get the bends (using LilyJAZZ if that
> matters).
>
> I need the bend to indicate how to attack certain notes in saxophone scores.
>
> Does anybody have a modern snippet to share?
If you'll bear with me here, I find \bendAfter to be rather ugly and
not at all like the slides I've seen in jazz lead sheets. (For one, it
stops where the next note starts, usually creating a curve that's too
long or too short on the horizontal axis.) I prefer a different
approach to bends, which looks nicer and is also easily extensible to
something like a \bendBefore.
Anyways, something like the following has served me well:
#(define (scoop-stencil grob)
(ly:stencil-add
(ly:note-head::print grob)
(grob-interpret-markup grob
(markup #:with-dimensions '(0 . 0) '(0 . 0)
#:translate '(-0.2 . -0.5)
#:path 0.25 '((moveto 0 0)
(curveto 0 -1 -1 -1.5 -1.5 -1.5))))))
scoop = \once \override NoteHead #'stencil = #scoop-stencil
\new Staff { \scoop c''4 }
The bend has fixed size and position. That's usually good enough for
me, but if you require many bends of different sizes, this should be
adapted into a music function.
(SMuFL has a bunch of nice pre-built bend glyphs; you can also use
those if you wish.)
Regards,
Nathan