Help - Search - Members - Calendar
Full Version: Counting clipped samples
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
dgover2
How can I count the number of clipped samples in a WAV I just ripped from Audio CD?

Cheers 4 info,
-dave
budgie
Use Sound Forge (6.0) or Cool Edit Pro (2.0)... I can't tell it right out of my head just now as I am not behind my comp, but it's no problem. Somewhere in the menu you must find something about statistics or so...
dgover2
QUOTE(budgie @ Feb 14 2003 - 03:24 AM)
Use Sound Forge (6.0) or Cool Edit Pro (2.0)... I can't tell it right out of my head just now as I am not behind my comp, but it's no problem. Somewhere in the menu you must find something about statistics or so...

I had already looked around in SoundForge, I guess I missed that.

Is it possible to perform batch operations with SoundForge i.e get statistics for 10 wav files?

cheers,
-dave
dreamliner77
You can get the Batch Processor 5.0 for Sonic Foundry, But I'm not sure that it would allow you to get stats from it
outscape
QUOTE(dgover2 @ Feb 14 2003 - 06:00 AM)
How can I count the number of clipped samples in a WAV I just ripped from Audio CD?

Cheers 4 info,
-dave

just use any sound editor. sound forge, cooledit, wavelab, samplitude, etc.

the only effective way to this is zoom in closely and count 'em away

wavelab has a feature that can automate this. well, sort of. it doesn't count the number of clipped samples, but how frequently they occur and where. so i guess this can ease things a little bit, but this method is not all that reliable because literally all sound editors ignore clipping that occurs below 0 dBFS (i.e. clipping at -0.1 dBFS, which basically has the same side effects as clipping over 0 dB)
Bedeox
Cool Edit has feature called Statistics (menu Analyze->Statistics).
It shows exact number of samples clipped in both channels.
It's there from at least version 95 (don't know about earlier ones).
Hanky
I bet you can't. Because the definition of clipping is that some samples are beyond the maximum scale when decoded.
Because CDDA only has 16 bit resolution, the only thing you could do is count samples that have the maximum value of +-32768 But if this is only the top of, for example a sine wave, there's no clipping in the signal at all. Clipping could as well be referred to as adjacent samples having the same maximum value, the top of the wave was 'cut off' during processing.
Bedeox
That's why it's called 'possibly clipped samples' in Cool Edit statistics.
dgover2
QUOTE(Bedeox @ Feb 16 2003 - 05:32 AM)
That's why it's called 'possibly clipped samples' in Cool Edit statistics.

Thanks for the replies guys.
Diocletian
QUOTE(dgover2 @ Feb 17 2003 - 02:12 PM)
QUOTE(Bedeox @ Feb 16 2003 - 05:32 AM)
That's why it's called 'possibly clipped samples' in Cool Edit statistics.

Thanks for the replies guys.

Best is to make a Gauss plot. There you can see compression, soft clipping, hard clipping at any level.

Two examples:

http://www.personal.uni-jena.de/~pfk/mpp/i...mg/clip_TFF.png

http://www.personal.uni-jena.de/~pfk/mpp/i...p_Acid_Jazz.png
tigre
Hi there!

As Diocletian's pictures show, CEP's clipping detection will only work sometimes as it only counts max/min value samples.

Here's another example: Santana - Supernatural - 07 - Maria Maria

From CEP's statistics:

Left Right
Min Sample Value: -32734 -32734
Max Sample Value: 32733 32733
Possibly Clipped: 0 0

user posted image
From the picture you see that during mastering obviously after causing clipping the file was amplified by 20*log(32730/32767)=-0.0098dB and dither with max. amplitude of 3 was applied. To make CEP count all clipped samples (and a few more), you have to amplify by 20*log(32767/(32730-3))=0,011dB. Then CEP reports in this example:

Left Right
Min Sample Value: -32767 -32767
Max Sample Value: 32767 32767
Possibly Clipped: 42778 46956

@Diocletian: What program did you use to create this statistic graphs (and how)?
Diocletian
QUOTE(tigre @ Feb 17 2003 - 05:05 PM)
@Diocletian: What program did you use to create this statistic graphs (and how)?

I found this graphs on Frank Klemm's web page.

They are plotted with xmgr.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.