Oops. I made a tiny error in a comment in
adjust-stem-lengths.ly:
"use the note-head farthest from the stem end"
should read
"use the note-head closest to the stem end"
- Mark
\version "2.13.18"
#(define adjust-stem-lengths
(lambda (stem)
(let*
((direction (ly:grob-property stem 'direction))
(note-heads-array (ly:grob-object stem 'note-heads))
(staff-position
;; use the note-head closest to the stem end
(let loop ((staff-positions '()))
(if (= (length staff-positions)
(ly:grob-array-length note-heads-array))
(if (= UP direction)
(apply max staff-positions)
(apply min staff-positions))
(loop
(append staff-positions
(list (ly:grob-staff-position
(ly:grob-array-ref
note-heads-array
(length staff-positions))))))))))
(case direction
((1) (case staff-position
((-1) 6.5)
(( 1) 5.5)
(else ly:stem::calc-length)))
(else (case staff-position
((-2) 5.5)
(( 0) 6.5)
(else ly:stem::calc-length)))))))
\relative f' {
\time 5/4
\stemUp g4^"default stem lengths" a b c d
\stemDown c4 b a g f
\override Stem #'length = #adjust-stem-lengths
\stemUp g4^"adjusted stem lengths" a b c d
\stemDown c4 b a g f
}
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel