cosratio   macro


Defined in:  https://github.com/lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm

Implementation

;
; 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))))))))


Back to Index