;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 2000--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2000--2008 Jan Nieuwenhuizen <janneke@gnu.org>
("pp" . 0.49)
("ppp" . 0.42)
("pppp" . 0.34)
- ("ppppp" . 0.25) )
+ ("ppppp" . 0.25)
)
absolute-volume-alist))
(define-public (alterations-in-key pitch-list)
"Count number of sharps minus number of flats"
- (/ (apply + (map cdr pitch-list)) 2))
+
+ (* (apply + (map cdr pitch-list)) 2))
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+
+(define-public (write-performances-midis performances basename . rest)
+ (let ((midi-ext (ly:get-option 'midi-extension)))
+ (let
+ loop
+ ((perfs performances)
+ (count (if (null? rest) 0 (car rest))))
+ (if (pair? perfs)
+ (begin
+ (ly:performance-write
+ (car perfs)
+ (if (> count 0)
+ (format #f "~a-~a.~a" basename count midi-ext)
+ (format #f "~a.~a" basename midi-ext)))
+ (loop (cdr perfs) (1+ count)))))))