# HG changeset patch # User Marcus Pearce # Date 1248339430 -3600 # Node ID 80c227c1c0da4f8ddec20c735daa24ad1dfa18d2 # Parent 2d2bc910c364a0001614fb81cb1c27c836a9cb0c The MTP implementation of AMUSE:MONODY now uses the voice of the first event in the piece. darcs-hash:20090723085710-c0ce4-0324442e9897c7a903fa20cfd16d18f880718439.gz diff -r 2d2bc910c364 -r 80c227c1c0da implementations/mtp/methods.lisp --- 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