helper:inner_mixer   scheme


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

Implementation

;;
;; The :mix inner function actually calling the CC change events.
;;
;; - handle max/min cases 
;; - handle values memory 
;; - call send-midi-cc function on default channel
;;
(define helper:inner_mixer
    (lambda (ch increment min-limit max-limit)
        (if (equal? ch 'all)
            (helper:print-mixers-all)
            (let 
                ((oldval (eval (cadr (assoc ch *mixers*))))
                (newval 0)) 
                ;
                (if *debug*
                    (log-info 'received: ch increment min-limit max-limit oldval)
                    )
                (if (> ch 8)
                    (log-warn 'WARNING 'ch: ch 'invalid))
                ;
                (if (not (integer? min-limit)) 
                    (begin 
                        (println 'min-limit 'should 'be 'an 'integer)
                        (helper:print-mixer ch oldval 'show) )
                    (if (and (negative? increment) 
                             (>= min-limit oldval))
                        ;; when decreasing, min-limit can't be higher than old value
                        (helper:print-mixer ch oldval 'show)


Back to Index

Similar Entries