[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TupletBracket.shorten-pair with strange output
From: |
Thomas Morley |
Subject: |
Re: TupletBracket.shorten-pair with strange output |
Date: |
Mon, 10 Apr 2017 15:28:21 +0200 |
2017-04-09 22:38 GMT+02:00 David Nalesnik <address@hidden>:
> Harm,
>
> On Sun, Apr 9, 2017 at 1:53 PM, Thomas Morley <address@hidden> wrote:
>> The following gives strange output, see attached.
>>
>> \version "2.19.58"
>>
>> {
>> \override TupletBracket.shorten-pair = #'(10 . 0)
>> \tuplet 1/1 {
>> c'1 c'1
>> }
>> }
>>
>> I would have expected the whole bracket to be (much) smaller, instead
>> only the part of the bracket left from TupletNumber is affected.
>>
>
> This behavior is ugly but expected. You're requesting that the left
> end of the bracket be moved 10 staff-spaces to the right and the right
> end be moved 0 ss.
>
> The way to shorten the bracket would be something like:
>
> \override TupletBracket.shorten-pair = #'(2 . 2)
>
>
> HTH,
> David
Hi David,
here a better test-code for the topic:
\new Staff {
$@(map
(lambda (i)
#{
\override TupletBracket.shorten-pair = #(cons i 0)
\tuplet 1/1 { c'1 c'1 }
#})
(iota 7))
}
> Maybe there should be a cap on the amount that a bracket can be
> shortened to prevent the inversion in your example? The bracket
> either won't shorten any more or that part of it disappears?
I'd second this.
But maybe it's an documentation-issue as well.
shorten-pair description is:
"The lengths to shorten on both sides
a hairpin or text-spanner such as a pedal bracket. Positive values
shorten the hairpin or text-spanner, while negative values lengthen
it."
Probably we should add/document it's usage is suitable for fine-tuning
not for heavy changes. For that pupose one could use X-positions.
Here a test-code for X-position:
\new Staff {
$@(map
(lambda (i)
#{
\override TupletBracket.after-line-breaking =
#(lambda (grob)
(let ((x-pos (ly:grob-property grob 'X-positions)))
(ly:grob-set-property! grob 'X-positions
(cons (+ (car x-pos) i) (cdr x-pos)))))
\tuplet 1/1 { c'1 c'1 }
#})
(iota 7))
}
If you change it to use (iota 8) an assertion failure occurs:
lilypond: /home/harm/lilypond-git/flower/include/interval.hh:227: T
Interval_t<T>::center() const [with T = double]: Assertion `!is_empty
()' failed.
Aborted (core dumped)
Though, it's beyond my depth to fix it in a manner a more useful
error-message is thrown.
Thanks,
Harm