lilypond-user
[Top][All Lists]
Advanced

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

Re: Drawing extenders for the full duration of a note


From: Lucas Werkmeister
Subject: Re: Drawing extenders for the full duration of a note
Date: Tue, 23 Oct 2018 19:11:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Hi Kieren and Graham,

thank you both for your responses. Kieren, I really like the idea in
your suggestion – but it doesn’t seem to be a good fit for my situation:
while the tag solution is neat, in my case the ends of the extenders
align with different voices at different times (there are four voices in
total), so I would probably need some adventurous combination of
multiple tags, and it looks like this also requires me to keep both
voices (real and null) alive for most of the score even though the
extended notes only appear in a few places.

In the end, I went for a variation of Graham’s suggestion instead,
encapsulated in a music function:

extendedNote =
#(define-music-function
     (parser location note)
     (ly:music?)
   #{
    \afterGrace 15/16 $note { \once \hideNotes \absolute $note }
   #})


I needed a few iterations to work out the details ($note instead of
#note; make the grace note \absolute to avoid it adjusting the octave a
second time), but with this version I was able to just insert
\extendedNote before all the relevant notes and it worked out
automagically. You can see the full change I made on GitHub [1].

Thanks again for the help!
Cheers, Lucas

[1]:
https://github.com/lucaswerkmeister/il-est-bel-et-bon/commit/724cbd8d75cb97b5c7317f95474656f8d09bad7

On 20.10.18 18:23, Kieren MacMillan wrote:
> Hi Lucas,
> 
>> Note that you could almost certainly use the tag system to build "extenders" 
>> out of existing variables/notes, thus avoiding the need for a whole 
>> separate, manually-created variable.
> 
> e.g.
> 
> %%%  SNIPPET BEGINS
> \version "2.18.2"
> \language"english"
> 
> upper = {
>   c'1
>   R1
> }
> 
> lower = {
>   \tag #'extenders { c'8-\tag #'extenders-only -( d' e' f' g' f' e' d'-\tag 
> #'extenders-only -) }
>   c'4 g' c'2
> }
> 
> theLyrics = \lyricmode {
>   a __
> }
> 
> <<
>   \new Staff <<
>     \new Voice = "notes"
>         \removeWithTag #'extenders-only \upper
>     \new NullVoice = "extenders"
>         \keepWithTag #'(extenders extenders-only) << \upper \lower >>
>     \new Lyrics \lyricsto "extenders" \theLyrics
>   >>
>   \new Staff \removeWithTag #'extenders-only \lower
>>>
> %%%  SNIPPET ENDS
> 
> Cheers,
> Kieren.
> ________________________________
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: address@hidden
> 



reply via email to

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