spessasus / SpessaSynth

MIDI SoundFont/DLS synthesizer library written in JavaScript.
https://spessasus.github.io/SpessaSynth/
Other
96 stars 12 forks source link

audible click or volume bump when a sample enters its loop #53

Closed mrbumpy409 closed 1 month ago

mrbumpy409 commented 1 month ago

Version

github.io page, v3.20.35

Description

In some cases, I have noticed an occasional audible click or volume bump when a sample enters its loop. This is most easily observed in the GeneralUser GS preset 000:004 Tine Electric Piano.

Reproduction steps

  1. Download GeneralUser GS 2.0.0, which has cleaner loops on many presets and avoids the SF3 compression artifacts of the GeneralUser GS version bundled with SpessaSynth.
  2. Load GeneralUser GS 2.0.0 into SpessaSynth.
  3. With live MIDI input routed to SpessaSynth channel 1, load the 000:004 Tine Electric Piano preset to channel 1.
  4. Play notes and listen for the note to enter loop phase (happens after about 0.1–0.2 seconds). This bug is most easily perceived at low to mid velocities, since the sound at those velocities is mellower.

Expected behavior

The transition to the loop should be seamless, with no clicking or volume bumping.

Actual Result

Often, entering the loop is accompanied by a click and/or volume bump that doesn't occur when playing the preset in FluidSynth or Polyphone.

spessasus commented 1 month ago

Can confirm. Tine electric piano, key 60, velocity 104. Does not happen when I remove the low pass filter from the DSP chain

I need to investigate...

spessasus commented 1 month ago

Hi, I've fixed this issue, it was related to filter being disabled at 13500 cents or above. It will now be enabled at all times if its cutoff is dynamic. Not sure about the performance though...