Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Declipping (Read 10534 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Declipping

Reply #25
Thanks for all comments, from them I see declipping is not easy and in most cases not very satisfactory process. Therefore I will not worry much about it neither "push" it since results are at best mediocre by design.  I have a lot of work this week so further testing I have to postpone. I can try other declipper than Audacity's Clip Fix if suggested.

Jan

Re: Declipping

Reply #26
Clipping, if detected, should be basically a (kinder) kind of packet loss problem. There are algorithms that tries to conceal such errors.

For popular music (i.e. samples and sequencers), perhaps non-local-means type processing could work?

-k


Re: Declipping

Reply #28
The biggest issue is that the lost content simply isn't predictable by an algorithm that only understands waveforms, not complex musical content.

Different problems that consist in recovering some missing parts of an audio signal (e.g., packet loss concealment or bandwidth expansion) were recently regrouped and baptized audio inpainting ~ Audio declipping via nonnegative matrix factorization (pdf)
Quis custodiet ipsos custodes?  ;~)

Re: Declipping

Reply #29
The biggest issue is that the lost content simply isn't predictable by an algorithm that only understands waveforms, not complex musical content.

Different problems that consist in recovering some missing parts of an audio signal (e.g., packet loss concealment or bandwidth expansion) were recently regrouped and baptized audio inpainting ~ Audio declipping via nonnegative matrix factorization (pdf)


That's very interesting, but the authors draw conclusions on the effectiveness of their method only by measuring the increase in SNR. I can't find any comparisons of accuracy to the original signals.

Re: Declipping

Reply #30
I've found this:
http://www.cutestudio.net/data/products/audio/seedeclip/index.php

and that old thread:
https://hydrogenaud.io/index.php/topic,56457.0.html


There was also Declip GNU, but the site seems to be down:
http://www.ventura-audio.de/the_music_disease.html

I attach the file which was hosted there:
http://www.ventura-audio.de/declip_GNU_2_3_0.zip

It contains binaries for Windows, Linux and PPC and also the source code.

Code: [Select]
DeClip FreeV2.3-0 written by Graham Wilkinson
Copyright (c) Graham Wilkinson 2004-2008, GPL licensed version.
Go to www.cutestudio.net for more information and programs.

Usage: declip -[nvqR] -[tmTpP(num)] [in.wav [out.wav]]

Declipping options
-tN: Only declip if there are more clips per minute (dflt: -t100)
-n: No declipping (dflt: false)
-mN: How flat is a clip, relative to a 16bit wav. (dflt: -m300)
Level options
Misc options
-v: Verbose (dflt: false)
-q: Quiet mode (dflt: false)
-R: Reverse the whole track so it plays backwards. (dflt: false)
-TN: Wdiff: audio file signal compare, with threshold (dflt: -T0)
-pN: Printing (start) (dflt: -p0)
-PN: Printing (stop) (dflt: -P0)

Re: Declipping

Reply #31
Many thanks for real alternative! I will try it when I have time.

Edit. I have briefly tried it, requires plain WAV without any "foreign chunks" to work. However, the waveforms look "worse" at first sight than Clip Fix's. It has probably very minimalistic approach, by default does bigger volume reduction than required for Clip Fix. I will try to tune the parameters when I have time.

DeClip FreeV2.3-0 written by Graham Wilkinson
 Copyright (c) Graham Wilkinson 2004-2008, GPL licensed version.
Reading 'clipped.wav', fmt: 2ch 44100:16, c1, data: len 3m:26.173333s [9092244].
[0] RMS -8.96dB (11682.22/32768.00), peak 0.00dB (32768.00/32768.00)
[1] RMS -9.56dB (10894.46/32768.00), peak 0.00dB (32768.00/32768.00)
Scanning [0] max +ve: max 32767, -ve: -32768
 1285 clips found, max gap 0.249ms [ 11] at 0m:24.065896s [1061306], 100.023ms [4411] lost.
Scanning [1] max +ve: max 32767, -ve: -32768
 254 clips found, max gap 0.181ms [  8] at 0m:39.540748s [1743747], 18.821ms [830] lost.
Totals
 1539 clips (3.73Hz), 118.844ms [5241] lost (max gap 0.249ms [ 11] at 0m:39.540748s [1743747])
 threshold 100/min(1.67Hz) vs 1539 (7.46Hz) (track len 3m:26.173333s [9092244]), verdict -> declip
 FIXED: 1481 simple, 49 copied, 0 inflated, 9 shifted, 0 left.
[0] RMS -14.98dB (5841.16/32768.00), peak -4.59dB (19324.00/32768.00)
[1] RMS -15.59dB (5447.09/32768.00), peak -4.93dB (18579.00/32768.00)
Writing 'declipped.wav'.

Re: Declipping

Reply #32
Quote
Click on each thumbnail to see the transformation. You will notice that the Gnu version gives a very 'polite' declip whereas the Pro version attempts to recreate the dynamics based on the infrmation in the clip

Seems that the DeClip Free is going to give you no better than what you had. The pro version seems to be restoring the audio more correctly.

I assume that what what mentioned as the declipper from xiph is the one included in postfish. Here there is the source code (which in itself is described as a pre-release):  https://svn.xiph.org/trunk/postfish/ . That one seems to use FFT and is described as a slow process, which might really mean that it could potentially give good results.

Re: Declipping

Reply #33
Yes Declip free seems to be highly "polite" and is very very fast. I have not tested in detail but for now I agree with previous post.

Unfortunately I am not able to compile postfish for Windows.

But Audacity (somehow) works, especially on not so heavily clipped tracks. Of course for future testing leaves what are the volume changes and what actual Clip Fix.

Re: Declipping

Reply #34
Can anybody recommend a workflow with Audacity's Clip Fix ?

Is it better to deamplify more, e.g. by -8 dB, the apply Clip Fix and then reamplify with very rare clipping (to get adequate volume).
Or better to deamplify by e.g. -3 dB, then apply Clip Fix and done ?



Re: Declipping

Reply #36
I can recommend you Perfect Declipper  :)
It deals with extremely clipped audio quite well .
sox -e float -b 32 -V4 -D gain -3 rate -v 48000 norm -1
opusenc --bitrate 128

Re: Declipping

Reply #37
Thank you. The problem is price. 100 EUR for home use is too much for me :(


Re: Declipping

Reply #39
Yes, really, I do not edit tracks for commercial use, I have only 2-3 albums that I would like to correct for personal listening.

Winamp plugin costs 30 EUR and I do not use Winamp.

I would use that audacity plugin but that is for 100 EUR.

I saw Acon restoration plugin for about the same price https://acondigital.com/products/restoration-suite/, tried it but the quality is not good.

I would like to use Audacity plugin or command line utlity that uses FFT algorithm for declipping.

But for now Clip Fix is enough.

Jan

 

Re: Declipping

Reply #40
I can recommend you Perfect Declipper  :)
It deals with extremely clipped audio quite well .
Nice anecdote. Do you have any evidence that comports with the rules you agreed to follow when registering?

Re: Declipping

Reply #41
Winamp plugin costs 30 EUR and I do not use Winamp.

I would use that audacity plugin but that is for 100 EUR.
Sorry... That's right, I haven't noticed it before :(
Nice anecdote. Do you have any evidence that comports with the rules you agreed to follow when registering?
Yes :) Just open this site and watch the embedded YouTube video for highlights or download WAV files with music before and after applying Perfect Declipper.
sox -e float -b 32 -V4 -D gain -3 rate -v 48000 norm -1
opusenc --bitrate 128



Re: Declipping

Reply #44
Yes :) Just open this site and watch the embedded YouTube video for highlights or download WAV files with music before and after applying Perfect Declipper.

I have to say just from the Youtube video that it actually does sound very promising.

Re: Declipping

Reply #45
I have watched the video, too. If it works really like that then it could be better plugin than Clip Fix. The problem for home use is the price.

Re: Declipping

Reply #46
Common sense tell us don't trust any demo audio clips. To effectively evaluate the product, download the trial version (if any) and examine it with the audio files you need to declip. If it doesn't have a usable trial version I would highly recommend don't pay for it.

[edit] It looks like I evaluated another product from the same company not long ago.
https://hydrogenaud.io/index.php/topic,92704.msg928394.html#msg928394

Re: Declipping

Reply #47
Quote
I have only 2-3 albums that I would like to correct for personal listening.
Assuming these are commercial releases the odds are the distortion you're hearing is not simple clipping...   It's probably a combination of clipping, compression (possibly multiband compression), and limiting.  And, the individual tracks were likely compressed/limited before mixing so you've probably got a big mess that's impossible to "fix," although you might be able to make some improvement.

Quote
The problem is price. 100 EUR for home use is too much for me.
It's up to you to decide the value to you.           I'd probably just live with it and if the music is too unpleasant to listen to, I'd listen to those albums rarely or never.  I have one album that I tried to fix with Audacity's Clip Fix.    It didn't improve the sound, but the music isn't that important to me and I didn't buy it...  It's a CD that I... uh... copied... from one that somebody loaned me.   

On the other hand, a lot of people spend a LOT more than that for "better sound".   If someone has the "extra money", and/or the music is important to them, or if it's a home recording and there's no possibility of "take two", it could be worth it.




 

Re: Declipping

Reply #48
Quote
I have only 2-3 albums that I would like to correct for personal listening.
Assuming these are commercial releases the odds are the distortion you're hearing is not simple clipping...   It's probably a combination of clipping, compression (possibly multiband compression), and limiting.  And, the individual tracks were likely compressed/limited before mixing so you've probably got a big mess that's impossible to "fix," although you might be able to make some improvement.

Quote
The problem is price. 100 EUR for home use is too much for me.
It's up to you to decide the value to you.           I'd probably just live with it and if the music is too unpleasant to listen to, I'd listen to those albums rarely or never.  I have one album that I tried to fix with Audacity's Clip Fix.    It didn't improve the sound, but the music isn't that important to me and I didn't buy it...  It's a CD that I... uh... copied... from one that somebody loaned me.   

On the other hand, a lot of people spend a LOT more than that for "better sound".   If someone has the "extra money", and/or the music is important to them, or if it's a home recording and there's no possibility of "take two", it could be worth it.




 


Very reasonable approach, especially good hint with multiple causes of distortion. Thanks for all opinions and advices, I think I can handle the issue now better.