lilypond-user
[Top][All Lists]
Advanced

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

Re: placement sostenuto


From: Thomas Morley
Subject: Re: placement sostenuto
Date: Sat, 24 Sep 2011 15:59:35 +0200

2011/9/24 David Nalesnik <address@hidden>
( . . .)

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

Hi David,

I don't know, why it doesn't work this way. But the following seems to be successful:

#(define (proc x y)
  (lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1)
          (ly:grob-set-property! grob 'padding x)
          (ly:grob-set-property! grob 'padding y)
          )))
       
\relative c' {

  \once \override  Script #'after-line-breaking =
      #(proc 5 0.2)
  c1^-
%{
  \once \override  Script #'after-line-breaking =
      #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1)
          (ly:grob-set-property! grob 'padding 5)
          (ly:grob-set-property! grob 'padding 0.2)
          ))
  c1^-
%}  
  \once \override  Script #'Y-offset =
      #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2))
  c1^-
}

Best,
  Harm

reply via email to

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