(bind-func sub_noise_cc
(lambda ()
(let ((val 0.0:f))
(lambda (inst offset:i32 cc:i32 value:i32)
;; (println 'sub_noise_cc cc value)
(set! val (/ (i32tof value) 127.0))
(cond ((= cc (+ offset 0)) ;; amplitude of sub osc
(set_sub_amp inst (* 2.0 val)))
((= cc (+ offset 1)) ;; noise amp
(set_noise_amp inst (* 2.0 val)))
((= cc (+ offset 2)) ;; noise type
(set_noise_type inst (get_noisetype value)))
((= cc (+ offset 3)) ;; filter type
(set_filter_type inst (get_filtertype value))))))))