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

Use libADLMIDI for music. #19

Open
malespiaut opened this issue Jul 18, 2023 · 9 comments
Open

Use libADLMIDI for music. #19

malespiaut opened this issue Jul 18, 2023 · 9 comments

Comments

@malespiaut
Copy link
Contributor

If this project want to have OPL3 emulation for music playback, I recommend using libADLMIDI. I've used it in my fork of Rise of the Triad, and integration was not difficult, as I recall it.

https://github.com/Wohlstand/libADLMIDI

@fabiangreffrath
Copy link
Owner

ALternatively, we could use Nuked OPL3, which is already successfully used in Choco/Crispy/Woof.

@fabiangreffrath
Copy link
Owner

Not sure if we should strive for OPL emulation, at least in the short/mid term. SDL2_Mixer does pretty well with playing back MIDIs with a soundfont, at least if compared to the SDL_Mixer 1.2 situation.

@vanfanel
Copy link

@fabiangreffrath I have just build from taradino latest sources on GNU/Linux, and it doesn't look like it tries to play music via SDL2_Mixer, does it?
Is there any music support currently?

@fabiangreffrath
Copy link
Owner

Just checked on Debian and everything works as expected. Make sure to use the new cmake build system and the taradino executable name.

@vanfanel
Copy link

@fabiangreffrath taradino engine works, but without music.
Do you get music on Debian? How? There are no notes for the music support.

@fabiangreffrath
Copy link
Owner

SDL2_Mixer uses fluidsynth for MIDI playback on Linux. So, just make sure to have this package and a suitable soundfont installed.

@vanfanel
Copy link

What soundfont do you recommend and where do you have it installed?

@fabiangreffrath
Copy link
Owner

This depends on the way the fluidsynth package is configured in your distribution. In Debian it's exceptionally easy, because once you have the libfluidsynth package installed it makes sure you have at least one soundfont package installed as well. I always use the TimGM6MB soundfont which is the default solution in Debian and is also bundled as the fallback solution in Woof.

@vanfanel
Copy link

@fabiangreffrath Ah, made it work, thanks a lot!

By doing this:

SDL_SOUNDFONTS=/usr/share/soundfonts/FluidR3_GM.sf2 ./taradino

music sounds great with that soundfont!

Had to investigate the SDL_SOUNDFONTS env variable because I do my own SDL2 builds (wayland only, no X11, lightweight dependencies.. my system is a bit... custom).

If only uncapped framerate was available... other than that this port is perfect!

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