Mercurial > hg > amuse
changeset 144:70c716a6eb72
implementations/midi/: add and export make-midifile-identifier
darcs-hash:20070924113352-c0ce4-784da935f20dcfda828184780e37f5d961ca8390.gz
author | Marcus Pearce <m.pearce@gold.ac.uk> |
---|---|
date | Mon, 24 Sep 2007 12:33:52 +0100 |
parents | b753a56c373b |
children | b5b18959c301 |
files | implementations/midi/constructors.lisp implementations/midi/package.lisp utils/utils.lisp |
diffstat | 3 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/implementations/midi/constructors.lisp Tue Sep 11 11:39:04 2007 +0100 +++ b/implementations/midi/constructors.lisp Mon Sep 24 12:33:52 2007 +0100 @@ -1,5 +1,8 @@ (cl:in-package #:amuse-midi) +(defun make-midifile-identifier (pathname) + (make-instance 'midifile-identifier :path pathname)) + (defun make-midi-pitched-event (pitch-number velocity patch channel track onset duration) (make-instance 'midi-pitched-event
--- a/implementations/midi/package.lisp Tue Sep 11 11:39:04 2007 +0100 +++ b/implementations/midi/package.lisp Mon Sep 24 12:33:52 2007 +0100 @@ -6,6 +6,7 @@ #:midi-percussive-event #:make-midi-pitched-event #:make-midi-percussive-event + #:make-midifile-identifier #:midi-channel #:midi-track #:midi-velocity
--- a/utils/utils.lisp Tue Sep 11 11:39:04 2007 +0100 +++ b/utils/utils.lisp Mon Sep 24 12:33:52 2007 +0100 @@ -34,7 +34,7 @@ (incf s (if (disjoint tempo object1) 0 (* (/ (duration (period-intersection tempo object1)) - (duration (crotchet constituent))) + (duration (crotchet object2))) (amuse:microseconds-per-crotchet tempo))))))) (defmethod beats-to-seconds ((object1 standard-moment) (object2 constituent))