lilypond-user
[Top][All Lists]
Advanced

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

Re: Tie at end of first repeat


From: Thomas Morley
Subject: Re: Tie at end of first repeat
Date: Thu, 2 Feb 2012 09:31:34 +0100

Hi Nick,

2012/2/2 Nick Payne <address@hidden>:
> On 02/02/12 10:21, Thomas Morley wrote:
>>
>> Hi,
>>
>> 2012/2/2 Xavier Scheuer<address@hidden>:
>>>
>>> On 1 February 2012 22:54, Brent Annable<address@hidden>  wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I'm typesetting a piece with repeats, for which I'm using the "volta 2"
>>>> construction with a first-time and second-time ending. My problem is
>>>> that I
>>>> have a note that is tied from the end of the first ending back to the
>>>> start
>>>> of the "volta" section. This doesn't seem to work with a normal tie, so
>>>> I'm
>>>> trying to use a \repeatTie and attach it to the right-hand side of the
>>>> notehead, but I can't figure out how to do it. Here's what I've tried so
>>>> far:
>>>>
>>>> \score {
>>>>  \relative c' {
>>>>  \override RepeatTie #'side-axis = #0
>>>>  \override RepeatTie #'direction = #RIGHT
>>>>
>>>>  c2 c2~ \repeat volta 2 { c2 c2 }
>>>>
>>>> \alternative {
>>>> { c2 c2 \repeatTie}
>>>> {d2 d2}
>>>>              }
>>>>              c2 c2 \bar "|." }
>>>> }
>>>>
>>>> I just can't get it to work, I would be really grateful if someone could
>>>> explain where I'm going wrong.
>>>
>>> This is a workaround, but you could use  \laissezVibrer  instead of
>>> using \repeatTie .
>>>
>>> Hope that helps (a little).
>>>
>>> Cheers,
>>> Xavier
>>>
>>> --
>>> Xavier Scheuer<address@hidden>
>>>
>>> _______________________________________________
>>> lilypond-user mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>> same suggestion as Xavier.
>> I added a little function to tweak the LaissezVibrerTie, first created
>> by Enternix from the german forum:
>> http://www.lilypondforum.de/index.php?topic=1008.msg5637#msg5637
>> Of course there are other tweaking methods:
>> via control-points or use the functions of the attached file
>> containing possibilities to tweak Slur, Tie, PhrasingSlur, RepeatTie
>> and LaissezVibrerTie (this is a collection of function from the list).
>>
>> \version "2.14.2"
>>
>> extendTie =
>> #(define-music-function (parser location x) (pair?)
>> #{
>>   \once  \override LaissezVibrerTie #'stencil = #(lambda (grob)
>>     (let* ((tie-stencil (laissez-vibrer::print grob))
>>            (tie-ext (ly:stencil-extent tie-stencil X))
>>            (tie-length (interval-length tie-ext))
>>            (new-tie-length (+ tie-length (- (cdr $x)(car $x))))
>>            (scale-factor (/ new-tie-length tie-length))
>>            (new-tie-stencil (ly:stencil-scale tie-stencil scale-factor 1))
>>            (new-tie-ext (ly:stencil-extent new-tie-stencil X))
>>            (x-corr (- (car tie-ext) (car new-tie-ext)))
>>            (x-shift (car $x)))
>>
>>      (ly:stencil-translate-axis
>>         new-tie-stencil
>>         (+ x-corr x-shift)
>>         X)))
>> #})
>>
>> %--- test
>>
>> \score {
>>  \relative c' {
>>
>>    c2 c2~
>>    \repeat volta 2 { c2 c2 }
>>        \alternative {
>>        { c2 \extendTie #'(0 . 1.5) c2 \laissezVibrer }
>>        { d2 d2 }
>>                     }
>>
>>    c2 c2 \bar "|."
>>  }
>> }
>>
>
> A slightly simpler function to extend a laissezvibrer tie:
>
> \version "2.15.25"
>
> extendLV = #(define-music-function (parser location further) (number?) #{
>    \once \override LaissezVibrerTie  #'X-extent = #'(0 . 0)
>    \once \override LaissezVibrerTie  #'details #'note-head-gap = #(/ further
> -2)
>    \once \override LaissezVibrerTie  #'extra-offset = #(cons (/ further 2)
> 0)
> #})
>
> \relative c' {
>    c2\laissezVibrer \extendLV #3 c\laissezVibrer
> }
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

of course! This is the upgraded LSR-snippet
http://lsr.dsi.unimi.it/LSR/Search?q=extendLV
And I forgot it. :(
But have a second look at the function by Enternix. With very few
changes you can adapt it to nearly all stencils. This might be useful
sometimes.

Cheers,
  Harm



reply via email to

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