atbtw   macro


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

Implementation

;;
;; atbtw
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; same as at, but with range
;; Note: this is like when-btw
;;
;; example
;
; (let ((beat (*metro* 'get-beat 1))) 
;     (atbtw 4 0 4
;         (log-info beat)
;         (log-info 'hi)
; ))  
;
(impc:aot:do-or-emit
    (define-macro (atbtw x y z . args)
    `(if (and (> (modulo beat ,x) ,y) (< (modulo beat ,x) ,z)) 
            (begin ,@args)))
)


Back to Index