mu:testkit   macro


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

Implementation

;; MU:TESTKIT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Play all samples from an Ableton LIVE kit 
;
;; default to 16 samples starting from 36
; (mkscale c2 'chromatic 16) => '(36 ...51)
;;
;; arg1: channel (default:9)
;; 
; Example:
; (mu:testkit 9)
;
(impc:aot:do-or-emit
   (define-macro (mu:testkit . args)
      (cond ((length-equal? args 0) ;; default ch:9
            `(helper:play-plist (*metro* 'get-beat) (mkscale c2 'chromatic 16) 9)) 
            ((length-equal? args 1) ; midi ch
            `(helper:play-plist (*metro* 'get-beat) (mkscale c2 'chromatic 16) ,(car args))) 
            ; `(play-midi-note (now) *mididevice* ,(car args)  80 *second* (- ,(cadr args) 1)))
            (#t (print 'Error: '0 'or '1 'args' 'max))))
)


Back to Index