[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: \bendBefore
From:       Xavier Noria <fxn () hashref ! com>
Date:       2014-01-28 22:12:15
Message-ID: CAM=Ycdj5tZqCme5PQZ_qTbdJWkhAZiC07a0815N4q9JXTtby9Q () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jan 28, 2014 at 7:35 PM, Nathan <when.possible@gmail.com> wrote:

On Mon, Jan 27, 2014 at 12:38 PM, Xavier Noria <fxn@hashref.com> 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.
>

Works like a charm, thanks very much!

[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 28, 2014 \
at 7:35 PM, Nathan <span dir="ltr">&lt;<a href="mailto:when.possible@gmail.com" \
target="_blank">when.possible@gmail.com</a>&gt;</span> wrote:</div>

<div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div \
class="h5">On Mon, Jan 27, 2014 at 12:38 PM, Xavier Noria &lt;<a \
href="mailto:fxn@hashref.com">fxn@hashref.com</a>&gt; wrote:<br>


&gt; A web search shows \bendBefore is not implemented. I have tried some<br>
&gt; snippets found out there but failed to get the bends (using LilyJAZZ if that<br>
&gt; matters).<br>
&gt;<br>
&gt; I need the bend to indicate how to attack certain notes in saxophone scores.<br>
&gt;<br>
&gt; Does anybody have a modern snippet to share?<br>
<br>
</div></div>If you&#39;ll bear with me here, I find \bendAfter to be rather ugly \
and<br> not at all like the slides I&#39;ve seen in jazz lead sheets. (For one, \
it<br> stops where the next note starts, usually creating a curve that&#39;s too<br>
long or too short on the horizontal axis.) I prefer a different<br>
approach to bends, which looks nicer and is also easily extensible to<br>
something like a \bendBefore.<br>
<br>
Anyways, something like the following has served me well:<br>
<br>
#(define (scoop-stencil grob)<br>
   (ly:stencil-add<br>
      (ly:note-head::print grob)<br>
      (grob-interpret-markup grob<br>
         (markup #:with-dimensions &#39;(0 . 0) &#39;(0 . 0)<br>
                     #:translate &#39;(-0.2 . -0.5)<br>
                     #:path 0.25 &#39;((moveto 0 0)<br>
                                          (curveto 0 -1 -1 -1.5 -1.5 -1.5))))))<br>
<br>
scoop = \once \override NoteHead #&#39;stencil = #scoop-stencil<br>
<br>
\new Staff { \scoop c&#39;&#39;4 }<br>
<br>
The bend has fixed size and position. That&#39;s usually good enough for<br>
me, but if you require many bends of different sizes, this should be<br>
adapted into a music function.<br></blockquote><div><br></div><div>Works like a \
charm, thanks very much!<br><br></div></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic