(bind-func cerberus_matrix_cc
(lambda ()
(let ((val 0.0:f)
(source 0) ;; of 4
(target 0)) ;; of 32
(lambda (inst offset:i32 cc:i32 value:i32)
;; (println 'cerberus_matrix_cc cc value)
(set! val (/ (i32tof value) 127.0))
(cond ((= cc (+ offset 0)) ;; mod source
(set! source value)
void)
((= cc (+ offset 1)) ;; mod target
(set! target value)
void)
((= cc (+ offset 2)) ;; set amt of modulation
;; (println 'setting source target val)
(set_mod_matrix inst (% source 4) (% target 32) val)
void))))))