lilypond-user
[Top][All Lists]
Advanced

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

Re: Dot sizes


From: Kieren MacMillan
Subject: Re: Dot sizes
Date: Mon, 27 Sep 2021 09:08:53 -0400

Hi Paul,

Lukas’s solution
> Probably the easiest way would be to re-define the "-." command:

is nice and simple — if that’s the only tweak you have, then you should 
probably use it.

If, on the other hand, you have lots of tweaks for different types of scripts, 
then here’s a more “centralized” solution:

%%%  SNIPPET BEGINS
#(define ((custom-script-tweaks ls) grob)
  (let* ((type (ly:prob-property (assoc-ref (ly:grob-properties grob)
'cause) 'articulation-type))
         (tweaks (assoc-ref ls type)))
    (if tweaks
        (for-each (lambda (x) (ly:grob-set-property! grob (car x)
(cdr x))) tweaks)
        '())))

#(define my-scripts '(
   ("staccato" . ((font-size . -5)))
   ("fermata" . ((padding . 5)))
   ))

\layout {
  \context {
    \Score
    \override Script.before-line-breaking = #(custom-script-tweaks my-scripts)
  }
}

\score
{
        {
                c'4-. c2\fermata c4\accent
        }
}
%%%  SNIPPET ENDS

Hope that helps!
Kieren.


reply via email to

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