The manual states:
> For example, a Control Change message can be access either as:
>
>
> midiMessage = {
> channel = 1,
> type = CONTROL_CHANGE,
> data1 = 1,
> data2 = 127
> }
>
> or
>
>
> midiMessage = {
> channel = 1,
> type = CONTROL_CHANGE,
> controllerNumber = 1,
> value = 127
> }
However this do not work on NoteOn/Off
midiMessage = {
channel = 1,
type = NOTE_ON,
data1 = 60,
data2 = 100
}
midi.sendMessage (PORT_1, midiMessage)
Returns error: bad argument #-2 to ‘sendMessage’ (number expected, got nil) because it does require the variables noteNumber and velocity.