diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp index 410b62068a72..79eef95ef2a6 100644 --- a/core/os/midi_driver.cpp +++ b/core/os/midi_driver.cpp @@ -86,11 +86,6 @@ void MIDIDriver::receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_ if (length >= 2 + param_position) { event->set_pitch(data[param_position]); event->set_velocity(data[param_position + 1]); - - if (event->get_message() == MIDIMessage::NOTE_ON && event->get_velocity() == 0) { - // https://www.midi.org/forum/228-writing-midi-software-send-note-off,-or-zero-velocity-note-on - event->set_message(MIDIMessage::NOTE_OFF); - } } break; diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml index 2af88149b61f..04d8cab06564 100644 --- a/doc/classes/InputEventMIDI.xml +++ b/doc/classes/InputEventMIDI.xml @@ -90,7 +90,7 @@ The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero. - The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. + The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. Note that some MIDI devices may send a [constant MIDI_MESSAGE_NOTE_ON] message with zero velocity and expect this to be treated the same as a [constant MIDI_MESSAGE_NOTE_OFF] message, but device implementations vary so Godot reports event data exactly as received.