2011/10/22 [email protected] <[email protected]>

>
> Hey Harm,
> I compiled it against current master.  If your version of LilyPond doesn't
> have an X-positions property, you can assemble something that works like
> X-positions by getting the two spanner bonuds via ly:spanner-bound and then
> getting their relative coordinates.
>
> \version "2.14.0"
> \relative c'' {
>  \override TupletBracket #'stencil = #ly:slur::print
>  \override TupletBracket #'direction = #UP
>  \override TupletNumber #'whiteout = ##t
>  \override TupletNumber #'layer = #2
>  \override TupletBracket #'layer = #1
>  \override TupletBracket #'control-points =
> #(lambda (grob)
>   (let* ((b-l (ly:spanner-bound grob LEFT))
>          (b-r (ly:spanner-bound grob RIGHT))
>          (crf (ly:grob-common-refpoint b-l b-r X))
>          (x-pos (cons (ly:grob-relative-coordinate b-l crf X)
> (ly:grob-relative-coordinate b-r crf X)))
>          (pos (ly:grob-property grob 'positions)))
>     (list (cons (car x-pos) (car pos))
>           (cons (+ (car x-pos) (/ (interval-length x-pos) 3)) (+ (car pos)
> 0.5))
>           (cons (+ (car x-pos) (* (interval-length x-pos) 2/3)) (+ (cdr
> pos) 0.5))
>           (cons (cdr x-pos) (cdr pos)))))
> \repeat unfold 10 \times 2/3 { a4 b4 c }
> }
>
> In 2.14.0 the TupletNumber Y-offset callback doesn't exist, so I've nixed
> it.  This messes with the tuplet number positioning, but you can write a
> positioning fixed based on the coordinates of the bracket.  To get the
> bracket, if the TupletNumber is `grob' in a function, use (ly:grob-object
> grob 'bracket).
>
> Cheers,
> MS
>

Hi Mike,

your function doesn't work for me. I get a wrong output (with "2.14.2" and
"2.15.13")
->attached png

And I'm still puzzled why I can't find the 'X-positions-property in
"2.15.13" define-grob-properties.scm. But it is described in
http://kainhofer.com/~lilypond/Documentation/internals-big-page.html#user-backend-properties
.

Cheers,
  Harm

<<attachment: atest.png>>

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to