lilypond-user
[Top][All Lists]
Advanced

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

Re: non-triplet tuplets collide with staff


From: Thomas Morley
Subject: Re: non-triplet tuplets collide with staff
Date: Sun, 29 Oct 2017 10:03:27 +0100

Hi Mason,

please always state the version you use and a tiny example.
Maybe you would have spotted that

2017-10-28 23:38 GMT+02:00 Mason Hock <address@hidden>:
> Lilypond by default seems to place all tuplet numbers/brackets so that they
> collide with the staff, with the exception of triplets, which it places
> outside the staff.

isn't true.

See
{
    \cadenzaOn
    \tuplet 2/1 { a4 a }
    \tuplet 3/2 { a a a }
    \tuplet 4/3 { a a a a }
    \tuplet 5/4 { a a a a a }
    \tuplet 6/5 { a a a a a a }
    \tuplet 7/6 { a a a a a a a }
}
and
{
    \tuplet 2/1 { a8 a }
    \tuplet 3/2 { a a a }
    \tuplet 4/3 { a a a a }
    \tuplet 5/4 { a a a a a }
    \tuplet 6/5 { a a a a a a }
    \tuplet 7/6 { a a a a a a a }
}
Where the TupletBracket is printed depends on whether a Beam is
present or not, presence of other maybe colliding objects etc.
Has nothing to do if being a triplet or anything else.
Btw, what you call collisions is common practice in printed editions.

> I would like all tuplets outside of the staff like
> triplets.

> If I do both
>
> \override Staff.TupletNumber #'outside-staff-priority = #1
> \override Staff.TupletBracket #'outside-staff-priority = #1
>
> I get an error: "warning: Cannot set outside-staff-priority for element and
> elements' Y parent."


I agree it would be better to set outside-staff-priority for both,
Number and Bracket, and let LilyPond sort it out.
Alas, it doesn't work. You may write a feature-request to the bug-list.

For now you could do:

\override TupletBracket.after-line-breaking =
  #(lambda (grob)
        (ly:grob-set-property!
          (if (and (ly:stencil-empty? (ly:grob-property grob 'stencil))
                   (ly:grob? (ly:grob-object grob 'tuplet-number)))
              (ly:grob-object grob 'tuplet-number)
              grob)
          'outside-staff-priority
          100))

Cheers,
  Harm



reply via email to

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