Audio issues:
Better integration:
Other:
Additional system soundfont search paths:
Fedora/CentOS/RHEL fluidsynth has a default soundfont concept, if there is a different soundfont not being Fluid R3:
/usr/share/soundfonts/default.sf2
Arch (soundfont-fluid), Fedora/CentOS/RHEL (fluid-soundfont-gm):
/usr/share/soundfonts/FluidR3_GM.sf2
Debian/Ubuntu, openSUSE/SLED/SLES (fluid-soundfont-gm):
/usr/share/sounds/sf2/FluidR3_GM.sf2
I just tried this by playing hh3 with a debug build in Windows 10 using fluidlite. I used scc1t2.sf2 as easyrpg.soundfont
I played a bit of the intro, then went to "end game" from the menu. Now Player is hung with a black screen upon returning to the title.
The intro is playing a midi, the title screen mp3.
[External Code]
> Player.exe!WASAPI_WaitDevice(SDL_AudioDevice * this) Line 316 C
Player.exe!SDL_RunAudio(void * devicep) Line 758 C
Player.exe!SDL_RunThread(void * data) Line 289 C
[Inline Frame] Player.exe!RunThread(void *) Line 90 C
Player.exe!RunThreadViaCreateThread(void * data) Line 99 C
[External Code]
Looks like some kind of deadlock in the audio subsystem.
Unfortunately this isn't reproducable :(
Another issue,
When I play my midis in foobar2000, using BASSMIDI and scc1t2.sf2 they sound fine.
When I play with Player using fluidlite and the same soundfont, I hear a faint crackling sound, like you would from an vinyl record player.
This midi clearly shows the percussion issue in fluidlite:
https://github.com/fmatthew5876/hh3-rm2k/blob/master/Music/HH3%20Castle%20of%20Life.mid
The drums are replaced by some other low sounding instrument.
It also displays a high amount of the crackle effect described previously.
When I play with Player using fluidlite and the same soundfont, I hear a faint crackling sound, like you would from an vinyl record player.
Same here with stock FluidSynth 2.1.1 in Player (fails to build with 1.11.1 because uses 2.x API). It was happening already with the previous interpolation mode (7). @elsemieni's uploaded rendered tests were also affected.
I've tried the FluidSynth 2.1.1 CLI tool with same args (gain 0.6, sampling rate 44100, chorus off, reverb off) and it plays without noise. Same with 1.11.1 CLI.
Other stuff I've found:
By the way, there's a synth.midi-bank-select option to select how bank select commands affect percussion, but not sure if allows to workaround the fluidlite bug.
A note on a possible optimization for some low memory ports (but with decent I/O maybe), synth.dynamic-sample-loading might help.
When I compare it with fluidsynth or fluidsynth-sans-glib (yeah this one works) then the samples generated by FluidLite sound really bland. With fluidsynth(-sans-glib) I feel the intensity and the bass.
So for platforms that have std::thread (unused in our case but is a dependency) sans-glib can be used.
Except if somebody wants to provide a patchset for the patchset that removes std::mutex and std::thread :P
BUG: This code
https://github.com/EasyRPG/Player/blob/master/src/audio_sdl_mixer.cpp#L430-L436
Is now handled by EP_MIDI_FREQ
When deleting these lines:
Audio recording of both:
midi.zip
I feel both sound fine now without the noise or degraded quality :+1:.
Just two things:
Is the "percussion" the drums? Guess I have to delete the channel to figure this out ;).
This is what I meant with "it sounds dull/worse". The "power" and the bass are missing
I found the bug in FluidLite. The Drums sound now beautiful. Basicly no difference to FluidSynth imo :+1:
Wait for my patch ;)
Most helpful comment
BUG: This code
https://github.com/EasyRPG/Player/blob/master/src/audio_sdl_mixer.cpp#L430-L436
Is now handled by
EP_MIDI_FREQ