Mercurial > hg > amuse
comparison base/generics.lisp @ 305:39f5fc572953
DRAFT: kludge for tactus-duration
Ignore-this: b5cb875a6d31e7ea35394f335abaddc0
darcs-hash:20091024170612-16a00-3a9ab095515a8510393ac4e61767ddae7a811870.gz
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Sat, 24 Oct 2009 18:06:12 +0100 |
parents | fbeaedd242c6 |
children | a85c59bcd88b |
comparison
equal
deleted
inserted
replaced
304:fbeaedd242c6 | 305:39f5fc572953 |
---|---|
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))))) |