davy7125/polyphone

random noise bursts when initially running Polyphone

mrbumpy409 opened this issue · 2 comments

When I open Polyphone and initially begin auditioning a SoundFont preset, often there will be strange bursts of noise that will be triggered by a certain key and happen again identically when that same key is played. If I keep repeating the key, the noise burst will also repeat, but if I wait for a bit before striking the key again, the noise is no longer there. The noise sounds like perhaps some memory contents are being played before the sample data has fully loaded.

Here is a video of the bug in action, captured from two separate sessions.

The noise bursts don't happen every time, so it has been hard to track down an easy repro for it. It also seems that once I have triggered the bug and it has gone away, closing and re-opening Polyphone with the same SoundFont doesn't reproduce the bug. This makes me wonder if perhaps filesystem speed might be at play? Once the SoundFont is in the filesystem buffer, perhaps the samples load quickly enough to avoid the noise issue? Just speculating, of course. My samples are all stored on a hard drive if that matters.

This bug is happening with the following setup:

  • OS: KDE neon User Edition 6.0
  • Polyphone: compiled from latest git
  • Polyphone audio settings:
    • Audio backend: Jack
    • Buffer size: Default (QJackCtl is set for 48 KHz sample rate, 128 frames/period, 2 periods/buffer, realtime)

I don't remember this happening in the past with an older Polyphone version, but I also used to use Jack with a 256 frame buffer, so that could be a factor. Basically, there are lots of things I could possibly test for here, but I figure I'll wait for your direction before I start randomly testing things.

After further tests, this issue has no longer occurred since I changed my Jack buffer size setting in Polyphone from "Default" to match my actual Jack rate, which is "128".

This could indeed explain the noises. Thank you for this investigation, I'm closing the ticket