lilypond-user
[Top][All Lists]
Advanced

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

Re: How to adjust the padding between a StemTremolo and a NoteHead?


From: tisimst
Subject: Re: How to adjust the padding between a StemTremolo and a NoteHead?
Date: Tue, 11 Aug 2015 10:14:31 -0700 (MST)



On 8/11/2015 10:59 AM, Robin Bannister [via Lilypond] wrote:
Malte Meyn wrote:

> But unfortunately it doesn’t work properly in 2.19.24 (and 2.18.2)

Yes, I think stems were reworked a lot around 2.16?

Here is that override approach with a duration condition:
... (clipped) ...

Looking into the situation, I've found that there isn't a built-in collision avoidance value but rather a well-tuned set of spacing parameters (unless an actual beam exists, then collisions are taken care of). It's quite easy to have the tremolo flags of unbeamed stems cause collisions with the notehead:

\override Voice.StemTremolo.length-fraction = #1.5



Here's another option that works nicely by adjusting the value for "pad":

\layout {
  \override Voice.StemTremolo.after-line-breaking =
  #(lambda (grob)
    (let* ((pad 1.0) % <--- ADJUST THIS TO TASTE
           (cnt (ly:grob-property grob 'flag-count))
           (stem (ly:grob-object grob 'stem))
           (leng (ly:grob-property stem 'length)))
      (if (> cnt 2)
        (ly:grob-set-property! stem 'length (+ leng pad)))))
}




HTH,
Abraham


View this message in context: Re: How to adjust the padding between a StemTremolo and a NoteHead?
Sent from the User mailing list archive at Nabble.com.

reply via email to

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