I'm pretty new to soundfonts but I'm a little bit confused about how loud my soundfont should be.
How exactly do you go about getting the right overall loudness for your soundfont, and is there a standard for what the loudness (in LUFS) is? Do you aim for all the samples to have a loudness of -16LUFS for instance before putting them in the soundfont?
Also, even if I set my soundfont audio files all at -16LUFS, how do I know how loud they will be at varying velocities?
I have successfully used polyphone to make organ sound fonts and originally I asked the same question myself, having noted already that the samples in many existing sound fonts were at an excessively low level.
However I now know that the best level for organ samples is the maximum possible without limiting (i.e. I "normalise" the samples).
Where an instrument is made up from only one sample for each note (usually the case for organs) that is then end of it. If the instrument uses more than one sample for each note such as mixtures then I use the attenuation functions in the instruments to reduce the final level of the notes to around the maximum without limiting.
When a sound font is played the synthesizer will have a gain function which can be used to bring the final gain to a level where you can play many notes simultaneously without any limiting happening.
I just used my design engineers experience, common sense and experiment to discover the above. I do not guarantee that a better solution does not exist and would be very interested to hear any comments on this subject which could lead to an improved outcome.
If you optimize your samples by 90% in the samples section in the Polyphone software, you can use 7dB for 2.x (17.5 for v1.x and Viena) as the attenuation value in the global cell in the instruments section. This will give you a fixed volume of (average) -10dB(Fs) for peak when played at 127 (full) velocity on a mono sample. (note: you can also use 6 instead of 7.
I saw a 1dB difference in the measurements I made at two different times with the same device, the same calibration and the same hardware.)
This means that you can reach 0dB only when you play 8 different notes at the same time (for example, in an organ instrument, at full volume and with full velocity).
If the organ soundfont producers prefer -16dB for each patch (for some valid reasons), it is sufficient to set this value as 13 for 2.x (32.5 for v1.x), which I have specified as 7dB above.