Mercurial > hg > amuse
comparison implementations/mtp/methods.lisp @ 110:ea542c06c364
implementations/mtp: update to reflect refactoring of diatonic pitch
darcs-hash:20070726141940-c0ce4-2c511298f961f5d2c6ca8beb41c11516fb305de9.gz
author | Marcus Pearce <m.pearce@gold.ac.uk> |
---|---|
date | Thu, 26 Jul 2007 15:19:40 +0100 |
parents | 43d3e707b384 |
children | fd85f52d9f9d |
comparison
equal
deleted
inserted
replaced
109:a9a1c7aa86a9 | 110:ea542c06c364 |
---|---|
248 (make-chromatic-pitch (%mtp-cpitch e))) | 248 (make-chromatic-pitch (%mtp-cpitch e))) |
249 | 249 |
250 (defmethod midi-pitch-number ((e mtp-event)) | 250 (defmethod midi-pitch-number ((e mtp-event)) |
251 (%mtp-cpitch e)) | 251 (%mtp-cpitch e)) |
252 | 252 |
253 (defmethod meredith-morphetic-pitch-number ((e mtp-event)) | 253 (defmethod diatonic-pitch-cp ((e mtp-event)) |
254 ;; MIPS morphetic pitch is relative to An0 while cpitch is relative to Cn2 | |
255 (- (%mtp-cpitch e) 21)) | |
256 | |
257 (defmethod diatonic-pitch-mp ((e mtp-event)) | |
254 ;; MIPS morphetic pitch is relative to An0 while mpitch is relative to Cn2 | 258 ;; MIPS morphetic pitch is relative to An0 while mpitch is relative to Cn2 |
255 (- (%mtp-mpitch e) 12)) | 259 (- (%mtp-mpitch e) 12)) |
256 | 260 |
257 (defmethod mips-pitch ((e mtp-event)) | |
258 (make-mips-pitch (meredith-chromatic-pitch-number e) | |
259 (meredith-morphetic-pitch-number e))) | |
260 | |
261 (defmethod diatonic-pitch ((e mtp-event)) | 261 (defmethod diatonic-pitch ((e mtp-event)) |
262 (diatonic-pitch (mips-pitch e))) | 262 (make-mips-pitch (diatonic-pitch-cp e) |
263 (diatonic-pitch-mp e))) | |
263 | 264 |
264 (defmethod asa-pitch-string ((e mtp-event)) | 265 (defmethod asa-pitch-string ((e mtp-event)) |
265 (asa-pitch-string (mips-pitch e))) | 266 (asa-pitch-string (diatonic-pitch e))) |
266 | 267 |
267 #.(clsql:locally-enable-sql-reader-syntax) | 268 #.(clsql:locally-enable-sql-reader-syntax) |
268 (defmethod middle-c ((e mtp-event)) | 269 (defmethod middle-c ((e mtp-event)) |
269 (let ((cpitch (car (clsql:select [midc] :from [dataset] | 270 (let ((cpitch (car (clsql:select [midc] :from [dataset] |
270 :where [= [dataset-id] (dataset-id e)] | 271 :where [= [dataset-id] (dataset-id e)] |