mplay   macro


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm

Implementation

(impc:aot:do-or-emit
 (define-macro (mplay . args)
   (if (symbol? (car args))
       `(if (list? ,(cadr args))
            (map (lambda (p)
                  (play-midi-note (+ (*metro* beat) *midioffset*) ,(car args)
                    (real->integer p)
                    (real->integer ,(caddr args))
                    (*metro* 'dur ,(car (cdddr args)))
                    (real->integer , (car (cddddr args)))))
              ,(cadr args))
            (play-midi-note (+ (*metro* beat) *midioffset*) ,(car args)
                              (real->integer ,(cadr args))
                              (real->integer ,(caddr args))
                              (*metro* 'dur ,(car (cdddr args)))
                              (real->integer , (car (cddddr args)))))
        `(if (list? ,(caddr args))
             (map (lambda (p)
              (play-midi-note (+ (*metro* (+ beat ,(car args))) *midioffset*) ,(cadr args)
                                (real->integer p)
                                (real->integer ,(car (cdddr args)))
                                (*metro* 'dur ,(cadr (cdddr args)))
                                (real->integer , (cadr (cddddr args)))))
                  ,(caddr args))
              (play-midi-note (+ (*metro* (+ beat ,(car args))) *midioffset*) ,(cadr args)
                                (real->integer ,(caddr args))
                                (real->integer ,(car (cdddr args)))
                                (*metro* 'dur ,(cadr (cdddr args)))
                                (real->integer , (cadr (cddddr args))))))))


Back to Index

Similar Entries