[LAU] Check compliance of SF2 soundfont

Alexandre DENIS contact at alexandredenis.net
Tue Mar 31 22:03:59 UTC 2015

On Mon, 30 Mar 2015 00:32:24 +0200
Alexandre DENIS <contact at alexandredenis.net> wrote:

> Hi,
> I bought samples from Dubsounds in SF2 format, and looping is wrong
> when rendering with fluidsynth. I'm wondering how to check whether
> this is caused by buggy files or a bug in fluidsynth.

Some progress about this issue. I tried the files in LinuxSampler
(qsampler) and they render ok.

To investigate, I tried the following experiments. I copied by hand the
loop points as read in polyphone, and entered them in swami to "fix"
the soundfont. The "fixed" soundfont renders ok in fluidsynth *but*
make LinuxSampler abort, make sf2dump crash with "RIFF::Exception:
Broken SF2 file (invalid loops)", and show negative loop points in

Second experiment: in polyphone I created from scratch a soundfont with
a single sample, left sample loop points to 0, set loop points in the
instrument (like what is done in the culprit soundfonts), and loaded the
file in swami. Bingo! In swami, loop start is off by 8 samples, and
loop end is end of file.

Looks like what triggers the bug is loop points in the instrument, not
in the sample, as most soundfont do. It makes swami and fluidsynth fail
to parse loop points correctly -- do they share any code for sf2


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20150401/15ae5a2b/attachment.pgp>

More information about the Linux-audio-user mailing list