(8.D.1.2) ClipIndicatorFract32
Overview
Detects clipping by measuring when a signal level exceeds a specified threshold
Type Definition
typedef struct _ModuleClipIndicatorFract32
{
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
fract32 thresholdCoeff; // Internal derived parameter which equals undb20(threshold)
fract32 attackCoeff; // Internal coefficient that realizes the attack time
fract32 releaseCoeff; // Internal coefficient that realizes the release time
fract32* value; // Internal array of envelope follower state variables, one per channel
INT32* isClipping; // Boolean array of clipping values, one per channel
} ModuleClipIndicatorFract32Class;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
threshold | float | parameter | 0 | -3 | -100:0 | dB |
attackTime | float | parameter | 0 | 5 | 0:1000 | msec |
releaseTime | float | parameter | 0 | 100 | 0:10000 | msec |
thresholdCoeff | fract32 | derived | 1 | 0.7079 | Unrestricted | linear |
attackCoeff | fract32 | derived | 1 | 0.1248 | Unrestricted | Â |
releaseCoeff | fract32 | derived | 1 | 0.006644 | Unrestricted | Â |
value | fract32* | 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: fract32
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_fract32_module.m
M=clip_indicator_fract32_module(NAME)
Creates a module that tests for clipping of an audio signal. The
clipping threshold is programmable. Arguments:
NAME - name of the module.
Â