SbRMS
Overview
Subband RMS detector
Discussion
Compute the smoothed RMS value of frequency domain data on a subband-by-subband basis The module accepts real or complex inputs and has a separate state variable per subband. The module accepts an arbitrary blockSize and numChannels.
The module first computes the energy of the input, passes this through a first order smoother, and then compute the square root. The smoothing time is configured in milliseconds and a time of 0 milliseconds is allowable. When the smoothing time is 0 milliseconds, the output equals the magnitude of the input. The size of the output pin matches the size of the input pin. The only difference is that the output pin is always real data.
When bypassed the module computes the absolute value of the input; no smoothing occurs. For real data, the output is just fabs(in). For complex data, the square root of the magnitude squared is returned.
Type Definition
typedef struct _ModuleSbRMS
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 smoothingTime; // Time interval over which to smooth the measurement.
FLOAT32 a1; // a1 coefficient of 1st order smoothing filter.
FLOAT32 b0; // b0 coefficient of 1st order smoothing filter.
FLOAT32* yNm1; // Delayed output vector.
} ModuleSbRMSClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
smoothingTime | float | parameter | 0 | 1000 | 0:10000 | msec |
a1 | float | derived | 1 | -0.9999 | Unrestricted | Â |
b0 | float | derived | 1 | 0.0001309 | Unrestricted | Â |
yNm1 | float* | state | 1 | [32 x 1] | Unrestricted | Â |
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 and Complex
Output Pins
Name: out
Description: audio output
Data type: float
MATLAB Usage
File Name: sb_rms_module.m
M=sb_rms_module(NAME)
Subband RMS detector in which the RMS value of each subband is
separately computed. Each subband has its own state variables
and there is a single smoothing time across all bands.
% Arguments:
NAME - name of the module.
Copyright 2011. DSP Concepts, Inc. All Rights Reserved.
Â