Mercurial > hg > amuse
diff implementations/geerdes/constructors.lisp @ 133:d041118612d4
Fixed monody import for geerdes
darcs-hash:20070821110338-f76cc-6958b98c5ece929c14f7faa5bc837810254621b9.gz
author | David Lewis <d.lewis@gold.ac.uk> |
---|---|
date | Tue, 21 Aug 2007 12:03:38 +0100 |
parents | 8ea75cc8bc2c |
children | fd85f52d9f9d |
line wrap: on
line diff
--- a/implementations/geerdes/constructors.lisp Mon Aug 20 15:44:32 2007 +0100 +++ b/implementations/geerdes/constructors.lisp Tue Aug 21 12:03:38 2007 +0100 @@ -24,7 +24,9 @@ (%fast-duration row timebase) (%fast-id row))))) (when (%fast-monodyp row) - (push note monody-notes)) + (let ((monody-note (copy-event note))) + (setf (duration monody-note) (%fast-monody-duration row timebase)) + (push monody-note monody-notes))) (when (> (timepoint (cut-off note)) last-time) (setf last-time (timepoint (cut-off note)))) (push note notes) @@ -92,6 +94,8 @@ (eighth event-row)) (defun %fast-monodyp (event-row) (ninth event-row)) +(defun %fast-monody-duration (event-row timebase) + (/ (tenth event-row) timebase)) (defun %fast-tempo (tp-row) (eighth tp-row)) @@ -147,7 +151,7 @@ :velocity velocity :patch patch :id id))) -(defmethod copy-event ((event geerdes-percussive-event)) +(defmethod copy-event ((event geerdes-percussive-event)) (with-slots ((channel amuse-midi::channel) (track amuse-midi::track) (time amuse::time) @@ -157,7 +161,7 @@ (sound amuse-midi::sound) id) event (make-instance 'geerdes-percussive-event - :channel channel + :channel channel :track track :time time :interval interval