Skip to content

4.0, MIDI input: releasing key on MIDI device returns event.message 0x9 (MIDI_MESSAGE_NOTE_ON); should be 0x8 (MIDI_MESSAGE_NOTE_OFF) #76678

@freswinn

Description

@freswinn

Godot version

4.0.2.stable.mono

System information

Windows 10

Issue description

Hello! I'm playing around with the MIDI input in Godot 4, and I've run into the issue where releasing a key on my MIDI keyboard does not return event.message 0x8, MIDI_MESSAGE_NOTE_OFF, but rather 0x9, which is MIDI_MESSAGE_NOTE_ON.

This is not the case in Godot 3. I created an identical script in each to test this out, and releasing the key in 3.x always returns 0x8, whereas releasing the key in 4 always returns 0x9.

Steps to reproduce

func _ready():
    OS.open_midi_inputs()

func _input(event):
    if event is InputEventMIDI:
        print(event.message)

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions