I am trying to create a program that takes input from a MIDI-device (a keyboard) and plays various sounds depending on which button that is pressed. Currently I am simply trying to get the program to receive data from the MIDI device, but I can't seem to figure it out and there isn't much documentation at the moment. If I have understood right all I need is built into Godot as of 3.1?
What I am doing currently is this (in reduced form):
OS.open_midi_inputs()
OS.get_connected_midi_inputs()
set_process_unhandled_input(true)
func _unhandled_input(event : InputEvent):
if (event is InputEventMIDI):
if (event.get_channel() == midiChannel): //This I have set to channel 1 (0)
print ("MIDI Action Received")
Am I missing something? The MIDI-interface has a small LED that is usually turned on when it has noticed a connection, but my program does not make it turn on even when the interface is set to listen on the correct channel.