lilypond-user
[Top][All Lists]
Advanced

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

Re: tupletFullLength clashes with barline


From: Peter O'Doherty
Subject: Re: tupletFullLength clashes with barline
Date: Fri, 29 Jun 2012 14:34:09 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/25/2012 10:50 AM, address@hidden wrote:
On 25 juin 2012, at 10:37, Peter O'Doherty wrote:

On Sun, Mar 11, 2012 at 09:25:55AM +0100, Peter O'Doherty wrote:
On 03/10/2012 09:55 PM, Patrick Karl wrote:
On Mar 10, 2012, at 1:35 PM, James<address@hidden>    wrote:

Message: 6
Date: Sat, 10 Mar 2012 19:34:40 +0000
From: James<address@hidden>
To: "Peter O'Doherty"<address@hidden>
Cc: address@hidden
Subject: Re: tupletFullLength clashes with barline
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hello,

On 10 March 2012 08:18, Peter O'Doherty<address@hidden>    wrote:
Hi list,

tupletFullLength = ##t

causes the right hand part of the tuplet bracket to clash with the barline.
This only happens with a barline at the end of a line.

Is there a way to avoid this?

Tiny example and the version you are using might help us.
Here's one that illustrates what he's talking about:

\version "2.14.2"
music = \relative g' {
        \repeat unfold 3 { \times 2/3 { f8 g a f g a f g a f g a} }
        \break
        \set tupletFullLength = ##t
        \repeat unfold 3 { \times 2/3 { g8 a b g a b g a b g a b} }
}
\score { \new Staff { \music } }

Note that in the 1st two measures of the 2nd system the tuple bracket extends 
slightly past the last note, but in the last measure in the 2nd system the 
tuple bracket extends all the way to the bar line.

Regards,
Pat Karl

Thanks for the example Pat. That illustrates it well. This examples
shows how bad it looks in a piano stave:

\version "2.12.3"
\include "english.ly"
upper =  {
   \clef "treble"
   \time 4/8
   \times 4/6 { c'8 c'8 c'8 c'8 c'8 c'8 } |
   \times 4/6 { c'8 c'8 c'8 c'8 c'8 c'8 } |
   \times 4/6 { c'8 c'8 c'8 c'8 c'8 c'8 } |
   \break
   \times 4/6 { c'8 c'8 c'8 c'8 c'8 c'8 } |
}

lower =  {
   \clef "bass"
   \times 4/6 { c8 c8 c8 c8 c8 c8 } |
   \times 4/6 { c8 c8 c8 c8 c8 c8 } |
   \times 4/6 { c8 c8 c8 c8 c8 c8 } |
   \times 4/6 { c8 c8 c8 c8 c8 c8 } |
}

\score {
   \new PianoStaff<<
     \new Staff = "upper" \upper
     \new Staff = "lower" \lower
   \layout {
  \context {
        \Score
        tupletFullLength = ##t
        \override TupletBracket #'bracket-visibility = ##t
        \override TupletNumber #'text = #tuplet-number::calc-fraction-text
        }
  }
}
Sorry to reopen this but I still haven't been able to solve the problem of the 
tuplet bracket colliding with the barline at the end of a line.

Any help would be greatly appreciated!

Many thanks,
Peter

With the development version, you can do:

\override TupletBracket #'X-positions =
#(lambda (grob)
   (let* ((right (ly:spanner-bound grob RIGHT))
          (bd (ly:item-break-dir right))
          (xshift (if (= bd -1) -0.5 0.0)))
     (coord-translate (ly:tuplet-bracket::calc-x-positions grob)
                      `(0 . ,xshift))))

Cheers,
MS

Thanks.
Do you know how I can run the development version in combination with Frescobaldi (which uses version 2.14.2 at present)?
Thanks again,
Peter

--
//=============================
->  Peter O'Doherty
->  http://www.peterodoherty.net
->  address@hidden
->  https://joindiaspora.com/people/70716
//=============================




reply via email to

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