]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/song.scm
Add support for tempo ranges
[lilypond.git] / scm / song.scm
index 410b3c89df99361cd1b9d75f4fdd11b6ab9bab8a..88b4423702bb0037b33155f97257bdb0f1f14480 100644 (file)
                      (duration->number (ly:music-property tempo-spec 'tempo-unit))))
                  ((music-name? tempo-spec 'SequentialMusic)
                   (* (property-value
-                      (find-child tempo-spec (lambda (elt) (music-property? elt 'tempoUnitCount))))
+                      (find-child tempo-spec (lambda (elt)
+                                              (let ((tempo (music-property? elt 'tempoUnitCount)))
+                                                (if (pair? tempo)
+                                                    (round (/ (+ (car tempo) (cdr tempo)) 2))
+                                                    tempo)))))
                      (duration->number
                       (property-value
                        (find-child tempo-spec (lambda (elt) (music-property? elt 'tempoUnitDuration)))))))