InvisibleWrench/FlutterMidiCommand

Any chance for Windows support?

Closed this issue · 15 comments

Any chance for Windows support?

Chances, Yes. Intentions, Yes. Current plans, unfortunately not.

I don’t expect it to be a big challenge to implement, but haven’t had the need or the time to do it yet.

Windows support would be great!

Windows support would be nice!

Please support Windows!

+1 for Windows support

I'm hopeful that this will make windows support a breeze to implement. Anyone up for the task?

+1 for Windows support

Yep would be awesome :)

I'm hopeful that this will make windows support a breeze to implement

Unfortunately not really - problem is that MIDI callbacks are received on a different thread than the thread that created the callback. That is currently not (yet) supported by the win32 package. So unfortunately no way around going down the rabbit hole and digging into native Windows. There's a first proof-of-concept on how to connect through to Win32 MIDI here.

I'll start fiddling with this to expand it to something useful in real life. Should I get this going, I'll report back ;-) - maybe that can be used to build Windows support into midi_command...

Would love to see this added too.

I'm hopeful that this will make windows support a breeze to implement

Unfortunately not really - problem is that MIDI callbacks are received on a different thread than the thread that created the callback. That is currently not (yet) supported by the win32 package. So unfortunately no way around going down the rabbit hole and digging into native Windows. There's a first proof-of-concept on how to connect through to Win32 MIDI here.

I'll start fiddling with this to expand it to something useful in real life. Should I get this going, I'll report back ;-) - maybe that can be used to build Windows support into midi_command...

Hi @ToH2002 ,

have you been able to see more about win32_midi repository ?
I would like to help but I don't know about the Microsoft Windows eco-system language...

@darkomenx In fact, I already have something in the works that looks promising. It's not on main yet, but you can give it a try with this branch https://github.com/InvisibleWrench/FlutterMidiCommand/tree/feature/windows.

It is not feature complete, so no BLE support yet, but it handles the basics just fine.
It's completely FFI based using Win32.dart, with a few additions.

have you been able to see more about win32_midi repository ?

@darkomenx I've started working on my own simple MIDI plugin for Windows; looking promising, but currently still fiddling with Windows callback and multithreading mechanisms. May still take a while, so I guess @mortenboye 's Windows branch will probably be there sooner ;-)

Hello guys,

I just tested the feature/windows branch. I don't understand the mechanism under the hood (and multithreading with that), but I can confirm to you that a very simple and quick test runs perfectly. The example project automatically detected my MIDI keyboard controller, and the console returned to me the messages sent from this controller. 👍

Now, I need to inspect your example project further to better understand the package.

But this is very encouraging and exciting for the future!

Added in 0.5.1