cosrfloor   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 (eg useful for generating notes, or precise beats)
(macro (cosrfloor args)
   (if (> (length args) 5)
       `(floor (+ ,(caddr args) (* ,(cadddr args) (cos (* 2pi (+ beat ,(cadr args)) ,(car (cddddr args)))))))
       `(floor (+ ,(cadr args) (* ,(caddr args) (cos (* 2pi beat ,(cadddr args))))))))


Back to Index