Author Topic: BASS_MIDI_FONT_NOLIMITS problem with some SF2 soundfonts  (Read 215 times)

Falcosoft

  • Posts: 200
Hi Ian,
Since according to your future plans BASS_MIDI_FONT_NOLIMITS will be the new default mode in upcoming Bassmidi release I would like to inform you that with some Midi file and SF2 soundfont combinations BASS_MIDI_FONT_NOLIMITS state results in no sound at all (and some static noise afterwards). So the result is not some kind of frequency degradation or similar 'light' peoblem but absolute incompatibility.
I have attached a test Midi file that works with the flag disabled using the attached SF2 soundfont but not with the flag enabled. BTW, not only this Midi file can trigger the problem.
Can I convince you to revert back the new default state to previous one (BASS_MIDI_FONT_NOLIMITS = OFF) at least in case of SF2 files ? :)
PS. I could not attach bigger than 1 MB soundfonts but the problem is present also e.g. with Yamaha DB50XG Presets.SF2.

« Last Edit: 1 Jul '24 - 14:13 by Falcosoft »

mrbumpy409

  • Posts: 7
I started playing through the presets in "AWE64 Gold Presets.sf2" via live MIDI. All of the presets correctly produced sound until I got to preset #34 "Picked Bs.". When I tried to play this preset, BASSMIDI produced no sound, and then switching back to a different preset, it still produced no sound until restarted.

The issue appears to be the humongous negative attenuation value used at the preset level, which is set to -1000 dB (actual dB as reported by Polyphone is -400 dB). Removing this value or setting it to a more reasonable level, e.g., -11.2 dB (-4.48 actual dB) to counter the instrument-level attenuation fixes the issue.

As far as I can tell from the spec, the behavior of the initial attenuation generator should be the same regardless of the SB LIMITS flag. Negative attenuation values at the preset level should only be able to counter attenuation applied elsewhere (e.g., CC7, velocity-to-attenuation modulator, instrument level initial attenuation). By default, a sample played with no initial attenuation at the instrument level, CC7=127, CC11=127, velocity=127 should not play any louder with preset level initial attenuation set to a negative value.
« Last Edit: 1 Jul '24 - 16:50 by mrbumpy409 »

Ian @ un4seen

  • Administrator
  • Posts: 26028
Yeah, the problem is that big amplification (negative attenuation) in the "Picked Bs." preset. I guess it was a mistake by the soundfont's author, as it isn't on any other presets. SB hardware will limit it, although not to 0dB (as in the SF2 spec) but rather approx +3.7dB, as it does actually allow some amplification. BASSMIDI should probably apply some limit to it even when SB limits are disabled, but the question is what that should be.

Please upload/link any other affected soundfonts for reference.

   ftp.un4seen.com/incoming

Falcosoft

  • Posts: 200
Hi,
Here is another problematic SF2 soundfont:
https://falcosoft.hu/db50xg.zip

mrbumpy409

  • Posts: 7
SB hardware will limit it, although not to 0dB (as in the SF2 spec) but rather approx +3.7dB, as it does actually allow some amplification.

In my testing, I'm seeing no amplification on my SB hardware (Audigy 2 ZS). Was CC7=127 when you tested? If CC7=100 (the default), then attenuation would be around 4 dB. You would also normally get attenuation if using velocity less than 127.

I have attached a simple SoundFont for testing this. There are two presets, each with the default velocity-to-attenuation modulator disabled, so velocity won't be a factor:
  • 000:000 0 dB atten (no attenuation at preset level)
  • 000:001 -12 dB atten (-12 dB attenuation at preset level)
On my Audigy 2 ZS with CC7=127, both presets play at the same volume.

mrbumpy409

  • Posts: 7
Hi,
Here is another problematic SF2 soundfont:
https://falcosoft.hu/db50xg.zip

That Yamaha XG SoundFont uses the same picked bass as the AWE64 SoundFont, with the same -1000 dB preset attenuation. On my SB Audigy 2, this results in a preset that has no velocity control, and always sounds at 100% volume regardless of CC7 or CC11 value.
« Last Edit: 1 Jul '24 - 19:35 by mrbumpy409 »

Falcosoft

  • Posts: 200
Hi,
Here is another problematic SF2 soundfont:
https://falcosoft.hu/db50xg.zip

That Yamaha XG SoundFont uses the same picked bass as the AWE64 SoundFont, with the same -1000 dB preset attenuation. On my SB Audigy 2, this results in a preset that has no velocity control, and always sounds at 100% volume regardless of CC7 or CC11 value.

It seems that only the -1000 Attenuation is the same at the preset level but the samples and the definitions at the instrument level are completely different.

Ian @ un4seen

  • Administrator
  • Posts: 26028
In my testing, I'm seeing no amplification on my SB hardware (Audigy 2 ZS). Was CC7=127 when you tested? If CC7=100 (the default), then attenuation would be around 4 dB.

Ah yes, you're right, I was testing with CC7=100. That should simplify things then. As it is part of the SF2 spec (not SB-specific), can just apply the 0dB limit regardless of the NOLIMITS/SBLIMITS setting (note this doesn't apply to SFZ). Here's an update that does so:

   www.un4seen.com/stuff/bassmidi.zip