]> git.donarmstrong.com Git - lilypond.git/commitdiff
Articulate.ly: Fix trill timing
authorTristan Jelacic <Tristanjelacic@gmail.com>
Mon, 12 Jan 2015 18:41:33 +0000 (18:41 +0000)
committerJames Lowe <pkx166h@gmail.com>
Mon, 12 Jan 2015 19:11:06 +0000 (19:11 +0000)
Issue 4190

Used a fixed duration for the twiddletime
instead of the broken heuristic that was
used before. This improves trill sound for
slow music, and doesn't interfere with fast music.

ly/articulate.ly

index 6992c87ebdc94b8a7a09860153d7494655b8354a..e3056b4555612bc3cb421da0028f89793e6f953a 100644 (file)
              (ly:music-property music 'elements)))
         (pre-t (if (pair? tr) (ly:music-property (car tr) 'twiddle)
                 '()))
+        (hemisemidur (ly:make-duration 5 0 1/1))
         (t (ac:targetTwiddleTime)))
    (if (ly:moment? pre-t)
     pre-t
-    (let loop ((len (ly:music-length music)))
-     (if (ly:moment<? t len)
-      (loop (ly:moment-mul len (ly:make-moment 1/2)))
-      len)))))
+    hemisemidur)))
 
 
 
         (t (ac:twiddletime music))
         (uppernote '())
         (note_moment (ly:moment-mul t (ly:make-moment 1/2)))
-        (c1 (ly:moment-div orig-len note_moment))
+        (c1 (ly:moment-div orig-len t))
         (c2 (inexact->exact
              (round (/ (ly:moment-main-numerator c1)
                      (* 2 (ly:moment-main-denominator c1))))))