lilypond-user
[Top][All Lists]
Advanced

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

Re: Messiaen-style ties?


From: Trevor Bača
Subject: Re: Messiaen-style ties?
Date: Wed, 1 Apr 2015 15:46:35 -0400

Hi Pierre & David,

These solutions are quite amazing, and I've been able to make both work perfectly for what I want.

I'll document my understanding below for later readers of thread trying to finesse results.

First I had to go read about the \shape command from David's solution ...

http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes#index-_005cshape

... which is easier to use than I would've imagined. The four pairs in ...

    \shape #'((-1.5 . 0) (-1 . 0) (-0.5 . 0) (0 . 0)) RepeatTie

... set the four control points that govern, er, shape the repeat-tie. And changing just the negative size of the leftmost value ...

    \shape #'((-2.5 . 0) (-1 . 0) (-0.5 . 0) (0 . 0)) RepeatTie

... gives exact control over the graphic length of the repeat.

Then I digested Pierre's successive refinements to his repeatTieExtend function ...

  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
    #})

... which made me realize that everything I'm wanting to do can be controlled by overrides to the RepeatTie (or, equivalently, LaissezVibrer) grob.

After some experimentation, I found that just these three overrides ...

   \override RepeatTie.details.note-head-gap = -0.5
   \override RepeatTie.extra-offset = #'(-0.5 . 0)
   \override RepeatTie.X-extent = ##f

... do exactly what I want.

(Turning off X-extent makes repeat-ties work nicely with complex rhythms and proportional spacing.)

Equivalently, these two overrides ...
 
   \shape #'((-1.5 . 0) (-1 . 0) (-0.5 . 0) (0 . 0)) RepeatTie
   \override RepeatTie.X-extent = ##f

... also do exactly what I want.

(These settings are now inserted in a global stylesheet for the score.)

The only mystery in any of these settings are the negative values ...

   \override RepeatTie.details.note-head-gap = -0.5
   \override RepeatTie.extra-offset = #'(-0.5 . 0)

... which don't function exactly the way you might expect when you start changing them from, say, -0.25 to -0.5 to -1.5 to -2.5 and so on. But, happily, the values of -0.25 and -0.5 work very well.

Thank you both very much. Both solutions give me what I was looking for and are producing beautiful output.

Trevor.



On Wed, Apr 1, 2015 at 3:51 AM, Pierre Perol-Schneider <address@hidden> wrote:
Oops, X-extent forgotten, so here again:

  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
    #})
 
  {
    c2\repeatTie
    c''2 ^\repeatTieExtend #2
    a'2 _\repeatTieExtend #5
    c'2 _\repeatTieExtend #7
  }


Cheers,
Pierre

2015-04-01 9:27 GMT+02:00 Pierre Perol-Schneider <address@hidden>:
... or even:

  \version "2.18.2"
 
  repeatTieExtend =
  #(define-music-function (parser location arg-repeat-tie-extend) (number?)
    #{
        -\tweak X-extent #'(0 . 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
    #})
 
  {
    c2\repeatTie
    c''2 ^\repeatTieExtend #2
    a'2 _\repeatTieExtend #5
    c'2 _\repeatTieExtend #7
  }


Cheers,
Pierre

2015-04-01 9:05 GMT+02:00 Pierre Perol-Schneider <address@hidden>:
Hi Trevor et All,

How about:

  \version "2.18.2"
 
  extendRT =
  #(define-music-function (parser location arg-extend) (number?)
  #{
    \once \override LaissezVibrerTie.X-extent = #'(0 . 0)
    \once \override LaissezVibrerTie.details.note-head-gap = #(/ arg-extend -1)
    \once \override LaissezVibrerTie.extra-offset = #(cons (/ arg-extend -1) 0)
    \once \override LaissezVibrerTie.head-direction = #1
  #})
 
  {
      c2\repeatTie
      \extendRT #2 c''2 \laissezVibrer
      \extendRT #5 a'2 \laissezVibrer
      \extendRT #7 c'2 \laissezVibrer
  }


HTH,
Pierre

2015-04-01 6:00 GMT+02:00 David Nalesnik <address@hidden>:


On Tue, Mar 31, 2015 at 10:53 PM, David Nalesnik <address@hidden> wrote:

The property 'minimum-length doesn't seem to have an effect

Seems like it ought to...  RepeatTie and LaissezVibrerTie as well.

\override RepeatTie.minimum-length = #5 % does nothing alone

\override RepeatTie.springs-and-rods = #ly:spanner::set-spacing-rods


causes a crash, as does the same overrides of LaissezVibrerTie


DN

_______________________________________________
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]