On Mon, 30 Mar 2015 00:32:24 +0200
Alexandre DENIS <contact(a)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
polyphone.
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
parsing?
-Alexandre.