diff base/generics.lisp @ 250:b3260d1d2419

Add onset-in-bar-relative-to-tactus. This depends on tactus-duration, which needs revisiting.
author Jamie Forth <j.forth@gold.ac.uk>
date Thu, 24 Feb 2011 11:23:18 +0000
parents 70969555ca07
children 6a3adca16910
line wrap: on
line diff
--- a/base/generics.lisp	Thu Feb 24 11:23:18 2011 +0000
+++ b/base/generics.lisp	Thu Feb 24 11:23:18 2011 +0000
@@ -160,10 +160,10 @@
   (:documentation "Not obviously meaningful for non fraction-like
   time signatures"))
 (defgeneric tactus-duration (time-signature)
-  ;; basic, but should do? NO! This defines 6/4 as compound. We need
-  ;; proper simplep and compoundp predicates.
+  ;; basic, but should do? NO! FIXME. This defines 6/4 as compound. We
+  ;; need proper simplep and compoundp predicates. The below hack
+  ;; seems to work for me, but we need to revisit this.
   (:method (ts)
-    (warn "FIXME: tactus-duration is broken")
     (cond
       ;; ((and (not (= (beat-units-per-bar ts) 3))
       ;; 	    (= (rem (beat-units-per-bar ts) 3) 0))
@@ -465,8 +465,13 @@
   bar line."))
 
 (defgeneric onset-in-bar (moment)
-  (:documentation "The position of moment in the bar, measured in
-  beats."))
+  (:documentation "The position of moment in the bar, measured in the
+  timebase of the composition (e.g. crochets regardless of the
+  prevailing time-signature."))
+
+(defgeneric onset-in-bar-relative-to-tactus (moment)
+  (:documentation "The position of moment in the bar, measure in
+  tactus beats."))
 
 ;;;;;;;;;;;;;;
 ;;