view 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
line wrap: on
line source
(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 &optional
				composition)
  (make-instance 'midi-pitched-event
		 :number pitch-number
		 :velocity velocity
		 :patch patch
		 :channel channel
		 :track track
		 :time onset
		 :interval duration
		 :composition composition))

(defun make-midi-percussive-event (sound velocity patch channel track
				   onset duration &optional
				   composition)
  (make-instance 'midi-percussive-event
		 :sound sound
		 :velocity velocity
		 :patch patch
		 :channel channel
		 :track track
		 :time onset
		 :interval duration
		 :composition composition))