Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrument loop points are ignored #45

Open
mmontag opened this issue Oct 23, 2022 · 4 comments
Open

Instrument loop points are ignored #45

mmontag opened this issue Oct 23, 2022 · 4 comments

Comments

@mmontag
Copy link

mmontag commented Oct 23, 2022

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

@pedrolcl
Copy link
Contributor

duplicated: #33

@mmontag
Copy link
Author

mmontag commented Oct 24, 2022

Potential fix in FluidSynth: https://github.com/FluidSynth/fluidsynth/pull/1018/files
Discussion: FluidSynth/fluidsynth#1017

@mmontag
Copy link
Author

mmontag commented Oct 24, 2022

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.

@pedrolcl
Copy link
Contributor

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

That was removed in FluidSynth by PR#184

mmontag added a commit to mmontag/chip-player-js that referenced this issue Oct 31, 2022
This causes loop offset modulators to be ignored.
See divideconcept/FluidLite#45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants