lilypond-user
[Top][All Lists]
Advanced

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

Re: TupletNumber direction


From: David Nalesnik
Subject: Re: TupletNumber direction
Date: Sun, 11 Nov 2012 14:52:49 -0600

On Sun, Nov 11, 2012 at 2:13 PM, Daniel Rosen <address@hidden> wrote:
> I guess I should have been more clear, but I was in a rush. What I'm actually 
> looking for is a function to have tuplet numbers ALWAYS appear on the note 
> head side, regardless of stem direction.

You could do something like this, which looks at the direction of the
first stem in the tuplet to determine where the note head is:

\relative c'' {
  \override TupletBracket #'direction =
  #(lambda (grob)
    (let* ((note-column (ly:grob-parent grob X))
           (stem (ly:grob-object note-column 'stem))
           (stem-direction (ly:grob-property stem 'direction)))
      (if (= UP stem-direction)
          DOWN
          UP)))

  \times 2/3 { c8 c c }
  \times 2/3 { c,8 c c }
  \times 2/3 { c'8 c c }
  \times 2/3 { c,8 c c }
}

This doesn't address the issue of the stem direction changing during
the course of the tuplet (i.e., for a "kneed beam").

On Sun, Nov 11, 2012 at 2:44 PM, David Kastrup <address@hidden> wrote:
> Daniel Rosen <address@hidden> writes:
>
>> Also, I'm a little confused as to why \override TupletNumber
>> #'direction = #-1 isn't working just as well in the meantime.
>
> Because it is not consulted?
>
> \version "2.16.0"
> \new Voice {
>   \times 2/3 { c'8 c' c' }
>   \override TupletBracket #'direction = #DOWN
>   \times 2/3 { c'8 c' c' }
> }
>

Yes--the tuplet number is pulled along by the bracket, even though
there is none visible here.

HTH,
David



reply via email to

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