We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5055 - Fluidsynth default settings can sound quite bad.
Summary: Fluidsynth default settings can sound quite bad.
Status: NEW
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.4
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-23 19:56 UTC by 68.000.heartonfire+sdl
Modified: 2020-03-23 19:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 68.000.heartonfire+sdl 2020-03-23 19:56:58 UTC
Hi, I am from the Doom community. Most Doom source ports (modernized engines) use SDL2 and for many of them, Fluidsynth is the simplest way to use a soundfont for MIDI music playback, by setting SDL_SOUNDFONTS. 

Unfortunately some of the Fluidsynth default settings can sound quite bad with lots of community-created music. In particular, Fluidsynth's chorus effect makes any instrument that uses it MUCH LOUDER than it ought to be. This generally makes using it unsuitable for anyone trying to do more than play the original levels.

It would be great if the user could set the values for Fluidsynth parameters themselves, either through another environment variable, or some config file. An alternative solution would just be to set more conservative values for the effects. Here is what I use for myself:

    fluidsynth.fluid_settings_setnum(settings, "synth.chorus.depth", (double) 5);
    fluidsynth.fluid_settings_setnum(settings, "synth.chorus.level", (double) 0.35);
    fluidsynth.fluid_settings_setnum(settings, "synth.reverb.damp", (double) 0.4);
    fluidsynth.fluid_settings_setnum(settings, "synth.reverb.level", (double) 0.15);
    fluidsynth.fluid_settings_setnum(settings, "synth.reverb.width", (double) 4);
    fluidsynth.fluid_settings_setnum(settings, "synth.reverb.room-size", (double) 0.6);

A simple better-than-nothing solution would just be to allow disabling of the chorus effect.

I also find Fluidsynth to be much louder than other MIDI playback engines. Currently SDL2_mixer just adjusts Fluidsynth's gain between 0 and 1.2; it would be nice if it took a user set "master volume" into account.

A test I have been using is the song "Drop the Wombat" by James Paddock, a prolific composer in the Doom community. The MIDI is available at http://jamespaddockmusic.com/midi-files/SpeedMIDIs/30in30/3/Drop%20the%20Wombat.mid, and you can listen to a rendered version of it with the Windows GM synth at https://jamespaddock.bandcamp.com/track/drop-the-wombat. If desired I can provide renders with default and adjusted FluidSynth settings.