lilypond-user
[Top][All Lists]
Advanced

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

Re: is there a callback for length-by-duration? (possible sponsorhip)


From: Trevor Bača
Subject: Re: is there a callback for length-by-duration? (possible sponsorhip)
Date: Wed, 5 Sep 2007 15:06:32 -0500

On 9/5/07, Kieren MacMillan <address@hidden> wrote:
> Hi all,
>
> Some time ago, I asked Han-Wen about sponsoring a feature where
> lengths (widths, really) could be set by duration (e.g., 16th note)
> instead of staff spaces. At the time, I couldn't think of a good
> example to back up my intuition of its importance, so we let it drop...
>
> However, the recent thread with Ralph (about TrillSpan lengths) gave
> me the example I now need to ask the question(s) correctly!  =)
>
> Is there a callback function that can be used to get the width, at
> the current point in the current measure, of a given musical duration?
> If not, can such a thing be developed?
>
> In the following snippet, the TrillSpan is shortened (using the
> #'right #'padding setting) by a HARD-CODED (i.e., duration-
> independent) length in staff-spaces:
>
> %%%  BEGIN SNIPPET
> \version "2.11.32"
> theExample =
> {
>         \clef bass
>         \once \override TrillSpanner #'bound-details #'right #'padding = #10
>         f2.\startTrillSpan e4\stopTrillSpan
> }
> \score { \theExample }
> \score { \theExample \layout { line-width = 5\in } }
> \score { \theExample \layout { line-width = 3\in } }
> %%%  END SNIPPET
>
> The problem is, the shorter the measure is, the shorter the DURATION
> of the TrillSpan becomes (i.e., appears to be); consequently, if you
> truly want a TrillSpan that (visually) lasts three beats, you need to
> adjust the #'padding tweak every time there's a change in the page
> layout.  =(
>
> If, on the other hand, one could use
>         \once \override TrillSpanner #'bound-details #'right #'padding = #
> (duration-to-spaces . 4)
> or something like that, then Lilypond could adjust on-the-fly, and
> always trim the right-edge by (in this example) a quarter's width.
>
> In my dream world, Hairpin (etc.) would implement the #'bound-details
> #'right/left #'padding interface, and you could have "floating"
> hairpins -- e.g., starting one eighth after the note, and ending
> after a half-note duration -- without the need for extra voices or
> skip notes, etc. [!!!!]


I am *always* in favor of this type of increased smart control over
horizontal spacing. I'll happily help sponsor if this is the way the
group wants to go and if Han-Wen or Joe or somebody senior is
available to design and implement.

(And yes the ability to get rid of entire "skip voices" in my scores
would be very cool; right now I heavily layer on multiple skip voices
for dynamics, special types of breathing and bowing, etc.)

Also neat would be the ability to say, somehow, "this [spanner /
hairpin / glissando] extends up until [x] spaces just prior to the
next [barline | time signature | whatever]" rather than just extending
to the next note or rest.




Trevor.





-- 
Trevor Bača
address@hidden

reply via email to

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