Overview
Subband smoothing across frequency bins
Discussion
This module performs smoothing across frequency bins. Smoothing is done by averaging multiple bins to the left and right of a particular frequency sample. The smoothing only operates on real data. To smooth complex data it must first be decomposed into real and imaginary components.
...
The module is designed to work with the wola_analysis_subsystem.m and the sample rate specified equals the decimated subband sample rate.
Type Definition
Code Block |
---|
typedef struct _ModuleSbSmooth { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 type; // Determines which type of smoothing is applied: Linear=0, Logarithmic=1, Custom=2 FLOAT32 startFreq; // Starting frequency for the smoothing operation FLOAT32 width; // Amount of smoothing INT32* startIndex; // Starting index for the averaging process. INT32* endIndex; // Ending index for the averaging process. FLOAT32* oneOverN; // Precomputed 1/N for averaging. FLOAT32* cumSum; // Cumulative sum of values from the start of the buffer. } ModuleSbSmoothClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
type | int | parameter | 0 | 1 | 0:2 | |
startFreq | float | parameter | 0 | 0 | 0:3072000 | Hz |
width | float | parameter | 0 | 0.1667 | 0:2400 | |
startIndex | int* | derived | 1 | [257 x 1] | Unrestricted | |
endIndex | int* | derived | 1 | [257 x 1] | Unrestricted | |
oneOverN | float* | derived | 1 | [257 x 1] | Unrestricted | |
cumSum | float* | state | 1 | [258 x 1] | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: float
MATLAB Usage
File Name: sb_smooth_module.m
...