FlutterMidiCommand icon indicating copy to clipboard operation
FlutterMidiCommand copied to clipboard

Listing port names, sending MIDI messages to specific ports

Open intonarumori opened this issue 9 months ago • 0 comments

I've been working on an app that will be available on Android, iOS, macOS and Windows.

I've noticed that my iConnectivity MIO10 MIDI interface shows up differently on different platforms:

  • On iOS I get a list of 10 MIDI devices each with it's own name (MIO DIN1, MIO DIN2, etc.)
  • On Android it shows up as one device with 10 different ports

Correct me if I'm wrong but it looks like I can send MIDI messages to different devices, but cannot target individual ports. I've looked at the Android source code at it seems the library only uses the first output port when sending messages.

https://github.com/InvisibleWrench/FlutterMidiCommand/blob/d9928a6a884a3828d79cff2ae1bfd3941684b27a/android/src/main/kotlin/com/invisiblewrench/fluttermidicommand/ConnectedDevice.kt#L44-L46

As a side note, port names are also not available right now, I think MidiPort should be extended with a name filed and we should probably use getName() to populate it, even though this might still return an empty string on certain devices.

Let me know what you think, I did some experiments with updating MidiPort but since 3-4 repositories need to be updated, it would be great to agree on an implementation before I open PRs.

Many thanks.

intonarumori avatar May 23 '24 14:05 intonarumori