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: David Nalesnik
Subject: Re: using \offset with Slur.positions
Date: Tue, 8 Apr 2014 07:46:37 -0500




On Tue, Apr 8, 2014 at 7:12 AM, David Nalesnik <address@hidden> wrote:
Hi Werner,

 
The reason this won't work is that there is no value or procedure to be found in define-grobs.scm for Slur.positions to use for a default to offset against.  Could such a procedure be offered?

BTW, there's a snippet which "offsets positions" (unfortunately, I'm not able to open the LSR to look it up). It offsets the Y-coordinate of the outer control-points then applies these values to 'positions.

 It's http://lsr.di.unimi.it/LSR/Snippet?id=748.

Just a little test.  I set 'positions to a procedure which derives it from control-points.  Now that there's a procedure, you can offset against it (with \once \offset or the tweak formulation).  Not that this is anything worthwhile.

\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)

}





reply via email to

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