\version "2.19.24" % ideas found at % http://www.lilypondforum.de/index.php?topic=1734.msg9614#msg9614 % http://lsr.di.unimi.it/LSR/Item?id=884 unstrangleTremolos = #(define-music-function (music) (ly:music?) (music-map (lambda (m) (if (music-is-of-type? m 'note-event) (let* ((a (ly:music-property m 'articulations)) (d (ly:music-property m 'duration)) (r (filter (lambda (v) (eq? (ly:music-property v 'name) 'TremoloEvent)) a)) (t (if (null? r) #f (car r)))) (if (and (> (ly:duration-log d) 0) (< (ly:duration-log d) 3)) (if (and t (> (ly:music-property t 'tremolo-type) 16)) (begin (ly:music-set-property! m 'tweaks (append (ly:music-property m 'tweaks) (list (cons (cons (quote Stem) (quote length)) (lambda (grob) (+ 1 (ly:stem::calc-length grob))))))) m) m) m)) m)) music)) 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 "“unstrangled”" % Does anyone know a better word? I used this because with original behaviour % some notes look like they were strangled by the tremolo. \unstrangleTremolos { \music \stemUp \music }