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

Linux builds? #7

Open
dromer opened this issue Sep 16, 2023 · 15 comments
Open

Linux builds? #7

dromer opened this issue Sep 16, 2023 · 15 comments

Comments

@dromer
Copy link

dromer commented Sep 16, 2023

Maybe far-fetched for now, but I'm really looking for a modern MT-32 editor that works cross-platform :)

@sfryers
Copy link
Owner

sfryers commented Sep 17, 2023

The current code relies on WinForms for the UI, and makes use of a Windows-only MIDI library, so most of the UI and MIDI interface code would need to be rewritten using cross-platform libraries in order to achieve Linux compatibility. I will look into this further in the future once I've tidied up the existing code base and issued a v1.0 release.

@dromer
Copy link
Author

dromer commented Sep 17, 2023

Right, I'm not too familiar with .NET ecosystem, but indeed it seems that NAudio.Midi is not suited for cross-platform work.

Anyway, thnx for not dismissing it immediately and wish you success with the project :)

@maximilien-noal
Copy link
Contributor

maximilien-noal commented Jan 8, 2024

Going cross platform (or simply to make the code refactoring easier) would mean first introducing the MVVM pattern.

The latest .NET 7 and furthermore .NET 8 versions of WinForms make this easier with much needed binding APIs.

Here is an example from Microsoft with the CommunityToolkit MVVM Toolkit (which writes the boring and repetitive parts of the MVVM pattern for you):

https://devblogs.microsoft.com/dotnet/winforms-cross-platform-dotnet-maui-command-binding/

(MAUI is another UI toolkit from MS, not related to WinForms)

@dromer
Copy link
Author

dromer commented Jan 8, 2024

@maximilien-noal except this project really needs proper MIDI i/o handling.

From what I can tell meltysynth only opens a midi file, not any midi hardware ports.
(besides that opening soundfonts is completely out of scope for what MT32Editor needs to do, of course)

@maximilien-noal
Copy link
Contributor

Yeah this is why I deleted my comment.

@dromer
Copy link
Author

dromer commented Jan 8, 2024

@maximilien-noal haha, sorry I didn't notice that yet :)

The only example I see with meltysynth to send midi is exactly also using NAudio: https://github.com/sinshu/meltysynth#use-meltysynth-as-a-midi-device-naudio--loopmidi

So we need a proper cross-platform replacement for NAudio for handling MIDI ports in modern .NET

@maximilien-noal
Copy link
Contributor

Java has native cross platform Audio and MIDI support in its standard library, if the original version of spice86 source code (which was in Java) is to be believed. And the docs support this:

https://docs.oracle.com/javase/8/docs/api/javax/sound/midi/package-summary.html

Not so with .NET. And it's really frustrating when you try to write anything multimedia related... :/

@maximilien-noal
Copy link
Contributor

There is managed-midi:

https://github.com/atsushieno/managed-midi

Or rather ther WAS because it's been abandonned.

@maximilien-noal
Copy link
Contributor

Huge hope for IKVM to come to the rescue for cross platform MIDI ports access:

ikvmnet/ikvm#468

@dromer
Copy link
Author

dromer commented Feb 18, 2024

@maximilien-noal how is that exactly relevant? This project doesn't use Java at all.

Or would you then want to migrate MT32Editor to Java and IKVM?

@maximilien-noal
Copy link
Contributor

maximilien-noal commented Feb 18, 2024

IKVM makes the Java standard library, which has cross platform midi port access and control capabilities this issue cares about, available to .NET projects.

If IKVM enables this MIDI support, that is.

No need to move to Java. Java moves to you !

@dromer
Copy link
Author

dromer commented Feb 18, 2024

Sorry but I don't understand what a java vm has to do with a .NET project 🤷

@maximilien-noal
Copy link
Contributor

maximilien-noal commented Feb 18, 2024

It's a .NET implementation of the Java runtime. It makes the Java standard library (and hopefully that will include soon the cross-platform MIDI port access part of it) available to any .NET project, along with any 3rd party Java package.

@dromer
Copy link
Author

dromer commented Feb 18, 2024

Ok, some weird kind of magic then :)

If it gets us there, then great!

@sfryers
Copy link
Owner

sfryers commented Feb 27, 2024

Quick update- I've managed to get a version of the latest build (with a few minor tweaks to target .NET 4.7.2) to run on Linux using Wine and Mono. Whilst it's pretty laggy, it does seem to work. Link to Vogons post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants