changeset 292:80c227c1c0da

The MTP implementation of AMUSE:MONODY now uses the voice of the first event in the piece. darcs-hash:20090723085710-c0ce4-0324442e9897c7a903fa20cfd16d18f880718439.gz
author Marcus Pearce <m.pearce@gold.ac.uk>
date Thu, 23 Jul 2009 09:57:10 +0100
parents 2d2bc910c364
children 908a98b6336e
files implementations/mtp/methods.lisp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/implementations/mtp/methods.lisp	Wed Jul 22 13:37:45 2009 +0100
+++ b/implementations/mtp/methods.lisp	Thu Jul 23 09:57:10 2009 +0100
@@ -107,6 +107,7 @@
   (monody (get-composition identifier)))
 
 (defmethod monody ((c mtp-composition))
+  ;; using the voice of the first event in the piece
   (let ((monody (make-instance 'mtp-monody 
                                :dataset-id (dataset-id c)
                                :composition-id (composition-id c)
@@ -114,8 +115,10 @@
                                :time 0 
                                :interval (duration c)))
         (events nil)
-        (monody-voice 1))
+        (monody-voice nil))
     (sequence:dosequence (event c)
+      (when (null monody-voice)
+        (setf monody-voice (%mtp-voice event)))
       (when (= (%mtp-voice event) monody-voice)
         (push event events)))
     (sequence:adjust-sequence