Class Clipping
TODO: This class should be Unit tested on a variety of clipped recordings. TODO: The calculations employed in this class to estimate clipping need to be revisted. Not clear what to do due to resampling. Estimates of clipping are complicated by the fact that down sampling greatly reduces the degree of clipping in a recording. Therefore it is difficult to know how much of the original recording was clipped after it has been downsampled. The assumption in the current calculations is that we want to know that a recording was clipped before it was subsequently processed.
Inherited Members
Namespace: AudioAnalysisTools.DSP
Assembly: AudioAnalysisTools.dll
Syntax
public static class Clipping
Methods
| Improve this Doc View SourceGetClippingCount(Double[], Double[], Int32, Double, out Int32, out Int32)
This method attempts to estimate clipping in a recording. What should have been simple was made apparently complicated because downsampling very much affects clipping rate. Downsampling reduces the maximum signal value and removes a lot of clipping. This method was debugged on a highly clipped recording but hwich had been downsampled.
Declaration
public static void GetClippingCount(double[] signal, double[] envelope, int frameStepSize, double epsilon, out int highAmplitudeCount, out int clipCount)
Parameters
Type | Name | Description |
---|---|---|
Double[] | signal | the original signal. |
Double[] | envelope | and its envelope. |
Int32 | frameStepSize | frame step originally used to calcualte the envelope. |
Double | epsilon | used to estimate how close wave form must be to max in order to be clipped. |
Int32 | highAmplitudeCount | returned high amplitude count. |
Int32 | clipCount | returned clip count. |