lilypond-user
[Top][All Lists]
Advanced

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

Re: Smoothing out RepeatTie irregularities between chords?


From: Trevor Bača
Subject: Re: Smoothing out RepeatTie irregularities between chords?
Date: Thu, 30 Apr 2015 11:30:30 -0700

Hi David and Pierre,

Ok, it looks like both solutions will work for me, so thank you very much.

And I guess this means it's not necessary to file a bug report, either.

Thanks!

Trevor.

On Fri, Apr 17, 2015 at 6:31 AM, David Nalesnik <address@hidden> wrote:
Hi,


2015-04-16 3:36 GMT+02:00 Trevor Bača <address@hidden>:
Hi,

Using the \shape command to length repeat ties works great between notes. But weird behavior seems to arise with lengthened repeat ties between chords:


### BEGIN ###

\version "2.19.17"
\language "english"


\new Staff \with {
    \shape #'((-2 . 0) (-1 . 0) (-0.5 . 0) (0 . 0)) RepeatTie                 
    \override RepeatTie.X-extent = ##f
} {
    <c' g'>1
    <c' g'>1 \repeatTie
    <c' g'>1 \repeatTie
    <c' g'>1 \repeatTie
}

### END ###


(Image attached.)

Would anyone have any clues as to how to make the repeat ties all have the same length?


In order to use a shape-like command with repeat ties in a chord, we have to get at the individual ties organized by the RepeatTieColumn.

Here's a variant of \shapeTieColumn (at  https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/shaping-bezier-curves/shape-tie-column) which achieves that.  Each tie within the chord is represented with its own list of offsets.

%%%%
\version "2.19.17"
\language "english"


shapeRepeatTieColumn =
#(define-music-function (parser location all-offsets) (list?)
   #{
     \override RepeatTieColumn #'before-line-breaking =
     #(lambda (grob)
        (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties))))
          (for-each
           (lambda (tie offsets-for-tie)
             (if (number-pair-list? offsets-for-tie)
                 (set! (ly:grob-property tie 'control-points)
                       (map
                        (lambda (x y) (coord-translate x y))
                        (ly:semi-tie::calc-control-points tie) offsets-for-tie))))
           ties all-offsets)))
   #})

\new Staff \with {
  \shapeRepeatTieColumn #'(
                            ((-2 . 0) (-1 . 0) (-0.5 . 0) (0 . 0))
                            ((-2 . 0) (-1 . 0) (-0.5 . 0) (0 . 0))
                            )                
  \override RepeatTie.X-extent = ##f
} {
  <c' g'>1
  <c' g'>1 \repeatTie
  <c' g'>1 \repeatTie
  <c' g'>1 \repeatTie
}

%%%%%

HTH,
David

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




--
Trevor Bača
address@hidden

reply via email to

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