X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fmidi.scm;h=4888ee3a81ed49712e32d293f046b892d7bc5079;hb=82e1937780c911be71b439a7d1f2006f058f0490;hp=c6d2d430231d039537f140a1b36b5191ccbbd044;hpb=55ac733b69643a6bc6a83b706c65cb56efd388ef;p=lilypond.git diff --git a/scm/midi.scm b/scm/midi.scm index c6d2d43023..4888ee3a81 100644 --- a/scm/midi.scm +++ b/scm/midi.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2000--2011 Jan Nieuwenhuizen +;;;; Copyright (C) 2000--2012 Jan Nieuwenhuizen ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -262,14 +262,14 @@ instrument-names-alist)) (define-public (percussion? instrument) - "returns whether the instrument should use midi channel 9" + "Return @code{#t} if the instrument should use MIDI channel 9." (let* ((inst (symbol->string instrument)) (entry (assoc-get inst instrument-names-alist))) (and entry (>= entry 32768)))) (define-public (midi-program instrument) - "returns the program of the instrument" + "Return the program of the instrument." (let* ((inst (symbol->string instrument)) (entry (assoc-get inst instrument-names-alist))) @@ -282,10 +282,9 @@ (define-public dynamic-default-volume 0.71) (define-public (alterations-in-key pitch-list) - "Count number of sharps minus number of flats" - - (* (apply + (map cdr pitch-list)) 2)) + "Count number of sharps minus number of flats." + (apply + (map (lambda (p) (round (* (cdr p) 2))) pitch-list)) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;