lilypond-devel
[Top][All Lists]
Advanced

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

Re: using \offset with Slur.positions


From: Paul Morris
Subject: Re: using \offset with Slur.positions
Date: Tue, 8 Apr 2014 17:53:15 -0700 (PDT)

Hi David and Werner, 


David Nalesnik-2 wrote
> \version "2.19.3"
> 
> offsetPositions =
> 
> #(define-music-function (parser location) ()
> 
>   #{
> 
>     \override Slur.positions =
> 
>     #(lambda (grob)
> 
>       (cons
> 
>         (cdar (ly:slur::calc-control-points grob))
> 
>         (cdar (reverse (ly:slur::calc-control-points grob)))))
> 
>   #})
> 
> 
>  \relative c' {
> 
>   \offsetPositions
> 
>   \once \offset positions #'(5 . 5) Slur
> 
>   c'2( c)
> 
>   \once \offset positions #'(2 . 2) Slur
> 
>   c2( c)
> 
>   c2( c)
> 
> }

Looks like this can be simplified as follows.  Cheers, -Paul

\version "2.19.2"

offsetPositions =
\override Slur.positions =
#(lambda (grob)
   (cons
    (cdar (ly:slur::calc-control-points grob))
    (cdar (reverse (ly:slur::calc-control-points grob)))))

\relative c' {
  \offsetPositions
  \once \offset positions #'(5 . 5) Slur
  c'2( c)
  \once \offset positions #'(2 . 2) Slur
  c2( c)
  c2( c)
}




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/using-offset-with-Slur-positions-tp161359p161406.html
Sent from the Dev mailing list archive at Nabble.com.



reply via email to

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