ModPlug Central

OpenMPT => Help and Questions => Topic started by: LovelyA72 on April 07, 2019, 09:19:34

Title: C# wrapper for libopenmpt?
Post by: LovelyA72 on April 07, 2019, 09:19:34
I am working on a project that needs to use a module synthesiser. I tried SharpMod(based on MikMod) and it sounds stupid. There's a library called libmodplugsharp available but it's poorly documented and does not have the feature that I need. So is there any C# wrapper for libopenmpt abaliable? thanks
Title: Re: C# wrapper for libopenmpt?
Post by: manx on April 07, 2019, 09:29:27
I'm not aware of any C# language bindings for libopenmpt.

I'm no C# user myself, but from what I understand, using either the native libopenmpt C API directly via pinvoke, or implementing a thin wrapper on top of that should not be too hard (which is basically with libmodplugsharp does for the libmodplug C API).
Title: Re: C# wrapper for libopenmpt?
Post by: Saga Musix on April 07, 2019, 10:13:52
Several people have promised in the past to write one but then I never heard back about their progress. So if you decide to write your own, please consider sharing it with the community.
Title: Re: C# wrapper for libopenmpt?
Post by: LovelyA72 on April 10, 2019, 12:46:43
Well... I found a pure C# library called MikSharp. It has all of these disadvantages that MikMod has but at least it's 100% C#.
Title: Re: C# wrapper for libopenmpt?
Post by: Saga Musix on April 10, 2019, 14:47:36
If you want a readily wrapped mod playback library that is actually good at playing modules I'd rather recommend looking into BASS.Net.
Title: Re: C# wrapper for libopenmpt?
Post by: LovelyA72 on April 11, 2019, 01:29:43
Bass library sounds really nice. I will try ManagedBass(an open-source Bass.NET alternative), hopefully, gets a good result.
Title: Re: C# wrapper for libopenmpt?
Post by: LovelyA72 on April 12, 2020, 23:29:49
Well, I ended up using SharpMik. It's a pure C# reimplementation of MikMod v3.1.12. It sounds surprisingly good.
It will be a nice temporary solution before someone comes up with a C# libopenmpt wrapper.
Also, since it's based on nAudio, I don't have to use any closed-source library like bass or bass.net
https://github.com/thegouldfish/SharpMik