divideconcept / FluidLite

Very light version of FluidSynth designed to be hardware, platform and external dependency independent.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instrument loop points are ignored

mmontag opened this issue · comments

Given:

  • Save a SoundFont 2.01 from Polyphone 2.3.1
  • Presets contains instrument defined loop point overrides:
    CleanShot 2022-10-23 at 14 59 18

Expected: Fluidlite plays smooth loop points as when previewing the Preset in Polyphone.
Observed: Fluidlite plays the entire sample looped with popping noise.

Caveat: I am using a slightly older version of Fluidlite, please close if this has already been addressed.

cc @Wohlstand

For what it's worth, I fixed it locally by disabling this block:

FluidLite/src/fluid_defsfont.c

Lines 3192 to 3206 in 7c150b0

else if (sam->loopend > sam->end || sam->loopstart >= sam->loopend
|| sam->loopstart <= sam->start)
{ /* loop is fowled?? (cluck cluck :) */
/* can pad loop by 8 samples and ensure at least 4 for loop (2*8+4) */
if ((sam->end - sam->start) >= 20)
{
sam->loopstart = sam->start + 8;
sam->loopend = sam->end - 8;
}
else
{ /* loop is fowled, sample is tiny (can't pad 8 samples) */
sam->loopstart = sam->start + 1;
sam->loopend = sam->end - 1;
}
}

This seems to be an older version of the FluidSynth sanitize code linked above.

This seems to be an older version of the FluidSynth sanitize code linked above.

That was removed in FluidSynth by PR#184