Clipfix mod

This was one of my first attempts at modifying a Nyquist plug-in (so please don’t expect good coding style ­čÖé

Someone asked me about how to fix some badly clipped audio. Repairing clipped audio is bad enough at any time, but in this case the problem was exacerbated because not only were some of the peaks clipped, but “inverted”

distorted audio with inverted peaks
distorted audio with inverted peaks

The modification to the standard ClipFix effect looks for inverted regions and converts them to “flat tops” by replacing the inverted section with a constant value that is equal to the clipping amplitude:

Inverted audio removed
Inverted audio removed

The plug-in then runs a second pass using the standard ClipFix code to reconstruct the peaks on the clipped regions.

Please note that this is an experimental plug-in and may contain bugs. Hopefully I’ll have time to revisit this effect at some time in the future and complete it.

Right click to save ESP-clipfix.ny
(For Internet Explorer “Save Target As”)

2 thoughts on “Clipfix mod”

  1. I get “Nyquist returned the value: 100000”. Using “debug”, I get this:

    (I’m running Audacity 2.1.0).
    Any idea?
    Thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.