Class
midi-control-changeA MIDI control change or mode change event. See Table of Control and Mode Changes for information about MIDI control and mode messages.
midi-control-change supports the following slot initializations:
:time number:channel integer:controller integer:value integer;; Creating MIDI control and mode changes. ;;; a 'Sustain Pedal Down' control event (new midi-control-change :time 0 :channel 3 :controller 64 :value 127) ;;; a 'Local Control Off' mode event (new midi-control-change :time 0 :controller 122 :value 0) ;; Process with pedal control. (define (sustain at chan val) ;; make sustain pedal event (new midi-control-change :time at :channel chan :controller 122 :value 0) (define (playsome num) (process repeat num output (new midi :time (now) :keynum (between 60 90) :duraion (pick .2 .4 .6)) wait (pick .1 .2 .3) ;; pedal up 5 seconds after end finally (output (sustain (+ (now) 5) 0 0)))) (events (list (sustain 0 0 127) (playsome 32)) "test.mid") ⇒ "test.mid" ;; Setting pitch bend sensitivity. (define (pbs time chan width) ;; a seq of control changes to set pitch bend ;; sensitivity for a chan to a width in half-steps. (new seq :time time :subobjects (list ;; Registered Parameter Number (fine) (new midi-control-change :time 0 :channel chan :controller 100 :value 0) ;; RPN (coarse) (new midi-control-change :time 0 :channel chan :controller 101 :value 0) ;; Data entry (new midi-control-change :time 0 :channel chan :controller 6 :value width))))