godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.18k stars 21.19k forks source link

MIDI Input in iOS is not implemented #32065

Open Imerion opened 5 years ago

Imerion commented 5 years ago

Godot version: 3.1

OS/device including version: iPhone 6, iOS 11.2.5

Issue description: This code should produce a result when input is received from a MIDI-interface. It has been confirmed to work on desktop. For some reason it does not work on iOS.

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() == 1):
            print ("MIDI Action Received")

Steps to reproduce: Use above code on iOS device with MIDI-interface attached. (Or use the example below that should react to input from a MIDI device sending on channel 1.)

Minimal reproduction project: MIDI-Example.zip

akien-mga commented 5 years ago

MIDI support was implemented for various platforms, but not yet for iOS. The CoreMidi driver used for macOS and added in #20154 might work for iOS with some changes though, as least CoreAudio is shared by both macOS and iOS.

CC @godotengine/ios

Imerion commented 5 years ago

Ah, I see! Thanks for clearing that up and sorry for not noticing. Somehow I assumed it was implemented for iOS too. But then I guess MIDI Input support for iOS is at least a few releases away?

Imerion commented 5 years ago

Just to make sure, is there Android support for MIDI Input? Otherwise, perhaps I should change the title of this issue to reflect that too.

KoBeWi commented 4 years ago

Still valid in 7cc1e20

EDIT: Or maybe not >_> If someone could confirm the confirmation it would be nice.