[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slur position : "catching" Llilypond values...
From: |
David Nalesnik |
Subject: |
Re: Slur position : "catching" Llilypond values... |
Date: |
Tue, 8 Feb 2011 15:56:57 -0600 |
On 2/7/11, Éditions IN NOMINE <address@hidden> wrote:
> Well, let me explain :-)
>
> I often use \once \override Voice.Slur #'positions = #'(a . b) to adjust
> Slur position, and most of the time, I only need to modify only one of a or
> b.
>
> I'd like to be able to "catch" the default a or b value and tell Lily not to
> touch it, so that I could tell Lily something like :
>
> \once \override Voice.Slur #'positions = #'(* . b)
>
> with * = default value, which would mean "whatever you want"
Hello,
There probably is a better way to do this, but the function below
seems to do the trick. It adds an offset to the Y-coordinate of
either or both of the slur's attachment points. Setting one value of
the pair to zero will leave one end-point as it is. (See attached
files.)
offsetPositions =
#(define-music-function (parser location offsets) (pair?)
#{
\once \override Slur #'positions = #(lambda (grob)
`(,(+ (car $offsets) (cdar (ly:slur::calc-control-points grob))) .
,(+ (cdr $offsets) (cdr (cadddr (ly:slur::calc-control-points
grob))))))
#})
--David
slur positions offset.ly
Description: Text Data
image.png
Description: PNG image
- Slur position : "catching" Llilypond values..., Éditions IN NOMINE, 2011/02/07
- Re: Slur position : "catching" Llilypond values..., Dmytro O. Redchuk, 2011/02/07
- Re: Slur position : "catching" Llilypond values...,
David Nalesnik <=
- Re: Slur position : "catching" Llilypond values..., Xavier Scheuer, 2011/02/11
- Re: Slur position : "catching" Llilypond values..., David Nalesnik, 2011/02/11
- Re: Slur position : "catching" Llilypond values..., Phil Holmes, 2011/02/13
- Re: Slur position : "catching" Llilypond values..., Dmytro O. Redchuk, 2011/02/14
- Re: Slur position : "catching" Llilypond values..., David Nalesnik, 2011/02/14
- Re: Slur position : "catching" Llilypond values..., Dmytro O. Redchuk, 2011/02/14
- Re: Slur position : "catching" Llilypond values..., Nick Payne, 2011/02/14
- Re: Slur position : "catching" Llilypond values..., David Nalesnik, 2011/02/14