|
From: | Robin Bannister |
Subject: | Re: How to adjust the padding between a StemTremolo and a NoteHead? |
Date: | Tue, 11 Aug 2015 18:55:43 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
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: %%%%%%%%%% \version "2.18.0" #(define (stem-stretch stem-tremolo-grob) (let ((flag-count (ly:grob-property stem-tremolo-grob 'flag-count))) (if (> flag-count 2) 1 0))) #(define (longer-for-tremolo stem-grob) (let* ( (stem-tremolo-grob (ly:grob-object stem-grob 'tremolo-flag)) (plain-stem? (< (ly:grob-property stem-grob 'duration-log) 8)) ) (+ (ly:stem::calc-length stem-grob) (if (and (ly:grob? stem-tremolo-grob) plain-stem?) (stem-stretch stem-tremolo-grob) 0)))) music = \relative { b'1:32 b2: b4: b8: b: b4:8 b:16 b:32 b:64 b!2:32 b8:16 b: b: b: \tweak color #green b2:32 b } \markup "original LilyPond behaviour" { \music \stemUp \music } \markup "longer-for-tremolo" { \override Stem.length = #longer-for-tremolo \music \stemUp \music } %%%%%%%%%% Cheers, Robin
[Prev in Thread] | Current Thread | [Next in Thread] |