[Top][All Lists]

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

Re: repeatTie length

From: Thomas Morley
Subject: Re: repeatTie length
Date: Sun, 22 Apr 2018 16:32:53 +0200

2018-04-22 5:24 GMT+02:00 Andrew Bernard <address@hidden>:
> How can you make a repeatTie longer? The default is a little too crimped for
> my style.
> Andrew

Hi Andrew,

Malte already pointed to the LSR-snippet and Auke posted some
functions which adapted the LSR-snippet.
Though, for me this snippet always had some disadvantages. Using
X-extent '(0 . 0) and applying some extra-offset results in
Repeat/LaissezVibrerTies which may collide/overlap other things. Ok,
this is mostly on pupose, but there's no method to get reasonable
results, if overlapping is undesired.

So I tried to do it different, using make-tie-stencil and create a new stencil.
This stencil will not overlap other stuff. Though, it could be reached
by applying an appropriate X-extent-override.

- only one definition for LaissezVibrerTie and RepeatTie
- reacts on minimum-length

- height-limit, ratio and angularity are hard-coded in
make-tie-stencil, so it behaves a little different than the default.
- there's is a flaw in make-tie-stencil: even if I made height-limit
settable it had no impact. I think there's a bug in it (will report
- even correcting the bug will not make the behaviour of those ties
equal to there defaults. I'm currently not able to find the reason.
I'll continue research later.

Anyway here the code so far:

\version "2.19.81"

#(define semi-tie-stencil
  (lambda (grob)
    (let* ((cps (ly:grob-property grob 'control-points))
           (first-cp (car cps))
           (last-cp (last cps))
             (- (car last-cp) (car first-cp)))
           (thickness (ly:grob-property grob 'thickness 1))
           (orientation (ly:grob-property grob 'direction -1))
             (ly:grob-property grob 'minimum-length
               (+ (car first-cp) actual-length)))
           (head-dir (ly:grob-property grob 'head-direction))
           (used-length (max actual-length minimum-length))
           (line-thick (ly:staff-symbol-line-thickness grob)))
        (if (positive? head-dir)
            (cons (- used-length) (cdr first-cp))
        (if (positive? head-dir)
            (cons used-length (cdr first-cp)))
        (* thickness line-thick)

\layout {
  \override LaissezVibrerTie.stencil = #semi-tie-stencil
  \override RepeatTie.stencil = #semi-tie-stencil

  %\override LaissezVibrerTie.X-extent = #'(0 . 0)
  %\override RepeatTie.X-extent = #'(0 . 0)

  %% default
  <c' e' >1\laissezVibrer

  \once \override LaissezVibrerTie.minimum-length = 10
  <c' e' >1\laissezVibrer
  <c'-\tweak minimum-length 10\laissezVibrer e'\laissezVibrer >1
  <c'\laissezVibrer e'-\tweak minimum-length 10\laissezVibrer >1
  <c'-\tweak minimum-length 10\laissezVibrer e' >1
  <c' e'-\tweak minimum-length 10 ^\laissezVibrer >1

  %% default
  <c' e' >1\repeatTie

  \once \override RepeatTie.minimum-length = 10
  <c' e' >1\repeatTie
%% the following works only for 2.21.0
%% 2.19.81 will not print any RepeatTie
  <c'-\tweak minimum-length 10\repeatTie e'^\repeatTie >1
  <c'\repeatTie e'-\tweak minimum-length 10^\repeatTie >1
  <c'-\tweak minimum-length 10\repeatTie e' >1
  <c' e'-\tweak minimum-length 10 ^\repeatTie >1


reply via email to

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