Mercurial > hg > amuse
annotate implementations/midi/constructors.lisp @ 249:bba5e8571b92
Hack in linked-events for the midi package.
Some refactoring of the constructors for this and geerdes might be helpful,
since neither lend themselves to using initialize-instance for performing
the linking.
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Thu, 24 Feb 2011 11:23:18 +0000 |
parents | 2b31a375701b |
children |
rev | line source |
---|---|
m@25 | 1 (cl:in-package #:amuse-midi) |
m@25 | 2 |
m@144 | 3 (defun make-midifile-identifier (pathname) |
m@144 | 4 (make-instance 'midifile-identifier :path pathname)) |
m@144 | 5 |
j@249 | 6 (defun make-midi-pitched-event (pitch-number velocity patch channel |
j@249 | 7 track onset duration &optional |
j@249 | 8 composition) |
m@25 | 9 (make-instance 'midi-pitched-event |
m@25 | 10 :number pitch-number |
m@25 | 11 :velocity velocity |
m@25 | 12 :patch patch |
m@25 | 13 :channel channel |
m@25 | 14 :track track |
m@25 | 15 :time onset |
j@249 | 16 :interval duration |
j@249 | 17 :composition composition)) |
m@25 | 18 |
j@249 | 19 (defun make-midi-percussive-event (sound velocity patch channel track |
j@249 | 20 onset duration &optional |
j@249 | 21 composition) |
m@25 | 22 (make-instance 'midi-percussive-event |
j@206 | 23 :sound sound |
m@25 | 24 :velocity velocity |
m@25 | 25 :patch patch |
m@25 | 26 :channel channel |
m@25 | 27 :track track |
m@25 | 28 :time onset |
j@249 | 29 :interval duration |
j@249 | 30 :composition composition)) |
m@25 | 31 |
m@25 | 32 |