mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix MIDI note-on events being converted to note-off events
Update documentation with note about MIDI velocity interpretation
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user