midi
module reference
midi
module reference
MIDI integration.
index
- `num` from cc-change messages.
- gate from note-on and note-off messages.
- Create a MIDI input port.
- Create a MIDI output port.
- Create a bidirectional MIDI port.
- Get all MIDI port names.
- send MIDI note events.
- `bang`s from note-on messages.
- `bang`s from note-on messages.
details
- `num` from cc-change messages.
(midi/cc [port] cc [range] [chan])
range
can be one of:- ‘raw’ [ 0 - 128[
- ‘uni’ [ 0 - 1[ (default)
- ‘bip’ [-1 - 1[
- ‘rad’ [ 0 - tau[
- ‘deg’ [ 0 - 360[
- (num) [ 0 - num[
- gate from note-on and note-off messages.
(midi/gate [port] note [chan])
- Create a MIDI input port.
(midi/input name [port])
- Create a MIDI output port.
(midi/output name [port])
- Create a bidirectional MIDI port.
(midi/port name [in] [out])
- Get all MIDI port names.
(midi/port-names direction)
direction
can be either"in"
or"out"
. Returns an array of strings. - send MIDI note events.
(midi/send-notes [port] [chan] note-events)
note-events
is a !-stream of structs with the following keys:pitch
: MIDI pitch (num)dur
: note duration in seconds (num)vel
: MIDI velocity (num, optional)
- `bang`s from note-on messages.
(midi/trig [port] note [chan])
- `bang`s from note-on messages.
(midi/trigs [port] [chan])