Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move midi device support into seperate assembly #29

Closed
mdsitton opened this issue Jun 16, 2019 · 12 comments
Closed

Move midi device support into seperate assembly #29

mdsitton opened this issue Jun 16, 2019 · 12 comments
Labels
feature request API changes required wont fix No API changes required
Projects

Comments

@mdsitton
Copy link

mdsitton commented Jun 16, 2019

As mentioned in #28 i think this should be a requirement for #1 due to the current midi device code only supporting windows. (and there being libraries that do support cross platform low level midi device access already such as https://github.com/atsushieno/managed-midi)

The rest of the library already works well cross platform on unity, and at least builds for .net core (haven't done a lot of testing with it on that runtime yet)

@mdsitton
Copy link
Author

mdsitton commented Jun 16, 2019

Also looking at the code i could see other functionality as fitting into seperate assemblies as well, but those aren't quite as core to making it fully out of the box cross platform.

@melanchall
Copy link
Owner

Hi,

Yes I know there are libraries with cross-platform devices API. I have plans to make DryWetMIDI fully cross-platform but there are more important tasks at now related to what people really need from the library.

DllImports pointing to WinApi functions are not problem for .NET Core library. More than that, .NET Core itself uses them. Also .NET Core 3 brings WPF and WinForms support, but for Windows only at now. So it's not absolutely bad if some part of a .NET Core library is targeting specific OS :) Of course I'll make it cross-platform somewere in the future.

At the beginning it was supposed that the library will provide API only for MIDI files. But I see that working with MIDI devices (sending/receiving events, playing back) is very important thing that people actively use. So I decided to extend the library to cover more scenarios (and judging by letters from users this decision was right).

@mdsitton
Copy link
Author

I'm not saying to remove the midi device support. This is just a suggestion about reorganizing it into smaller chunks of functionality.

@melanchall
Copy link
Owner

Do you mean to move it to another project inside the solution?

@mdsitton
Copy link
Author

Yeah that's what i mean

@melanchall
Copy link
Owner

It makes sense. I think I'll make a small release soon and then will plan library restructuring.

@melanchall melanchall added the feature request API changes required label Feb 2, 2020
@melanchall melanchall added this to the Future milestone Mar 7, 2020
@melanchall melanchall added this to In progress in DryWetMIDI Mar 23, 2020
@melanchall melanchall moved this from In progress to To do in DryWetMIDI Mar 23, 2020
@andreasbalzer
Copy link

Adding on the request, I noticed OutputDevice.GetByName("Microsoft GS Wavetable Synth"); in UWP apps in debug mode works, but release mode fails with "'Unresolved P/Invoke method 'winmm.dll!midiOutGetNumDevs' from this method. Please look for this method in build warnings for more details. '" as UWP has a dedicated abstraction to be used https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/midi

A means to use existing cross-platform libraries would be great, or a way to add support for other platforms by app developers.

@melanchall
Copy link
Owner

@andreasbalzer I've created new issue #95 from your comment.

@melanchall
Copy link
Owner

@andreasbalzer #95 is fixed.

@dan-oak
Copy link

dan-oak commented Aug 2, 2021

For people like me, who just landed here after finding out about the problem, could you guys maybe suggest how to hack around the missing support problem? Maybe by adding specific dlls to project assemblies or anything else. I'm developing a Linux version of a game and the code is already failing on OutputDevice.GetAll() by trying to call winmm.dll. I'm not familiar currently with a way to package this library (and potentially any other ones down the code) into my assemblies.

@melanchall
Copy link
Owner

@dan-oak Unfortunately Devices API of the library doesn't support Linux. Right now I'm in process of macOS support, but I can't provide any date when DryWetMIDI will support Linux.

@melanchall
Copy link
Owner

DryWetMIDI 6.0.0 has been released which has changed internal structure. So now the library includes 4 binaries: 1 main dll and 3 native binaries for cross-platform Devices API. So it seems it's not good to split the library even further.

DryWetMIDI automation moved this from To do to Done Nov 2, 2021
@melanchall melanchall removed this from the Future milestone Nov 2, 2021
@melanchall melanchall added the wont fix No API changes required label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request API changes required wont fix No API changes required
Projects
DryWetMIDI
  
Done
Development

No branches or pull requests

4 participants