[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
is there a callback for length-by-duration? (possible sponsorhip)
From: |
Kieren MacMillan |
Subject: |
is there a callback for length-by-duration? (possible sponsorhip) |
Date: |
Wed, 5 Sep 2007 15:43:58 -0400 |
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. [!!!!]
What say all of ye?
Thanks,
Kieren.
- Barcheck and TrillSpan, Palmer, Ralph, 2007/09/05
- Re: Barcheck and TrillSpan, Kieren MacMillan, 2007/09/05
- RE: Barcheck and TrillSpan, Palmer, Ralph, 2007/09/05
- Re: Barcheck and TrillSpan, Kieren MacMillan, 2007/09/05
- RE: Barcheck and TrillSpan, Palmer, Ralph, 2007/09/05
- is there a callback for length-by-duration? (possible sponsorhip),
Kieren MacMillan <=
- Re: is there a callback for length-by-duration? (possible sponsorhip), Trevor Bača, 2007/09/05
- Re: is there a callback for length-by-duration? (possible sponsorhip), Reinhold Kainhofer, 2007/09/05