Mercurial > hg > amuse
comparison base/methods.lisp @ 105:7f139c81752e
rename make-pitch-interval to make-chromatic-pitch-interval
darcs-hash:20070726092952-dc3a5-5a59469fbb77e74dca807e5fb277c6342bb0891b.gz
author | c.rhodes <c.rhodes@gold.ac.uk> |
---|---|
date | Thu, 26 Jul 2007 10:29:52 +0100 |
parents | 67f96832cfb0 |
children | 8528c316fbcc |
comparison
equal
deleted
inserted
replaced
104:67f96832cfb0 | 105:7f139c81752e |
---|---|
292 (object2 pitch-designator)) ;? | 292 (object2 pitch-designator)) ;? |
293 (pitch+ object2 object1)) | 293 (pitch+ object2 object1)) |
294 | 294 |
295 (defmethod pitch+ ((object1 pitch-interval) | 295 (defmethod pitch+ ((object1 pitch-interval) |
296 (object2 pitch-interval)) | 296 (object2 pitch-interval)) |
297 (make-pitch-interval (+ (span object1) | 297 (make-chromatic-pitch-interval (+ (span object1) (span object2)))) |
298 (span object2)))) | |
299 | 298 |
300 (defmethod pitch- ((object1 pitch-designator) | 299 (defmethod pitch- ((object1 pitch-designator) |
301 (object2 pitch-designator)) | 300 (object2 pitch-designator)) |
302 (make-pitch-interval (- (midi-pitch-number object1) | 301 (make-chromatic-pitch-interval |
303 (midi-pitch-number object2)))) | 302 (- (midi-pitch-number object1) (midi-pitch-number object2)))) |
304 | 303 |
305 (defmethod pitch- ((object1 pitch-designator) | 304 (defmethod pitch- ((object1 pitch-designator) |
306 (object2 pitch-interval)) | 305 (object2 pitch-interval)) |
307 (make-chromatic-pitch (- (midi-pitch-number object1) | 306 (make-chromatic-pitch (- (midi-pitch-number object1) (span object2)))) |
308 (span object2)))) | |
309 | 307 |
310 (defmethod pitch- ((object1 pitch-interval) | 308 (defmethod pitch- ((object1 pitch-interval) |
311 (object2 pitch-interval)) | 309 (object2 pitch-interval)) |
312 (make-pitch-interval (- (span object1) | 310 (make-chromatic-pitch-interval (- (span object1) (span object2)))) |
313 (span object2)))) | |
314 | 311 |
315 (defmethod pitch- ((object1 pitch-interval) | 312 (defmethod pitch- ((object1 pitch-interval) |
316 (object2 pitch-designator)) | 313 (object2 pitch-designator)) |
317 (error 'undefined-action :operation 'pitch- | 314 (error 'undefined-action :operation 'pitch- |
318 :datatype (list (class-of object1) (class-of object2)))) | 315 :datatype (list (class-of object1) (class-of object2)))) |
374 (time= (cut-off object1) (cut-off object2))) | 371 (time= (cut-off object1) (cut-off object2))) |
375 | 372 |
376 ;; ...and | 373 ;; ...and |
377 | 374 |
378 (defmethod period= ((object1 anchored-period) | 375 (defmethod period= ((object1 anchored-period) |
379 (object2 anchored-period)) | 376 (object2 anchored-period)) |
380 (and (time= object1 object2) | 377 (and (time= object1 object2) |
381 (duration= object1 object2))) | 378 (duration= object1 object2))) |
382 (defmethod period= ((object1 floating-period) | 379 (defmethod period= ((object1 floating-period) |
383 (object2 floating-period)) | 380 (object2 floating-period)) |
384 (duration= object1 object2)) | 381 (duration= object1 object2)) |