|
From: | David Nalesnik |
Subject: | Re: Moving tuplet number |
Date: | Mon, 30 Mar 2015 11:13:13 -0500 |
Hi Andrew,
not sure what you aim at. An example is always helpful, especially for
2015-03-30 17:06 GMT+02:00 David Nalesnik <address@hidden>:
> Hi Andrew,
>
> On Mon, Mar 30, 2015 at 9:11 AM, Andrew Bernard <address@hidden>
> wrote:
>>
>> How can you move a tuplet number to a different position relative to the
>> centre of the bracket, say 75% along rather than 50%?
>>
>> I can use X-offset for the TupletNumber, but this reveals the gap in the
>> bracket that is the room for the number. How does one move that as well?
>
>
> Sorry, I don't believe that this is possible in any convenient way. The
> routine that draws the tuplet bracket simply puts the gap halfway along,
> regardless of the number's position. Fixing this would involve patching the
> C++ code.
>
> You could instead write a Scheme callback for TupletBracket.stencil which
> would use the tuplet number's X-extent to determine the gap's position.
> You'd of course have to reconstruct the bracket from scratch.
>
> --David
a none native speaker like me. ;)
Though, maybe the following may help:
\version "2.19.17"
\relative c' {
\override TupletNumber.Y-offset =
#(lambda (grob)
(let ((dir (ly:grob-property grob 'direction)))
(+ (ly:tuplet-number::calc-y-offset grob)
(* dir 0.75))))
\override TupletNumber.X-extent = #empty-interval
%\voiceTwo
%\voiceOne
\times 2/3 {
c2 c c
}
}
[Prev in Thread] | Current Thread | [Next in Thread] |