comparison base/generics.lisp @ 233:eb4d239f5437

add some time-related generic functions to base Ignore-this: 8ad91dcfa5c8a0301c29dda7d2f27802 darcs-hash:20100212101520-16a00-6821cd98b78bf27be148e3e7e4b46c8f0b80928b.gz committer: Jamie Forth <j.forth@gold.ac.uk>
author j.forth <j.forth@gold.ac.uk>
date Thu, 24 Feb 2011 11:23:18 +0000
parents 7a5618d334e4
children 70969555ca07
comparison
equal deleted inserted replaced
232:061ae49a0b41 233:eb4d239f5437
449 (defgeneric current-bar (moment composition) 449 (defgeneric current-bar (moment composition)
450 (:documentation "Returns an <anchored-period> representing the 450 (:documentation "Returns an <anchored-period> representing the
451 bar which contains moment")) 451 bar which contains moment"))
452 452
453 (defgeneric beat-period (moment time-signature implementation-object) 453 (defgeneric beat-period (moment time-signature implementation-object)
454 (:documentation "Takes a moment, time signature object and crotchet and returns 454 (:documentation "Takes a moment, time signature object and crotchet
455 an <anchored-period> for the containing beat containing moment. This 455 and returns an <anchored-period> for the containing beat containing
456 is more useful when there's a complex time signature (not currently 456 moment. This is more useful when there's a complex time
457 possible) in which tactus is different in different parts of the 457 signature (not currently possible) in which tactus is different in
458 bar (e.g. 3+3+2/8)")) 458 different parts of the bar (e.g. 3+3+2/8)"))
459 (defgeneric current-beat (moment composition) 459 (defgeneric current-beat (moment composition)
460 (:documentation "Returns an <anchored-period> representing the 460 (:documentation "Returns an <anchored-period> representing the
461 tactus unit which contains moment")) 461 tactus unit which contains moment"))
462 462
463 (defgeneric ioi-from-bar (moment)
464 (:documentation "Returns the IOI of moment (i.e. an event) from the
465 bar line."))
466
467 (defgeneric onset-in-bar (moment)
468 (:documentation "The position of moment in the bar, measured in
469 beats."))
463 470
464 ;;;;;;;;;;;;;; 471 ;;;;;;;;;;;;;;
465 ;; 472 ;;
466 ;; 473 ;;
467 474