;
; enhanced version of cosr that also floors the value - for ratios
(macro (cosratio args)
(if (> (length args) 5)
`(real->rational (+ ,(caddr args) (* ,(cadddr args) (cos (* 2pi (+ beat ,(cadr args)) ,(car (cddddr args)))))))
`(real->rational (+ ,(cadr args) (* ,(caddr args) (cos (* 2pi beat ,(cadddr args))))))))