comparison base/generics.lisp @ 231:7a5618d334e4

DRAFT: kludge for tactus-duration Ignore-this: b5cb875a6d31e7ea35394f335abaddc0 darcs-hash:20091024170612-16a00-3a9ab095515a8510393ac4e61767ddae7a811870.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 32b40c50075e
children eb4d239f5437
comparison
equal deleted inserted replaced
230:32b40c50075e 231:7a5618d334e4
158 (defgeneric time-signature-denominator (time-signature) 158 (defgeneric time-signature-denominator (time-signature)
159 (:method (ts) (beat-units ts)) 159 (:method (ts) (beat-units ts))
160 (:documentation "Not obviously meaningful for non fraction-like 160 (:documentation "Not obviously meaningful for non fraction-like
161 time signatures")) 161 time signatures"))
162 (defgeneric tactus-duration (time-signature) 162 (defgeneric tactus-duration (time-signature)
163 ;; basic, but should do? 163 ;; basic, but should do? NO! This defines 6/4 as compound. We need
164 ;; proper simplep and compoundp predicates.
164 (:method (ts) 165 (:method (ts)
166 (warn "FIXME: tactus-duration is broken")
165 (cond 167 (cond
166 ((and (not (= (beat-units-per-bar ts) 3)) 168 ;; ((and (not (= (beat-units-per-bar ts) 3))
169 ;; (= (rem (beat-units-per-bar ts) 3) 0))
170 ((and (= (beat-units ts) 8)
167 (= (rem (beat-units-per-bar ts) 3) 0)) 171 (= (rem (beat-units-per-bar ts) 3) 0))
168 ;; compound time 172 ;; compound time
169 (* (/ 4 (beat-units ts)) 173 (* (/ 4 (beat-units ts))
170 3)) 174 3))
171 (t (/ 4 (beat-units ts))))) 175 (t (/ 4 (beat-units ts)))))