The cause of sf2 volume discrepancies

• Aug 2, 2015 - 18:36

I may have discovered why soundfonts sound wrong on Musescore.

FluidSynth and BASSMIDI only attenuate 40% of the numeric value, while MuseScore/Fluid attenuates 100% of instrument-level. I did not test preset-level attenuation.

So the more heavily attenuated samples are quieter than normal, while the less attenuated samples are louder than normal. This results in balance problems.

This is noticeable in SGM soundfont strings.

----

Why do you use a custom Fluid fork, which is incompatible with common soundfonts?


Comments

Thanks for spotting this jimbo :)

I think this may be worthy of opening an issue in the issue tracker, where it will receive the direct attention of the development team.

Can you explain how you tested this?
I'm pretty sure the soundfont engine is more or less the same than FluidSynth or BASS midi. The difference should be in the master gain of the synth. By default in MuseScore the gain is small to avoid overflow when the score has several instruments. If you change it in View > Synthesizer, you should get the same result than with other soundfont players.

In reply to by [DELETED] 5

Wrong.

Here's a sample of a test sf2 and two MIDIs.

https://www.dropbox.com/s/4m056gkg0m5oyyb/share.7z?dl=0

"Attenuation Test.sf2":

Patch 0 contains a loud attenuated sample from 0 through middle C through F, and a quiet sample from F# to 127. The sample is attenuated in the instrument setup.

Patch 1 contains only a loud attenuated sample. Patch 2 contains only a quiet sample. The sample is attenuated in the patch setup.

The loud sample is 1/2 scale amplitude. The quiet sample is 1/20 scale amplitude (20 dB attenuation of the loud sample). It is 1/10 the amplitude of the loud sample, but given a 50 dB head start in sf2.

All 3 presets/patches sound identical in Polyphone SF2 editor, BASSMIDI/foo_midi, BASSMIDIdrv, and Qsynth/Fluidsynth. They do not in Musescore.

scale60.mid uses patch 0 and plays back a scale from middle C through B. The volume is constant in BASSMIDI and FluidSynth, but not in MuseScore "Fluid sf2".

scale60.2.mid alternates between patches 1 and 2, playing the same scale. The volume is constant in BASSMIDI and FluidSynth, but not in MuseScore "Fluid sf2".

Do you still have an unanswered question? Please log in first to post your question.