comparison base/classes.lisp @ 296:68aadc4eb96d

add chromatic-pitch reader method Ignore-this: 1aba35b7d196e0994a817609337746e1 darcs-hash:20090828145217-16a00-312e63170f50f0bf2834b8959a72e5c857cba9b8.gz
author j.forth <j.forth@gold.ac.uk>
date Fri, 28 Aug 2009 15:52:17 +0100
parents d1e5bbcc5ea4
children fb27101cde2b
comparison
equal deleted inserted replaced
295:ced696bd9871 296:68aadc4eb96d
51 ;; pitch-related classes 51 ;; pitch-related classes
52 52
53 (defclass frequency-pitch (pitch) ()) 53 (defclass frequency-pitch (pitch) ())
54 54
55 (defclass chromatic-pitch (pitch) 55 (defclass chromatic-pitch (pitch)
56 ((number :accessor %chromatic-pitch-number :initarg :number)) 56 ((number :accessor %chromatic-pitch-number
57 (:documentation "A pitch represented as a number, with 57 :reader chromatic-pitch-number :initarg :number))
58 chromatic pitches having distinct values.")) 58 (:documentation "A pitch represented as a number, with chromatic
59 pitches having distinct values. FIXME: We should not be using the cl
60 symbol NUMBER."))
61
59 (defclass diatonic-pitch (pitch) 62 (defclass diatonic-pitch (pitch)
60 ((cp :initarg :cp :accessor %p-pc :reader diatonic-pitch-cp) 63 ((cp :initarg :cp :accessor %p-pc :reader diatonic-pitch-cp)
61 (mp :initarg :mp :accessor %p-pm :reader diatonic-pitch-mp)) 64 (mp :initarg :mp :accessor %p-pm :reader diatonic-pitch-mp))
62 (:documentation "A diatonic pitch, represented using MIPS: cp is an 65 (:documentation "A diatonic pitch, represented using MIPS: cp is an
63 integer representing chromatic pitch (An0 = 0, middle C = 39); mp is 66 integer representing chromatic pitch (An0 = 0, middle C = 39); mp is