lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: placing crescendo and decrescendo markings within span of a whole no


From: Simon Albrecht
Subject: Re: placing crescendo and decrescendo markings within span of a whole note
Date: Thu, 7 Jan 2016 00:17:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 07.01.2016 00:08, David Kastrup wrote:
Simon Albrecht <address@hidden> writes:

On 06.01.2016 21:40, Ryan Michael wrote:
i want a

dis1

with < >  (cresencendo / decrescendo)

underneath it. How can I do that and size the crescendo and
decresendo to my liking (say span the < to last 3 quarters of the
whole note and the > to last a quarter)
I have a very handy music function for that (based on an idea by David K.):

after =
#(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
    #{
      <<
        #m
        { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
      >>
    #})

With that you can write things like:
\new Voice {
   \after 2. \> dis1\< <>\! |
   \after 4 \< \after 2 \> \after 2. \p dis1
   \after 2. \stopTrillSpan dis1\startTrillSpan
   \after 2 \upbow dis1\downBow
}

Note that it’s essential to explicitly create the voice with \new
Voice, else the <<>> in the music function will create new voices and
it won’t work.
Any reason you are not writing

     \context Bottom << ... >>

here?  I seem to remember suggesting that in some discussion (maybe a
different one?) but have no idea any more whether it might have posed a
separate problem at that time.

Oh, interesting idea! Never heard of. It seems like a fine and sensible thing to do, except that normally I would have created the voices explicitly in my score block, and I am using \context only when referencing already existing contexts – isn’t that kind of a policy? But I see, you probably mean putting it inside the music function:

after =
#(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
   #{
     \context Bottom <<
       #m
       { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
     >>
   #})

There’s nothing wrong with that, and it prevents any problems indeed.

Thanks,
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]