implements Midi.Source
A MIDI system input.| Input(string name, string connection) | |
| Input(string name, regex connection) |
| midiout | Midi.Connection outputs as an array |
| connect(regex connection) | connect to one or more system ports |
| connect(string connection) | connect to a system port |
| disconnect(string connection) | disconnect one or all system ports |
| onControl(function handler) | register a callback for MIDI control messages |
| onMessage(function handler) | register a callback for MIDI messages |
| onNoteOff(function handler) | register a callback for MIDI note off messages |
| onNoteOn(function handler) | register a callback for MIDI note on messages |
| onProgramChange(function handler) | register a callback for MIDI program change messages |
| onSysex(function handler) | register a callback for MIDI sysex messages |
Midi.Connection outputs as an array. Adding or removing elements to this array has no effect on the underlying audio component.
Connect to one or more system ports.
Connect to a system port.
Disconnect one or all system ports.
Register a callback for MIDI control messages.
Register a callback for MIDI messages.
Midi.Input("in").onMessage(function(e) {
local mesg = e.message
switch(mesg.getclass()) {
case Midi.NoteOn:
println("NoteOn: " + mesg.pitch)
break;
...
Register a callback for MIDI note off messages.
Register a callback for MIDI note on messages.
Register a callback for MIDI program change messages.
Register a callback for MIDI sysex messages.
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.