annotate midi-classes-and-constructors.lisp @ 24:8d2b1662f658

base/*.lisp: move files in amuse-base to subdirectory. darcs-hash:20061215161617-aa3d6-1b63bd555b02ec02aa2db12d335e8b726e2108cd.gz
author m.pearce <m.pearce@gold.ac.uk>
date Fri, 15 Dec 2006 16:16:17 +0000
parents 99ccd775245a
children
rev   line source
d@22 1 (cl:in-package #:amuse)
d@22 2
d@22 3 (defclass midi-message () ;?
d@22 4 ((channel :accessor %midi-message-channel :initarg :channel)
d@22 5 (track :accessor %midi-message-track :initarg :track)))
d@22 6
d@22 7 (defclass midi-pitched-event (chromatic-pitched-event midi-message)
d@22 8 ((velocity :initarg :velocity)
d@22 9 (patch :initarg :patch)))
d@22 10
d@22 11 (defclass midi-percussive-event (percussive-event midi-message)
d@22 12 ((velocity :initarg :velocity)
d@22 13 (patch :initarg :patch)
d@22 14 (sound :initarg :sound)))
d@22 15
d@22 16 (defclass midi-key-signature (basic-key-signature)
d@22 17 ;; Is mode ever used in real life? Is it ever accurately used in
d@22 18 ;; real life?
d@22 19 ((mode :accessor %midi-key-signature-mode
d@22 20 :initarg mode)))
d@22 21
d@22 22 ;;; Constructors
d@22 23
d@22 24 (defun make-midi-pitched-event (pitch-number velocity patch
d@22 25 channel track onset duration)
d@22 26 (make-instance 'midi-pitched-event
d@22 27 :number pitch-number
d@22 28 :velocity velocity
d@22 29 :patch patch
d@22 30 :channel channel
d@22 31 :track track
d@22 32 :time onset
d@22 33 :interval duration))
d@22 34
d@22 35 (defun make-midi-percussive-event (pitch-number velocity patch
d@22 36 channel track onset duration)
d@22 37 (make-instance 'midi-percussive-event
d@22 38 :sound pitch-number
d@22 39 :velocity velocity
d@22 40 :patch patch
d@22 41 :channel channel
d@22 42 :track track
d@22 43 :time onset
d@22 44 :interval duration))
d@22 45
d@22 46 (defun make-midi-key-signature (sharp-count mode onset duration)
d@22 47 (make-instance 'midi-key-signature
d@22 48 :sharp-count sharp-count
d@22 49 :mode mode
d@22 50 :time onset
d@22 51 :interval duration))
d@22 52