diff implementations/geerdes/constructors.lisp @ 224:7afb8cfdcdcf

add composition slot to event (geerdes) Ignore-this: 7ece48560d6cc689711c5864e49a0360 darcs-hash:20090828164054-16a00-57b981532296c149640ab1e48439cdb88c41f2cf.gz committer: Jamie Forth <j.forth@gold.ac.uk>
author j.forth <j.forth@gold.ac.uk>
date Thu, 24 Feb 2011 11:23:18 +0000
parents d8f650e3796e
children
line wrap: on
line diff
--- a/implementations/geerdes/constructors.lisp	Thu Feb 24 11:23:18 2011 +0000
+++ b/implementations/geerdes/constructors.lisp	Thu Feb 24 11:23:18 2011 +0000
@@ -34,7 +34,8 @@
 						   (%fast-track row)
 						   (%fast-onset row timebase)
 						   (%fast-duration row timebase)
-						   (%fast-id row))
+						   (%fast-id row)
+						   composition)
 		       (make-geerdes-percussive-event (%fast-pitch row)
 						      (%fast-velocity row)
 						      (%fast-patch row)
@@ -42,7 +43,8 @@
 						      (%fast-track row)
 						      (%fast-onset row timebase)
 						      (%fast-duration row timebase)
-						      (%fast-id row)))))
+						      (%fast-id row)
+						      composition))))
 	(when (%fast-monodyp row)
 	  (let ((monody-note (copy-event note)))
 	     (setf (duration monody-note) (%fast-monody-duration row timebase))
@@ -129,7 +131,8 @@
        (< (%fast-patch event-row) 112)))
 
 (defun make-geerdes-pitched-event (pitch-number velocity patch channel
-				   track onset duration event-id)
+				   track onset duration event-id
+				   composition)
   (make-instance 'geerdes-pitched-event
 		 :number pitch-number
 		 :velocity velocity
@@ -139,11 +142,12 @@
 		 :time onset
 		 :interval duration
 		 :identifier (make-geerdes-event-identifier
-			      event-id)))
+			      event-id)
+		 :composition composition))
 
 (defun make-geerdes-percussive-event (pitch-number velocity patch
 				      channel track onset duration
-				      event-id)
+				      event-id composition)
   (make-instance 'geerdes-percussive-event
 		 :sound pitch-number
 		 :velocity velocity
@@ -153,7 +157,8 @@
 		 :time onset
 		 :interval duration
 		 :identifier (make-geerdes-event-identifier
-			      event-id)))
+			      event-id)
+		 :composition composition))
 
 (defmethod copy-event ((event geerdes-pitched-event))
   (with-slots ((channel amuse-midi::channel)
@@ -163,7 +168,8 @@
 	       (interval amuse::interval)
 	       (velocity amuse-midi::velocity)
 	       (patch amuse-midi::patch)
-	       identifier)
+	       identifier
+	       composition)
       event
     (make-instance 'geerdes-pitched-event
 		   :channel channel
@@ -173,7 +179,8 @@
 		   :interval interval
 		   :velocity velocity
 		   :patch patch
-		   :identifier identifier)))
+		   :identifier identifier
+		   :composition composition)))
 
 (defmethod copy-event ((event geerdes-percussive-event))
   (with-slots ((channel amuse-midi::channel)
@@ -183,7 +190,8 @@
 	       (velocity amuse-midi::velocity)
 	       (patch amuse-midi::patch)
 	       (sound amuse-midi::sound)
-	       identifier)
+	       identifier
+	       composition)
       event
     (make-instance 'geerdes-percussive-event
 		   :channel channel
@@ -193,7 +201,8 @@
 		   :velocity velocity
 		   :patch patch
 		   :sound sound
-		   :identifier identifier)))
+		   :identifier identifier
+		   :composition composition)))
 
 ;; We want any function that generates a sequence from a geerdes
 ;; composition to preserve all slot values: