Re: repeatTie length

2018-04-22 Thread Thomas Morley
2018-04-22 5:24 GMT+02:00 Andrew Bernard :
> 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.

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

Disadvantages:
- 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
soon).
- 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))
   (actual-length
 (- (car last-cp) (car first-cp)))
   (thickness (ly:grob-property grob 'thickness 1))
   (orientation (ly:grob-property grob 'direction -1))
   (minimum-length
 (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)))
  (make-tie-stencil
(if (positive? head-dir)
(cons (- used-length) (cdr first-cp))
first-cp)
(if (positive? head-dir)
last-cp
(cons used-length (cdr first-cp)))
(* thickness line-thick)
orientation

\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
  1\laissezVibrer

  \once \override LaissezVibrerTie.minimum-length = 10
  1\laissezVibrer
  1
  1
  1
  1
}

{
  %% default
  1\repeatTie

  \once \override RepeatTie.minimum-length = 10
  1\repeatTie
%% the following works only for 2.21.0
%% 2.19.81 will not print any RepeatTie
  1
  1
  1
  1
}

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Fwd: Re: repeatTie length

2018-04-22 Thread Engraver



On 22-4-2018 05:24, Andrew Bernard wrote:
How can you make a repeatTie longer? The default is a little too 
crimped for my style.


Andrew



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



I pickesdup two short functions on this list in the last few months to 
extend a repeatTie. I should probably look up the original posts, 
however, I have them ready in my include library:


repeatTieExtend =
#(define-music-function (parser location arg-repeat-tie-extend) (number?)
#{
-\tweak X-extent #(cons (* (+ arg-repeat-tie-extend 4) -1) 0)
-\tweak details.note-head-gap #(* arg-repeat-tie-extend -1)
-\tweak extra-offset #(cons (* arg-repeat-tie-extend -1) 0)
-\tweak head-direction #1
\laissezVibrer
#})

Use as:  d,4^\repeatTieExtend #0.6

= Second possibility:

extendRT =
#(define-music-function (parser location further) (number?)
   #{
 \once \override RepeatTie.X-extent = #'(0 . 0)
 \once \override RepeatTie.details.note-head-gap = #(/ further -2)
 \once \override RepeatTie.extra-offset = #(cons (/ further -2) 0)
   #})

use as: \extendRT#2 a2\repeatTie

Regards,
Auke


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: repeatTie length

2018-04-22 Thread Malte Meyn



Am 22.04.2018 um 05:24 schrieb Andrew Bernard:
How can you make a repeatTie longer? The default is a little too crimped 
for my style.


See http://lsr.di.unimi.it/LSR/Item?id=715 and adapt ;) Of course the 
current solution is not optimal, a property length or minimum-length 
would be nice.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


repeatTie length

2018-04-21 Thread Andrew Bernard
How can you make a repeatTie longer? The default is a little too crimped
for my style.

Andrew
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user