lilypond-user
[Top][All Lists]
Advanced

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

Re: placement of tuplet number on broken tuplet


From: David Nalesnik
Subject: Re: placement of tuplet number on broken tuplet
Date: Mon, 17 Apr 2017 11:24:40 -0500

Hi Juan,

On Mon, Apr 17, 2017 at 10:39 AM, Juan Cristóbal Cerrillo <address@hidden> wrote:
Hello,

On Apr 12, 2017, at 8:38 AM, Thomas Morley <address@hidden> wrote:

It's not clear to me what you want. Could you post an image faked by a
graphic program?

Sorry if I was not very clear describing what I’m looking for. 
I wonder if there is a way of modifying the properties of the left and right side of a broken tuplet (something similar to broken-left and broken right in a TextSpanner).In the example provided, the innermost tuplet number of the first bar needs to be shifted in order to be displayed correctly.

Here are two possible solutions to the placement problem of the default lilypond output illustrated graphically:
(the second voice in the example is only for breaking purposes)

The tuplet number displaced to the right only on the left broken side:

It isn't possible to shift the number within the bracket and have the gap adjust, but you can lengthen the broken bracket:

\version "2.19.57"

\layout {
  ragged-right = ##t
  \context {
    \Voice
    \remove "Forbid_line_break_engraver"
    \override Beam.breakable = ##t
    tupletFullLength = ##t
  }
}

<<
  {
    \time 2/4
    r4
    \tuplet 3/2 {
      c'4
      \tweak TupletBracket.break-overshoot #'(-0.5 . 2)
      \tuplet 3/2 { c' c' c' }
    }
  }
  \\
  {
    r2 \break
    r2
  }
>> 


The tuplet number omitted on the left broken side.



This is possible like so:

\version "2.19.57"

\layout {
  ragged-right = ##t
  \context {
    \Voice
    \remove "Forbid_line_break_engraver"
    \override Beam.breakable = ##t
    tupletFullLength = ##t
  }
}

#(define omit-tn-at-break
   (lambda (grob)
     (let* ((rb (ly:spanner-bound grob RIGHT))
            (col (ly:item-get-column rb)))
       (if (= -1 (ly:item-break-dir col))
           (set! (ly:grob-property grob 'stencil) empty-stencil)))))
<<
  {
    \time 2/4
    r4
    \tuplet 3/2 {
      c'4
      \tweak TupletNumber.after-line-breaking #omit-tn-at-break
      \tuplet 3/2 { c' c' c' }
    }
  }
  \\
  {
    r2 \break
    r2
  }
>> 

%%%%%%%%%

Hope this is helpful--

David

reply via email to

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