InvisibleWrench / FlutterMidiCommand

A Flutter plugin to send and receive MIDI
BSD 3-Clause "New" or "Revised" License
95 stars 50 forks source link

Allow to create virtual MIDI devices on iOS #40

Closed gatzsche closed 2 years ago

gatzsche commented 3 years ago

With this pull request, it is possible to create virtual MIDI devices on iOS. These virtual MIDI devices show up in other apps. Other apps can now send and receive MIDI to or from your own app using these virtual MIDI ports.

While merging this pull request, please do the following steps:

  1. Merge my previous pull request to flutter_midi_command_platform_interface.git
  2. Edit pubspec.yaml and replace the references to
    • git@github.com:gatzsche/flutter_midi_command_platform_interface.git as well
    • git@github.com:gatzsche/flutter_midi_command_linux.git

Let me know if you have any questions.

Gabriel

gatzsche commented 3 years ago

I just made test. The virtual MIDI port works also on MacOSX. You might want to edit these places while merging:

  1. README at the beginning and the end
  2. example/main.dart There the virtual MIDI device is created only on iOS currently
mortenboye commented 3 years ago

Thank you very much for this PR.

Before I merge, should something be changed in the Linux implementation as well, I see a reference in the pubspec?

gatzsche commented 2 years ago

Yea, the platform interface has changed slightly which also affects the Linux implementation. Let me know if I need to make a pull request also for git@github.com:gatzsche/flutter_midi_command_linux.git

gatzsche commented 2 years ago

@mortenboye The last two days I improved the Bluetooth implementation. See CHANGELOG.md for details. Do you see a chance to merge my pull request soon?

mortenboye commented 2 years ago

@gatzsche Thank you very much for the PR and all the improvements you’ve made. I will go over them and merge during the weekend or early next week.

mortenboye commented 2 years ago

Hi @gatzsche, your PR have now been merged into 0.4.0-dev.7 along with some changed I did to mirror the Virtual MIDI device functionality on Android.

However the app/plugin seems to crash in native code when removing Bluetooth Permissions while the app is running. Have you experienced this also?

gatzsche commented 2 years ago

Hi @gatzsche, your PR have now been merged into 0.4.0-dev.7 along with some changed I did to mirror the Virtual MIDI device functionality on Android.

However the app/plugin seems to crash in native code when removing Bluetooth Permissions while the app is running. Have you experienced this also?

Yea. I have it on iOS. This is the same with other apps too. Is this an OS thing to kill apps when permissions are removed?

gatzsche commented 2 years ago

Thank you so much for the mergin. Do your changes mean that virtual MIDI ports are possible with Android too now? What kind of app do you use to test virtual MIDI ports?

mortenboye commented 2 years ago

@gatzsche So the crashing seems to be by design: https://developer.apple.com/forums/thread/64740

Yes, i tried to mirror your features on Android. Testing has been a bit sporadic, so I haven’t tested every single use case i could think of at this point, but have verified that there is communication. I used apps like MIDI Scope and MIDI Keyboard.