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

Replace Fluidsynth with FluidLite #150

Open
RyanBram opened this issue Sep 21, 2016 · 9 comments
Open

Replace Fluidsynth with FluidLite #150

RyanBram opened this issue Sep 21, 2016 · 9 comments

Comments

@RyanBram
Copy link

RyanBram commented Sep 21, 2016

Dear Jonas,
The current MKXP already has MIDI support through Fluidsynth. But Fluidsynth is known for having complicated dependency with GLib and also little bit heavy. My suggestion is you may use FluidLite as the alternative. Currently FluidLite offers some advantages over its big brother, such as:

  1. Lightweight;
  2. Designed to be hardware, platform and external dependency independant;
  3. SF3 support.

I am not a programmer, so I am not really sure how hard to implement it in MKXP, but it seems it will give good benefit for MKXP, especially for Android port.

Best regards,
RyanBram

@RyanBram RyanBram changed the title Replace Fluidsynth with Fluidlite Replace Fluidsynth with FluidLite Sep 21, 2016
@Ancurio
Copy link
Owner

Ancurio commented Sep 21, 2016

Thank you Ryan. I was quite surprised, FluidLite seems like a really good candidate for a fluidsynth replacement, I'm very happy that other people saw the same need for a bare bones synthesizer library and actually had the knowledge to make it (or fork and strip it down, I should say). It also kept all symbol names from flluidsynth, which is nice.

I don't have time to put into this right now, but it should in theory be a very painless transition.

@Ancurio
Copy link
Owner

Ancurio commented Sep 21, 2016

Actually, since FluidLite kept all the symbol names the same, I wouldn't be surprised if a current mkxp build could just go ahead and dlopen() libfluidlite instead of libfluidsynth and not even notice the difference. Have you tried that out?

@RyanBram
Copy link
Author

Hi, Jonas
Unfortunately my own laptop doesn't have enough power horse for setting build environment. But if there is a chance I'll try myself to check it in my office computer.

@hanetzer
Copy link
Contributor

hanetzer commented Mar 3, 2017

Looking into this myself, since I can't compile mkxp with midi support without building fluidsynth for mingw, seems his project is not currently configured to create a shared library, only static.

@divideconcept
Copy link

Hi guys,

I confirm FluidLite is 100% compatible with FluidSynth (at least for all the core functionalities). It's now also the official replacement for FluidSynth in VLC 3.
I'm not super good at tweaking CMake files but if you want to propose a patch to make it able to compile as shared library, feel free to do so.

@hanetzer
Copy link
Contributor

hanetzer commented Mar 3, 2017

Got a shared libfluidlite.dll to build, doesn't seem to want to link against it:

fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.delete_fluid_synth[.refptr.delete_fluid_synth]+0x0): undefined reference to `delete_fluid_synth'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.delete_fluid_settings[.refptr.delete_fluid_settings]+0x0): undefined reference to `delete_fluid_settings'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.new_fluid_synth[.refptr.new_fluid_synth]+0x0): undefined reference to `new_fluid_synth'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.new_fluid_settings[.refptr.new_fluid_settings]+0x0): undefined reference to `new_fluid_settings'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_program_change[.refptr.fluid_synth_program_change]+0x0): undefined reference to `fluid_synth_program_change'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_cc[.refptr.fluid_synth_cc]+0x0): undefined reference to `fluid_synth_cc'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_pitch_bend[.refptr.fluid_synth_pitch_bend]+0x0): undefined reference to `fluid_synth_pitch_bend'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_channel_pressure[.refptr.fluid_synth_channel_pressure]+0x0): undefined reference to `fluid_synth_channel_pressure'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_noteoff[.refptr.fluid_synth_noteoff]+0x0): undefined reference to `fluid_synth_noteoff'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_noteon[.refptr.fluid_synth_noteon]+0x0): undefined reference to `fluid_synth_noteon'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_write_s16[.refptr.fluid_synth_write_s16]+0x0): undefined reference to `fluid_synth_write_s16'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_system_reset[.refptr.fluid_synth_system_reset]+0x0): undefined reference to `fluid_synth_system_reset'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_synth_sfload[.refptr.fluid_synth_sfload]+0x0): undefined reference to `fluid_synth_sfload'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_settings_setstr[.refptr.fluid_settings_setstr]+0x0): undefined reference to `fluid_settings_setstr'
fluid-fun.o:fluid-fun.cpp:(.rdata$.refptr.fluid_settings_setnum[.refptr.fluid_settings_setnum]+0x0): undefined reference to `fluid_settings_setnum'

@hanetzer
Copy link
Contributor

hanetzer commented Mar 3, 2017

Ah, I was misunderstanding what SHARED_FLUID meant... that's not the dlopen'd one.
I actually managed to produce a static linked version (shared required ogg and vorbis dlls to work, even though they were static linked into mkxp.exe) of mkxp for x86_64 with fluidlite, no issues whatsoever 👍

@divideconcept
Copy link

divideconcept commented Mar 3, 2017 via email

@Ancurio
Copy link
Owner

Ancurio commented Aug 11, 2020

The move to FluidLite as the default target should still happen, and any compile issues fixed (at least on mkxp's side). Not sure if I'm out of date, but the last time I looked at the project, it seemed to hard depend on libogg and some friends? Not sure how that would be handled; ideally if someone wants to use FluidLite with support for ogg, libogg/libvorbis should be shared between it and mkxp.

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

No branches or pull requests

4 participants