io:midi-out

(io:midi-out time device type channel a [b])


Description:

Send midi to device (returned by the function connect-midi-destination or you can use *io:midi-virtual-device*).  Some constants are available for event types *io:midi-on* (note one) *io:midi-off* (note off) *io:midi-pc* (program change) *io:midi-cc* (control change).  You can use *io:midi-virtual-device* as a virtual device source


Arguments:

              a -- byte 1

              b -- bypte 2 is optional (a program change for example does not require byte 2)

           type -- the type of the midi message (i.e. #x9 for note-on).

           time -- time in samples to send midi message


Returns: boolean


Related: io:midi-destination 


Examples:

; connect to output destination

(define output-destination (io:midi-destination 0))

; send midi program change 19 to channel 0

(io:midi-out (now) output-destination *io:midi-pc* 0 19)

; send value 22 to control change 16 on channel 2

(io:midi-out (now) output-destination *io:midi-cc* 2 16 22)



Back to index