comparison midi-classes-and-constructors.lisp @ 22:99ccd775245a

Moved midi out of main files darcs-hash:20061214125711-f76cc-c9e7f9af1054c67473ff6d8a8e3b84e45fe43f35.gz
author David Lewis <d.lewis@gold.ac.uk>
date Thu, 14 Dec 2006 12:57:11 +0000
parents
children
comparison
equal deleted inserted replaced
21:c389ba869ef9 22:99ccd775245a
1 (cl:in-package #:amuse)
2
3 (defclass midi-message () ;?
4 ((channel :accessor %midi-message-channel :initarg :channel)
5 (track :accessor %midi-message-track :initarg :track)))
6
7 (defclass midi-pitched-event (chromatic-pitched-event midi-message)
8 ((velocity :initarg :velocity)
9 (patch :initarg :patch)))
10
11 (defclass midi-percussive-event (percussive-event midi-message)
12 ((velocity :initarg :velocity)
13 (patch :initarg :patch)
14 (sound :initarg :sound)))
15
16 (defclass midi-key-signature (basic-key-signature)
17 ;; Is mode ever used in real life? Is it ever accurately used in
18 ;; real life?
19 ((mode :accessor %midi-key-signature-mode
20 :initarg mode)))
21
22 ;;; Constructors
23
24 (defun make-midi-pitched-event (pitch-number velocity patch
25 channel track onset duration)
26 (make-instance 'midi-pitched-event
27 :number pitch-number
28 :velocity velocity
29 :patch patch
30 :channel channel
31 :track track
32 :time onset
33 :interval duration))
34
35 (defun make-midi-percussive-event (pitch-number velocity patch
36 channel track onset duration)
37 (make-instance 'midi-percussive-event
38 :sound pitch-number
39 :velocity velocity
40 :patch patch
41 :channel channel
42 :track track
43 :time onset
44 :interval duration))
45
46 (defun make-midi-key-signature (sharp-count mode onset duration)
47 (make-instance 'midi-key-signature
48 :sharp-count sharp-count
49 :mode mode
50 :time onset
51 :interval duration))
52