diff implementations/midi/midifile-import.lisp @ 206:1f3873585a5d

Change midifile-import to call event constructors, not make-instance directly.
author Jamie Forth <j.forth@gold.ac.uk>
date Wed, 26 Jan 2011 11:30:28 +0000
parents 4a0e15e2829a
children 619194befdd4
line wrap: on
line diff
--- a/implementations/midi/midifile-import.lisp	Wed Jan 26 10:44:29 2011 +0000
+++ b/implementations/midi/midifile-import.lisp	Wed Jan 26 11:30:28 2011 +0000
@@ -139,23 +139,21 @@
     ((or (= (midi:message-channel note-on) 9)
 	 (> patch 111))
      ;; percussive
-     (make-instance 'midi-percussive-event
-		    :channel (1+ (midi:message-channel note-on))
-		    :track track
-		    :time (/ (midi:message-time note-on) divisions)
-		    :interval (/ (- cut-off (midi:message-time note-on))
-				 divisions)
-		    :velocity (midi:message-velocity note-on)
-		    :patch patch
-		    :sound (midi:message-key note-on)))
+     (make-midi-percussive-event (midi:message-key note-on)
+				 (midi:message-velocity note-on)
+				 patch
+				 (1+ (midi:message-channel note-on))
+				 track
+				 (/ (midi:message-time note-on) divisions)
+				 (/ (- cut-off (midi:message-time note-on))
+				    divisions)))
     (t
      ;; pitched
-     (make-instance 'midi-pitched-event
-		    :channel (1+ (midi:message-channel note-on))
-		    :track track
-		    :time (/ (midi:message-time note-on) divisions)
-		    :interval (/ (- cut-off (midi:message-time note-on))
-				 divisions)
-		    :velocity (midi:message-velocity note-on)
-		    :patch patch
-		    :number (midi:message-key note-on)))))
+     (make-midi-pitched-event (midi:message-key note-on)
+			      (midi:message-velocity note-on)
+			      patch
+			      (1+ (midi:message-channel note-on))
+			      track
+			      (/ (midi:message-time note-on) divisions)
+			      (/ (- cut-off (midi:message-time note-on))
+				 divisions)))))