(8.D.2.7) ClipIndicator
Overview
Detects clipping by measuring when a signal level exceeds a specified threshold
Type Definition
typedef struct _ModuleClipIndicator
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 threshold; // Threshold in dB above which clipping occurs.
FLOAT32 attackTime; // Attack time of the clipping detector. Specifies how quickly the value is allowed to rise.
FLOAT32 releaseTime; // Release time of the clipping detector. Specifies how quickly the value is allowed to decay.
FLOAT32 thresholdCoeff; // Internal derived parameter which equals undb20(threshold).
FLOAT32 attackCoeff; // Internal coefficient that realizes the attack time.
FLOAT32 releaseCoeff; // Internal coefficient that realizes the release time.
FLOAT32* value; // Internal array of envelope follower state variables, one per channel.
INT32* isClipping; // Boolean array of clipping values, one per channel.
} ModuleClipIndicatorClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
threshold | float | parameter | 0 | 0 | -100:20 | dB |
attackTime | float | parameter | 0 | 5 | 0:1000 | msec |
releaseTime | float | parameter | 0 | 100 | 0:10000 | msec |
thresholdCoeff | float | derived | 1 | 1 | Unrestricted | linear |
attackCoeff | float | derived | 1 | 0.1248 | Unrestricted | Â |
releaseCoeff | float | derived | 1 | 0.006644 | Unrestricted | Â |
value | float* | state | 1 | [1 x 1] | 0:1000 | Â |
isClipping | int* | state | 0 | [1 x 1] | 0:1:1 | Â |
Pins
Input Pins
Name: in
Description: audio input
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Scratch Pins
Channel count: 1
Block size: 32
Sample rate: 48000
MATLAB Usage
File Name: clip_indicator_module.m
M=clip_indicator_module(NAME)
Creates a module that tests for clipping of an audio signal. The
clipping threshold is programmable.
Arguments:
NAME - name of the module.
Â