On Fri, Sep 23, 2011 at 7:28 PM, Thomas Morley < thomasmorle...@googlemail.com> wrote:
> 2011/9/24 David Nalesnik <david.nales...@gmail.com> > >> Hi Harm, >> >> On Fri, Sep 23, 2011 at 5:52 PM, Thomas Morley < >> thomasmorle...@googlemail.com> wrote: >> >>> >>> >>> 2011/9/24 Thomas Morley <thomasmorle...@googlemail.com> >>> >>>> >>>> There might be another point of interest: How to reset? >>>> >>>> I'm aware it could be done with a new #(assoc-set! ... ) using default >>>> values. >>>> >>> >>> I was wrong: This doesn't work! Sorry! >>> >> >> Yes, if you set the 'padding value like this, it will apply to all tenuto >> marks in your file. If you reset it to another value, it will change the >> 'padding values of every tenuto to the new value. So, unfortunately, it's >> not like using \override and \revert. >> >> You could do something like this to "revert" to Lily's default: >> >> \version "2.14.2" >> >> #(assoc-set! (assoc-ref default-script-alist "tenuto") 'padding 0.75) >> >> { >> c''1_- >> \once \override Script #'padding = #0.2 >> c''1_- >> c''1_- >> } >> >> I was hoping to be able to set 'padding to a procedure. But 'padding >> doesn't respond if set that way, as I noted on an earlier email of this >> thread. I wonder if I'm doing something wrong here -- can 'padding be set >> to a procedure somehow? >> >> David >> > Hi David, > > (a) I did some very simple exercises on 'padding and procedures: > > #(define (add a b) > (+ a b)) > > #(define sum > (lambda (x y) > (+ x y))) > > > \relative c' { > \once \override Script #'padding = #3 > c'1-- > \once \override Script #'padding = #(+ 1 2) > c1-- > \once \override Script #'padding = #(add 1 2) > c1-- > \once \override Script #'padding = #(sum 1 2) > c1-- > \once \override Script #'padding = #((lambda (x y) (+ x y)) 1 2) > c1-- > } > > Seems to work. > > True, but not for all procedures . . . In the following snippet, the override of 'Y-offset works, but the one of 'padding doesn't. \version "2.14.2" \relative c' { \once \override Script #'padding = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- \once \override Script #'Y-offset = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- } -David
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user