Help me fix errors and inefficiencies in clip fix

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Mac OS X
GNU/Linux and Unix-like
Post Reply
Paul L
Posts: 886
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Help me fix errors and inefficiencies in clip fix

Post by Paul L » Mon Nov 03, 2014 3:11 pm

The clip fix effect needs improvement.

This rewrite got rid of an unused variable and an assignment in an inner loop that had no effect, and combines some repeated code into a function, and rewrites some of that for more clarity.

Besides which, I believe there was a mistake in the math. Each clipping is repaired by computing the cubic determined by two values and two slopes at the boundaries of the clipping. I believe the values for those slopes were chosen mistakenly. The slope of the chord connecting the values at start and end should be subtracted from the values of "d1" and "d2". I need someone, who knows how to differentiate a polynomial, to check my math.

I also need to devise a convincing test case demonstrating the improvement in the calculation. Someone else might have an idea.

Besides this there are other problems I have not attempted to address. Finding the clips might be made faster with snd-trigger. There is also the problem that the sound is divided into blocks of 10000 samples, and clips too near block boundaries or spanning them do not get repaired. Steve mentioned that he wrote a fix for that problem somewhere -- if so, I won't try to duplicate efforts.
(4.58 KiB) Downloaded 69 times

Post Reply