kronihias / mcfx

multichannel cross plattform audio plug-in suite
GNU General Public License v3.0
81 stars 13 forks source link

Delay plugins introduce discontinuities #2

Closed mtmccrea closed 7 years ago

mtmccrea commented 7 years ago

I have found that the mcfx_delayN plugins (v0.5.1 and v0.5.2) introduce discontinuities in the waveform. The problem is more audible with certain material, namely sinusoidal material, but can be inaudible with others.

The discontinuities come in "pairs" which are separated in time by multiples of the system's hardware buffer size. Sometimes the separation is equal to the hardware buffer size, sometimes it's less (e.g. half the buffer size). This leads me to believe that the read/write pointers are cycling through the delay buffer are not cycling correctly.

I've noticed that sometimes the problem looks like a repeated sample, though other times not, so this may be a coincidence. In any case the issue seems dependent on the material in the delay buffer. Notice in the screenshot below that the "impulses" created by the discontinuity are not always of the same strength within the "pair" and across channels.

screen shot 2017-04-24 at 1 33 41 pm

The issue is more obvious with a sine tone:

screen shot 2017-04-24 at 1 39 36 pm

An example discontinuity:

screen shot 2017-04-24 at 1 31 16 pm

Showing the spacing of each impulse in a "pair" is a subdivision of the hw buffer size (power of 2):

screen shot 2017-04-24 at 1 40 57 pm

I've tested this in both Reaper and Adobe Audition, so it appears not to be a problem with the host application.

Thanks for your work on this!

kronihias commented 7 years ago

Hi @mtmccrea, thanks for the detailed bug report! I fixed this with commit 0177a8ebb60dc3641826345d74019aefe262f605 and I will build a new release soon. Best, Matthias

mtmccrea commented 7 years ago

Great, it's much appreciated! Thanks for your work on these plugins!