bends before notes... how to?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bends before notes... how to?

Daniele Russo
Hi,

Although I searched the entire guide and reference, I wasn't able to find a command or to elaborate a trick to write a little up-bend before a note. Can you help me?

_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bends before notes... how to?

Kieren MacMillan
Hi Daniele,

> I wasn't able to find a command or to elaborate a trick to write a  
> little up-bend before a note. Can you help me?

How about

     \once \override BendAfter #'extra-offset = #'(-2.9 . -1.2)  
\bendAfter #2 c''

where the specific values are adjusted to your taste.

Hope this helps!
Kieren.


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bends before notes... how to?

v.villenave
2007/7/15, Kieren MacMillan <[hidden email]>:

> where the specific values are adjusted to your taste.

It would be better if this could be used as many times as one wants
without having to tune it everytime...
I wrote a small code (my first try with Scheme!) to get an automatic
\bendBefore command. It's a very dirty hack, but it works.

Unlike \bendAfter, you have to use with curly braces:

\bendBefore #number { note }

If anyone can correct and improve my code, once it's done I'd like to
add it to the LSR (many people seem to be looking for a \bendBefore
command, the question was already asked in 2002!).

Regards,
Valentin

%%%%%% snippet %%%%%%


#(define (make-bend x)
   (make-music 'BendAfterEvent
               'delta-step x))

bend =
#(define-music-function (parser location delta) (integer?)
        (make-bend (* -1 delta)))

bendBefore  =
#(define-music-function (parser location argument) (integer?)
#{ \once \override BendAfter #'rotation = #'(180 -1 -1)
\bend #$argument  #} )
       

{
        c'1\bendAfter #5 e'1 d' \bendBefore #5 { e' }
}


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bends before notes... how to?

v.villenave
> Unlike \bendAfter, you have to use with curly braces:

Nope, it even works without it!
So you can use \bendBefore exactly the same way you use \bendAfter

Hope this helps!
Valentin

%%%%%% snippet %%%%%%


#(define (make-bend x)
   (make-music 'BendAfterEvent
               'delta-step x))

bend =
#(define-music-function (parser location delta) (integer?)
        (make-bend (* -1 delta)))

bendBefore  =
#(define-music-function (parser location argument) (integer?)
#{ \once \override BendAfter #'rotation = #'(180 -1 -1)
\bend #$argument  #} )


{
        c'1\bendAfter #5 e'1 d' \bendBefore #5 e'
}

%%% EDIT: I removed the braces (not needed after all)


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bends before notes... how to?

v.villenave
2007/7/15, Daniele Russo <[hidden email]>:
> Not bad! But, I was interested in a different type of bend, much more short, like this (see attachment)

Here is a new command : \bendStart
it needs two arguments :
\bendStart #number {ghostnote}

the ghostnote will not be printed; its only purpose is to specify the
placement of the bend sign.

%%% snip %%%

#(define (make-bend x)
  (make-music 'BendAfterEvent
              'delta-step x))
bend =
#(define-music-function (parser location delta) (integer?)
       (make-bend (* -1 delta)))
bendStart =
#(define-music-function (parser location argument music) (integer? ly:music?)
#{ \hideNotes
        \once \override NoteColumn #'X-extent = #'(0 . 4)
        \cadenzaOn
        \bend #$argument
        \grace $music \cadenzaOff
        \unHideNotes
#} )

\paper {
ragged-right = ##t }

\relative {
\bendStart #-2 { g' } b8 a g fis e2 }


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user