Help me fix errors and inefficiencies in clip fix

Using Nyquist scripts in Audacity.
Post and download new plug-ins.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Help me fix errors and inefficiencies in clip fix

Permanent link to this post Posted 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.
Attachments
clipfix.ny
(4.58 KiB) Downloaded 65 times
Paul L
 
Posts: 881
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Return to Nyquist



Who is online

Users browsing this forum: No registered users and 3 guests