On Tue, Apr 8, 2014 at 7:12 AM, David Nalesnik <[email protected]>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)

}
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to