lilypond-user
[Top][All Lists]
Advanced

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

Re: Slur as TupletBracket


From: address@hidden
Subject: Re: Slur as TupletBracket
Date: Fri, 21 Oct 2011 10:11:43 +0200

i <3 hacks

\version "2.15.12"
\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 TupletNumber #'Y-offset = #(lambda (grob) (+ 0.5 (ly:tuplet-number::calc-y-offset grob)))
 \override TupletBracket #'control-points =
#(lambda (grob)
  (let ((x-pos (ly:grob-property grob 'X-positions))
        (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 }
}

To be messed with to your heart's content :)
This'll only work in one of the more recent development versions, as X-positions is a new addition to LilyPond.

Cheers,
MS

On Oct 21, 2011, at 9:55 AM, J Ruiz wrote:

From: Jethro Van Thuyne
Subject: Slur as TupletBracket
Date: Tue, 9 Feb 2010 18:55:33 +0000 (UTC)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

I'm trying to replace the tuplet bracket with a slur by doing:

  \layout {
    \context {
      \Score 
      \override TupletBracket #'stencil = #ly:slur::print
    }
  }

Unfortunately, I get a fucked up slur, starting and ending vertically on 
the first note of the triplet (version 2.12.3):

  http://hemiola.eu/tuplet_slur.png

Is it broken or am I doing it wrong?

Best regards,

Jethro.
___________________________________
I use v2.14.2
Lilypond goes ignorant with tuplet brackets in style of a slur.
Switching to slur::print will require you add three control points for the slur
to manually define the curve:
\override TupletBracket #'control-points = #'( ( 4.5284 . 4.166) ( 6.521 . 4.89) ( 8.9664 . 4.619) ( 10.415 . 2.717) )
Another side-effect of this option is collision avoidance is disabled, and
you'll likely need to also tweak the the TupletNumber offset with command like:
\override TupletNumber #'extra-offset = #'(2.2 . -1.4 )
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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